{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.Device
(
Device(..) ,
IsDevice ,
toDevice ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceConnectionCompatibleMethodInfo ,
#endif
deviceConnectionCompatible ,
#if defined(ENABLE_OVERLOADING)
DeviceConnectionValidMethodInfo ,
#endif
deviceConnectionValid ,
#if defined(ENABLE_OVERLOADING)
DeviceDeleteMethodInfo ,
#endif
deviceDelete ,
#if defined(ENABLE_OVERLOADING)
DeviceDeleteAsyncMethodInfo ,
#endif
deviceDeleteAsync ,
#if defined(ENABLE_OVERLOADING)
DeviceDeleteFinishMethodInfo ,
#endif
deviceDeleteFinish ,
deviceDisambiguateNames ,
#if defined(ENABLE_OVERLOADING)
DeviceDisconnectMethodInfo ,
#endif
deviceDisconnect ,
#if defined(ENABLE_OVERLOADING)
DeviceDisconnectAsyncMethodInfo ,
#endif
deviceDisconnectAsync ,
#if defined(ENABLE_OVERLOADING)
DeviceDisconnectFinishMethodInfo ,
#endif
deviceDisconnectFinish ,
#if defined(ENABLE_OVERLOADING)
DeviceFilterConnectionsMethodInfo ,
#endif
deviceFilterConnections ,
#if defined(ENABLE_OVERLOADING)
DeviceGetActiveConnectionMethodInfo ,
#endif
deviceGetActiveConnection ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAppliedConnectionMethodInfo ,
#endif
deviceGetAppliedConnection ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAppliedConnectionAsyncMethodInfo,
#endif
deviceGetAppliedConnectionAsync ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAppliedConnectionFinishMethodInfo,
#endif
deviceGetAppliedConnectionFinish ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAutoconnectMethodInfo ,
#endif
deviceGetAutoconnect ,
#if defined(ENABLE_OVERLOADING)
DeviceGetAvailableConnectionsMethodInfo ,
#endif
deviceGetAvailableConnections ,
#if defined(ENABLE_OVERLOADING)
DeviceGetCapabilitiesMethodInfo ,
#endif
deviceGetCapabilities ,
#if defined(ENABLE_OVERLOADING)
DeviceGetConnectivityMethodInfo ,
#endif
deviceGetConnectivity ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDescriptionMethodInfo ,
#endif
deviceGetDescription ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDeviceTypeMethodInfo ,
#endif
deviceGetDeviceType ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDhcp4ConfigMethodInfo ,
#endif
deviceGetDhcp4Config ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDhcp6ConfigMethodInfo ,
#endif
deviceGetDhcp6Config ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDriverMethodInfo ,
#endif
deviceGetDriver ,
#if defined(ENABLE_OVERLOADING)
DeviceGetDriverVersionMethodInfo ,
#endif
deviceGetDriverVersion ,
#if defined(ENABLE_OVERLOADING)
DeviceGetFirmwareMissingMethodInfo ,
#endif
deviceGetFirmwareMissing ,
#if defined(ENABLE_OVERLOADING)
DeviceGetFirmwareVersionMethodInfo ,
#endif
deviceGetFirmwareVersion ,
#if defined(ENABLE_OVERLOADING)
DeviceGetHwAddressMethodInfo ,
#endif
deviceGetHwAddress ,
#if defined(ENABLE_OVERLOADING)
DeviceGetIfaceMethodInfo ,
#endif
deviceGetIface ,
#if defined(ENABLE_OVERLOADING)
DeviceGetInterfaceFlagsMethodInfo ,
#endif
deviceGetInterfaceFlags ,
#if defined(ENABLE_OVERLOADING)
DeviceGetIp4ConfigMethodInfo ,
#endif
deviceGetIp4Config ,
#if defined(ENABLE_OVERLOADING)
DeviceGetIp6ConfigMethodInfo ,
#endif
deviceGetIp6Config ,
#if defined(ENABLE_OVERLOADING)
DeviceGetIpIfaceMethodInfo ,
#endif
deviceGetIpIface ,
#if defined(ENABLE_OVERLOADING)
DeviceGetLldpNeighborsMethodInfo ,
#endif
deviceGetLldpNeighbors ,
#if defined(ENABLE_OVERLOADING)
DeviceGetManagedMethodInfo ,
#endif
deviceGetManaged ,
#if defined(ENABLE_OVERLOADING)
DeviceGetMeteredMethodInfo ,
#endif
deviceGetMetered ,
#if defined(ENABLE_OVERLOADING)
DeviceGetMtuMethodInfo ,
#endif
deviceGetMtu ,
#if defined(ENABLE_OVERLOADING)
DeviceGetNmPluginMissingMethodInfo ,
#endif
deviceGetNmPluginMissing ,
#if defined(ENABLE_OVERLOADING)
DeviceGetPathMethodInfo ,
#endif
deviceGetPath ,
#if defined(ENABLE_OVERLOADING)
DeviceGetPhysicalPortIdMethodInfo ,
#endif
deviceGetPhysicalPortId ,
#if defined(ENABLE_OVERLOADING)
DeviceGetPortsMethodInfo ,
#endif
deviceGetPorts ,
#if defined(ENABLE_OVERLOADING)
DeviceGetProductMethodInfo ,
#endif
deviceGetProduct ,
#if defined(ENABLE_OVERLOADING)
DeviceGetSettingTypeMethodInfo ,
#endif
deviceGetSettingType ,
#if defined(ENABLE_OVERLOADING)
DeviceGetStateMethodInfo ,
#endif
deviceGetState ,
#if defined(ENABLE_OVERLOADING)
DeviceGetStateReasonMethodInfo ,
#endif
deviceGetStateReason ,
#if defined(ENABLE_OVERLOADING)
DeviceGetTypeDescriptionMethodInfo ,
#endif
deviceGetTypeDescription ,
#if defined(ENABLE_OVERLOADING)
DeviceGetUdiMethodInfo ,
#endif
deviceGetUdi ,
#if defined(ENABLE_OVERLOADING)
DeviceGetVendorMethodInfo ,
#endif
deviceGetVendor ,
#if defined(ENABLE_OVERLOADING)
DeviceIsRealMethodInfo ,
#endif
deviceIsReal ,
#if defined(ENABLE_OVERLOADING)
DeviceIsSoftwareMethodInfo ,
#endif
deviceIsSoftware ,
#if defined(ENABLE_OVERLOADING)
DeviceReapplyMethodInfo ,
#endif
deviceReapply ,
#if defined(ENABLE_OVERLOADING)
DeviceReapplyAsyncMethodInfo ,
#endif
deviceReapplyAsync ,
#if defined(ENABLE_OVERLOADING)
DeviceReapplyFinishMethodInfo ,
#endif
deviceReapplyFinish ,
#if defined(ENABLE_OVERLOADING)
DeviceSetAutoconnectMethodInfo ,
#endif
deviceSetAutoconnect ,
#if defined(ENABLE_OVERLOADING)
DeviceSetManagedMethodInfo ,
#endif
deviceSetManaged ,
#if defined(ENABLE_OVERLOADING)
DeviceActiveConnectionPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceActiveConnection ,
#endif
getDeviceActiveConnection ,
#if defined(ENABLE_OVERLOADING)
DeviceAutoconnectPropertyInfo ,
#endif
constructDeviceAutoconnect ,
#if defined(ENABLE_OVERLOADING)
deviceAutoconnect ,
#endif
getDeviceAutoconnect ,
setDeviceAutoconnect ,
#if defined(ENABLE_OVERLOADING)
DeviceAvailableConnectionsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceAvailableConnections ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceCapabilitiesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceCapabilities ,
#endif
getDeviceCapabilities ,
#if defined(ENABLE_OVERLOADING)
DeviceDeviceTypePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceDeviceType ,
#endif
getDeviceDeviceType ,
#if defined(ENABLE_OVERLOADING)
DeviceDhcp4ConfigPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceDhcp4Config ,
#endif
getDeviceDhcp4Config ,
#if defined(ENABLE_OVERLOADING)
DeviceDhcp6ConfigPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceDhcp6Config ,
#endif
getDeviceDhcp6Config ,
#if defined(ENABLE_OVERLOADING)
DeviceDriverPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceDriver ,
#endif
getDeviceDriver ,
#if defined(ENABLE_OVERLOADING)
DeviceDriverVersionPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceDriverVersion ,
#endif
getDeviceDriverVersion ,
#if defined(ENABLE_OVERLOADING)
DeviceFirmwareMissingPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceFirmwareMissing ,
#endif
getDeviceFirmwareMissing ,
#if defined(ENABLE_OVERLOADING)
DeviceFirmwareVersionPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceFirmwareVersion ,
#endif
getDeviceFirmwareVersion ,
#if defined(ENABLE_OVERLOADING)
DeviceHwAddressPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceHwAddress ,
#endif
getDeviceHwAddress ,
#if defined(ENABLE_OVERLOADING)
DeviceInterfacePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceInterface ,
#endif
getDeviceInterface ,
#if defined(ENABLE_OVERLOADING)
DeviceInterfaceFlagsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceInterfaceFlags ,
#endif
getDeviceInterfaceFlags ,
#if defined(ENABLE_OVERLOADING)
DeviceIp4ConfigPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceIp4Config ,
#endif
getDeviceIp4Config ,
#if defined(ENABLE_OVERLOADING)
DeviceIp4ConnectivityPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceIp4Connectivity ,
#endif
getDeviceIp4Connectivity ,
#if defined(ENABLE_OVERLOADING)
DeviceIp6ConfigPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceIp6Config ,
#endif
getDeviceIp6Config ,
#if defined(ENABLE_OVERLOADING)
DeviceIp6ConnectivityPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceIp6Connectivity ,
#endif
getDeviceIp6Connectivity ,
#if defined(ENABLE_OVERLOADING)
DeviceIpInterfacePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceIpInterface ,
#endif
getDeviceIpInterface ,
#if defined(ENABLE_OVERLOADING)
DeviceLldpNeighborsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceLldpNeighbors ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceManagedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceManaged ,
#endif
getDeviceManaged ,
#if defined(ENABLE_OVERLOADING)
DeviceMeteredPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceMetered ,
#endif
getDeviceMetered ,
#if defined(ENABLE_OVERLOADING)
DeviceMtuPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceMtu ,
#endif
getDeviceMtu ,
#if defined(ENABLE_OVERLOADING)
DeviceNmPluginMissingPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceNmPluginMissing ,
#endif
getDeviceNmPluginMissing ,
#if defined(ENABLE_OVERLOADING)
DevicePathPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
devicePath ,
#endif
getDevicePath ,
#if defined(ENABLE_OVERLOADING)
DevicePhysicalPortIdPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
devicePhysicalPortId ,
#endif
getDevicePhysicalPortId ,
#if defined(ENABLE_OVERLOADING)
DevicePortsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
devicePorts ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceProductPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceProduct ,
#endif
getDeviceProduct ,
#if defined(ENABLE_OVERLOADING)
DeviceRealPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceReal ,
#endif
getDeviceReal ,
#if defined(ENABLE_OVERLOADING)
DeviceStatePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceState ,
#endif
getDeviceState ,
#if defined(ENABLE_OVERLOADING)
DeviceStateReasonPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceStateReason ,
#endif
getDeviceStateReason ,
#if defined(ENABLE_OVERLOADING)
DeviceUdiPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceUdi ,
#endif
getDeviceUdi ,
#if defined(ENABLE_OVERLOADING)
DeviceVendorPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceVendor ,
#endif
getDeviceVendor ,
DeviceStateChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DeviceStateChangedSignalInfo ,
#endif
afterDeviceStateChanged ,
onDeviceStateChanged ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.MainContext as GLib.MainContext
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import qualified GI.NM.Callbacks as NM.Callbacks
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.ActiveConnection as NM.ActiveConnection
import {-# SOURCE #-} qualified GI.NM.Objects.Checkpoint as NM.Checkpoint
import {-# SOURCE #-} qualified GI.NM.Objects.Client as NM.Client
import {-# SOURCE #-} qualified GI.NM.Objects.DhcpConfig as NM.DhcpConfig
import {-# SOURCE #-} qualified GI.NM.Objects.IPConfig as NM.IPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
import {-# SOURCE #-} qualified GI.NM.Objects.RemoteConnection as NM.RemoteConnection
import {-# SOURCE #-} qualified GI.NM.Objects.Setting as NM.Setting
import {-# SOURCE #-} qualified GI.NM.Objects.Setting8021x as NM.Setting8021x
import {-# SOURCE #-} qualified GI.NM.Objects.SettingAdsl as NM.SettingAdsl
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBluetooth as NM.SettingBluetooth
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBond as NM.SettingBond
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridge as NM.SettingBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridgePort as NM.SettingBridgePort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingCdma as NM.SettingCdma
import {-# SOURCE #-} qualified GI.NM.Objects.SettingConnection as NM.SettingConnection
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDcb as NM.SettingDcb
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDummy as NM.SettingDummy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGeneric as NM.SettingGeneric
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGsm as NM.SettingGsm
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP4Config as NM.SettingIP4Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP6Config as NM.SettingIP6Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPConfig as NM.SettingIPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPTunnel as NM.SettingIPTunnel
import {-# SOURCE #-} qualified GI.NM.Objects.SettingInfiniband as NM.SettingInfiniband
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacsec as NM.SettingMacsec
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacvlan as NM.SettingMacvlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOlpcMesh as NM.SettingOlpcMesh
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsBridge as NM.SettingOvsBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsInterface as NM.SettingOvsInterface
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPatch as NM.SettingOvsPatch
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPort as NM.SettingOvsPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPpp as NM.SettingPpp
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPppoe as NM.SettingPppoe
import {-# SOURCE #-} qualified GI.NM.Objects.SettingProxy as NM.SettingProxy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingSerial as NM.SettingSerial
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTCConfig as NM.SettingTCConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeam as NM.SettingTeam
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeamPort as NM.SettingTeamPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTun as NM.SettingTun
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVlan as NM.SettingVlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVpn as NM.SettingVpn
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVxlan as NM.SettingVxlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWimax as NM.SettingWimax
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWired as NM.SettingWired
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWireless as NM.SettingWireless
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWirelessSecurity as NM.SettingWirelessSecurity
import {-# SOURCE #-} qualified GI.NM.Structs.BridgeVlan as NM.BridgeVlan
import {-# SOURCE #-} qualified GI.NM.Structs.DnsEntry as NM.DnsEntry
import {-# SOURCE #-} qualified GI.NM.Structs.IPAddress as NM.IPAddress
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoute as NM.IPRoute
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoutingRule as NM.IPRoutingRule
import {-# SOURCE #-} qualified GI.NM.Structs.LldpNeighbor as NM.LldpNeighbor
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.ActiveConnection as NM.ActiveConnection
import {-# SOURCE #-} qualified GI.NM.Objects.DhcpConfig as NM.DhcpConfig
import {-# SOURCE #-} qualified GI.NM.Objects.IPConfig as NM.IPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
import {-# SOURCE #-} qualified GI.NM.Objects.RemoteConnection as NM.RemoteConnection
import {-# SOURCE #-} qualified GI.NM.Structs.LldpNeighbor as NM.LldpNeighbor
#endif
newtype Device = Device (SP.ManagedPtr Device)
deriving (Device -> Device -> Bool
(Device -> Device -> Bool)
-> (Device -> Device -> Bool) -> Eq Device
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Device -> Device -> Bool
== :: Device -> Device -> Bool
$c/= :: Device -> Device -> Bool
/= :: Device -> Device -> Bool
Eq)
instance SP.ManagedPtrNewtype Device where
toManagedPtr :: Device -> ManagedPtr Device
toManagedPtr (Device ManagedPtr Device
p) = ManagedPtr Device
p
foreign import ccall "nm_device_get_type"
c_nm_device_get_type :: IO B.Types.GType
instance B.Types.TypedObject Device where
glibType :: IO GType
glibType = IO GType
c_nm_device_get_type
instance B.Types.GObject Device
class (SP.GObject o, O.IsDescendantOf Device o) => IsDevice o
instance (SP.GObject o, O.IsDescendantOf Device o) => IsDevice o
instance O.HasParentTypes Device
type instance O.ParentTypes Device = '[NM.Object.Object, GObject.Object.Object]
toDevice :: (MIO.MonadIO m, IsDevice o) => o -> m Device
toDevice :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Device
toDevice = IO Device -> m Device
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Device -> m Device) -> (o -> IO Device) -> o -> m Device
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Device -> Device) -> o -> IO Device
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Device -> Device
Device
instance B.GValue.IsGValue (Maybe Device) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_get_type
gvalueSet_ :: Ptr GValue -> Maybe Device -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Device
P.Nothing = Ptr GValue -> Ptr Device -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Device
forall a. Ptr a
FP.nullPtr :: FP.Ptr Device)
gvalueSet_ Ptr GValue
gv (P.Just Device
obj) = Device -> (Ptr Device -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Device
obj (Ptr GValue -> Ptr Device -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Device)
gvalueGet_ Ptr GValue
gv = do
Ptr Device
ptr <- Ptr GValue -> IO (Ptr Device)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Device)
if Ptr Device
ptr Ptr Device -> Ptr Device -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Device
forall a. Ptr a
FP.nullPtr
then Device -> Maybe Device
forall a. a -> Maybe a
P.Just (Device -> Maybe Device) -> IO Device -> IO (Maybe Device)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Device -> Device
Device Ptr Device
ptr
else Maybe Device -> IO (Maybe Device)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceMethod "connectionCompatible" o = DeviceConnectionCompatibleMethodInfo
ResolveDeviceMethod "connectionValid" o = DeviceConnectionValidMethodInfo
ResolveDeviceMethod "delete" o = DeviceDeleteMethodInfo
ResolveDeviceMethod "deleteAsync" o = DeviceDeleteAsyncMethodInfo
ResolveDeviceMethod "deleteFinish" o = DeviceDeleteFinishMethodInfo
ResolveDeviceMethod "disconnect" o = DeviceDisconnectMethodInfo
ResolveDeviceMethod "disconnectAsync" o = DeviceDisconnectAsyncMethodInfo
ResolveDeviceMethod "disconnectFinish" o = DeviceDisconnectFinishMethodInfo
ResolveDeviceMethod "filterConnections" o = DeviceFilterConnectionsMethodInfo
ResolveDeviceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceMethod "isReal" o = DeviceIsRealMethodInfo
ResolveDeviceMethod "isSoftware" o = DeviceIsSoftwareMethodInfo
ResolveDeviceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceMethod "reapply" o = DeviceReapplyMethodInfo
ResolveDeviceMethod "reapplyAsync" o = DeviceReapplyAsyncMethodInfo
ResolveDeviceMethod "reapplyFinish" o = DeviceReapplyFinishMethodInfo
ResolveDeviceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceMethod "getActiveConnection" o = DeviceGetActiveConnectionMethodInfo
ResolveDeviceMethod "getAppliedConnection" o = DeviceGetAppliedConnectionMethodInfo
ResolveDeviceMethod "getAppliedConnectionAsync" o = DeviceGetAppliedConnectionAsyncMethodInfo
ResolveDeviceMethod "getAppliedConnectionFinish" o = DeviceGetAppliedConnectionFinishMethodInfo
ResolveDeviceMethod "getAutoconnect" o = DeviceGetAutoconnectMethodInfo
ResolveDeviceMethod "getAvailableConnections" o = DeviceGetAvailableConnectionsMethodInfo
ResolveDeviceMethod "getCapabilities" o = DeviceGetCapabilitiesMethodInfo
ResolveDeviceMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveDeviceMethod "getConnectivity" o = DeviceGetConnectivityMethodInfo
ResolveDeviceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceMethod "getDescription" o = DeviceGetDescriptionMethodInfo
ResolveDeviceMethod "getDeviceType" o = DeviceGetDeviceTypeMethodInfo
ResolveDeviceMethod "getDhcp4Config" o = DeviceGetDhcp4ConfigMethodInfo
ResolveDeviceMethod "getDhcp6Config" o = DeviceGetDhcp6ConfigMethodInfo
ResolveDeviceMethod "getDriver" o = DeviceGetDriverMethodInfo
ResolveDeviceMethod "getDriverVersion" o = DeviceGetDriverVersionMethodInfo
ResolveDeviceMethod "getFirmwareMissing" o = DeviceGetFirmwareMissingMethodInfo
ResolveDeviceMethod "getFirmwareVersion" o = DeviceGetFirmwareVersionMethodInfo
ResolveDeviceMethod "getHwAddress" o = DeviceGetHwAddressMethodInfo
ResolveDeviceMethod "getIface" o = DeviceGetIfaceMethodInfo
ResolveDeviceMethod "getInterfaceFlags" o = DeviceGetInterfaceFlagsMethodInfo
ResolveDeviceMethod "getIp4Config" o = DeviceGetIp4ConfigMethodInfo
ResolveDeviceMethod "getIp6Config" o = DeviceGetIp6ConfigMethodInfo
ResolveDeviceMethod "getIpIface" o = DeviceGetIpIfaceMethodInfo
ResolveDeviceMethod "getLldpNeighbors" o = DeviceGetLldpNeighborsMethodInfo
ResolveDeviceMethod "getManaged" o = DeviceGetManagedMethodInfo
ResolveDeviceMethod "getMetered" o = DeviceGetMeteredMethodInfo
ResolveDeviceMethod "getMtu" o = DeviceGetMtuMethodInfo
ResolveDeviceMethod "getNmPluginMissing" o = DeviceGetNmPluginMissingMethodInfo
ResolveDeviceMethod "getPath" o = DeviceGetPathMethodInfo
ResolveDeviceMethod "getPhysicalPortId" o = DeviceGetPhysicalPortIdMethodInfo
ResolveDeviceMethod "getPorts" o = DeviceGetPortsMethodInfo
ResolveDeviceMethod "getProduct" o = DeviceGetProductMethodInfo
ResolveDeviceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceMethod "getSettingType" o = DeviceGetSettingTypeMethodInfo
ResolveDeviceMethod "getState" o = DeviceGetStateMethodInfo
ResolveDeviceMethod "getStateReason" o = DeviceGetStateReasonMethodInfo
ResolveDeviceMethod "getTypeDescription" o = DeviceGetTypeDescriptionMethodInfo
ResolveDeviceMethod "getUdi" o = DeviceGetUdiMethodInfo
ResolveDeviceMethod "getVendor" o = DeviceGetVendorMethodInfo
ResolveDeviceMethod "setAutoconnect" o = DeviceSetAutoconnectMethodInfo
ResolveDeviceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceMethod "setManaged" o = DeviceSetManagedMethodInfo
ResolveDeviceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethod info Device p) => OL.IsLabel t (Device -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethod info Device p, R.HasField t Device p) => R.HasField t Device p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethodInfo info Device) => OL.IsLabel t (O.MethodProxy info Device) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DeviceStateChangedCallback =
Word32
-> Word32
-> Word32
-> IO ()
type C_DeviceStateChangedCallback =
Ptr Device ->
Word32 ->
Word32 ->
Word32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DeviceStateChangedCallback :: C_DeviceStateChangedCallback -> IO (FunPtr C_DeviceStateChangedCallback)
wrap_DeviceStateChangedCallback ::
GObject a => (a -> DeviceStateChangedCallback) ->
C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback :: forall a.
GObject a =>
(a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback a -> DeviceStateChangedCallback
gi'cb Ptr Device
gi'selfPtr Word32
newState Word32
oldState Word32
reason Ptr ()
_ = do
Ptr Device -> (Device -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Device
gi'selfPtr ((Device -> IO ()) -> IO ()) -> (Device -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Device
gi'self -> a -> DeviceStateChangedCallback
gi'cb (Device -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Device
gi'self) Word32
newState Word32
oldState Word32
reason
onDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> m SignalHandlerId
onDeviceStateChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a
-> ((?self::a) => DeviceStateChangedCallback) -> m SignalHandlerId
onDeviceStateChanged a
obj (?self::a) => DeviceStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DeviceStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DeviceStateChangedCallback
DeviceStateChangedCallback
cb
let wrapped' :: C_DeviceStateChangedCallback
wrapped' = (a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
forall a.
GObject a =>
(a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback a -> DeviceStateChangedCallback
wrapped
FunPtr C_DeviceStateChangedCallback
wrapped'' <- C_DeviceStateChangedCallback
-> IO (FunPtr C_DeviceStateChangedCallback)
mk_DeviceStateChangedCallback C_DeviceStateChangedCallback
wrapped'
a
-> Text
-> FunPtr C_DeviceStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"state-changed" FunPtr C_DeviceStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> m SignalHandlerId
afterDeviceStateChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a
-> ((?self::a) => DeviceStateChangedCallback) -> m SignalHandlerId
afterDeviceStateChanged a
obj (?self::a) => DeviceStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DeviceStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DeviceStateChangedCallback
DeviceStateChangedCallback
cb
let wrapped' :: C_DeviceStateChangedCallback
wrapped' = (a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
forall a.
GObject a =>
(a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback a -> DeviceStateChangedCallback
wrapped
FunPtr C_DeviceStateChangedCallback
wrapped'' <- C_DeviceStateChangedCallback
-> IO (FunPtr C_DeviceStateChangedCallback)
mk_DeviceStateChangedCallback C_DeviceStateChangedCallback
wrapped'
a
-> Text
-> FunPtr C_DeviceStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"state-changed" FunPtr C_DeviceStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DeviceStateChangedSignalInfo
instance SignalInfo DeviceStateChangedSignalInfo where
type HaskellCallbackType DeviceStateChangedSignalInfo = DeviceStateChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DeviceStateChangedCallback cb
cb'' <- mk_DeviceStateChangedCallback cb'
connectSignalFunPtr obj "state-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device::state-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:signal:stateChanged"})
#endif
getDeviceActiveConnection :: (MonadIO m, IsDevice o) => o -> m NM.ActiveConnection.ActiveConnection
getDeviceActiveConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m ActiveConnection
getDeviceActiveConnection o
obj = IO ActiveConnection -> m ActiveConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ActiveConnection -> m ActiveConnection)
-> IO ActiveConnection -> m ActiveConnection
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe ActiveConnection) -> IO ActiveConnection
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceActiveConnection" (IO (Maybe ActiveConnection) -> IO ActiveConnection)
-> IO (Maybe ActiveConnection) -> IO ActiveConnection
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ActiveConnection -> ActiveConnection)
-> IO (Maybe ActiveConnection)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"active-connection" ManagedPtr ActiveConnection -> ActiveConnection
NM.ActiveConnection.ActiveConnection
#if defined(ENABLE_OVERLOADING)
data DeviceActiveConnectionPropertyInfo
instance AttrInfo DeviceActiveConnectionPropertyInfo where
type AttrAllowedOps DeviceActiveConnectionPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceActiveConnectionPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceActiveConnectionPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceActiveConnectionPropertyInfo = (~) ()
type AttrTransferType DeviceActiveConnectionPropertyInfo = ()
type AttrGetType DeviceActiveConnectionPropertyInfo = NM.ActiveConnection.ActiveConnection
type AttrLabel DeviceActiveConnectionPropertyInfo = "active-connection"
type AttrOrigin DeviceActiveConnectionPropertyInfo = Device
attrGet = getDeviceActiveConnection
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.activeConnection"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:activeConnection"
})
#endif
getDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceAutoconnect :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceAutoconnect o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"autoconnect"
setDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> Bool -> m ()
setDeviceAutoconnect :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> Bool -> m ()
setDeviceAutoconnect o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"autoconnect" Bool
val
constructDeviceAutoconnect :: (IsDevice o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructDeviceAutoconnect :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructDeviceAutoconnect Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"autoconnect" Bool
val
#if defined(ENABLE_OVERLOADING)
data DeviceAutoconnectPropertyInfo
instance AttrInfo DeviceAutoconnectPropertyInfo where
type AttrAllowedOps DeviceAutoconnectPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DeviceAutoconnectPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceAutoconnectPropertyInfo = (~) Bool
type AttrTransferTypeConstraint DeviceAutoconnectPropertyInfo = (~) Bool
type AttrTransferType DeviceAutoconnectPropertyInfo = Bool
type AttrGetType DeviceAutoconnectPropertyInfo = Bool
type AttrLabel DeviceAutoconnectPropertyInfo = "autoconnect"
type AttrOrigin DeviceAutoconnectPropertyInfo = Device
attrGet = getDeviceAutoconnect
attrSet = setDeviceAutoconnect
attrTransfer _ v = do
return v
attrConstruct = constructDeviceAutoconnect
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.autoconnect"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:autoconnect"
})
#endif
#if defined(ENABLE_OVERLOADING)
data DeviceAvailableConnectionsPropertyInfo
instance AttrInfo DeviceAvailableConnectionsPropertyInfo where
type AttrAllowedOps DeviceAvailableConnectionsPropertyInfo = '[]
type AttrSetTypeConstraint DeviceAvailableConnectionsPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceAvailableConnectionsPropertyInfo = (~) ()
type AttrTransferType DeviceAvailableConnectionsPropertyInfo = ()
type AttrBaseTypeConstraint DeviceAvailableConnectionsPropertyInfo = (~) ()
type AttrGetType DeviceAvailableConnectionsPropertyInfo = ()
type AttrLabel DeviceAvailableConnectionsPropertyInfo = ""
type AttrOrigin DeviceAvailableConnectionsPropertyInfo = Device
attrGet = undefined
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
#endif
getDeviceCapabilities :: (MonadIO m, IsDevice o) => o -> m [NM.Flags.DeviceCapabilities]
getDeviceCapabilities :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m [DeviceCapabilities]
getDeviceCapabilities o
obj = IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [DeviceCapabilities] -> m [DeviceCapabilities])
-> IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [DeviceCapabilities]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"capabilities"
#if defined(ENABLE_OVERLOADING)
data DeviceCapabilitiesPropertyInfo
instance AttrInfo DeviceCapabilitiesPropertyInfo where
type AttrAllowedOps DeviceCapabilitiesPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceCapabilitiesPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceCapabilitiesPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceCapabilitiesPropertyInfo = (~) ()
type AttrTransferType DeviceCapabilitiesPropertyInfo = ()
type AttrGetType DeviceCapabilitiesPropertyInfo = [NM.Flags.DeviceCapabilities]
type AttrLabel DeviceCapabilitiesPropertyInfo = "capabilities"
type AttrOrigin DeviceCapabilitiesPropertyInfo = Device
attrGet = getDeviceCapabilities
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.capabilities"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:capabilities"
})
#endif
getDeviceDeviceType :: (MonadIO m, IsDevice o) => o -> m NM.Enums.DeviceType
getDeviceDeviceType :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DeviceType
getDeviceDeviceType o
obj = IO DeviceType -> m DeviceType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceType -> m DeviceType) -> IO DeviceType -> m DeviceType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DeviceType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"device-type"
#if defined(ENABLE_OVERLOADING)
data DeviceDeviceTypePropertyInfo
instance AttrInfo DeviceDeviceTypePropertyInfo where
type AttrAllowedOps DeviceDeviceTypePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceDeviceTypePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDeviceTypePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceDeviceTypePropertyInfo = (~) ()
type AttrTransferType DeviceDeviceTypePropertyInfo = ()
type AttrGetType DeviceDeviceTypePropertyInfo = NM.Enums.DeviceType
type AttrLabel DeviceDeviceTypePropertyInfo = "device-type"
type AttrOrigin DeviceDeviceTypePropertyInfo = Device
attrGet = getDeviceDeviceType
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceType"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:deviceType"
})
#endif
getDeviceDhcp4Config :: (MonadIO m, IsDevice o) => o -> m NM.DhcpConfig.DhcpConfig
getDeviceDhcp4Config :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DhcpConfig
getDeviceDhcp4Config o
obj = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDhcp4Config" (IO (Maybe DhcpConfig) -> IO DhcpConfig)
-> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DhcpConfig -> DhcpConfig)
-> IO (Maybe DhcpConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"dhcp4-config" ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig
#if defined(ENABLE_OVERLOADING)
data DeviceDhcp4ConfigPropertyInfo
instance AttrInfo DeviceDhcp4ConfigPropertyInfo where
type AttrAllowedOps DeviceDhcp4ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceDhcp4ConfigPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDhcp4ConfigPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceDhcp4ConfigPropertyInfo = (~) ()
type AttrTransferType DeviceDhcp4ConfigPropertyInfo = ()
type AttrGetType DeviceDhcp4ConfigPropertyInfo = NM.DhcpConfig.DhcpConfig
type AttrLabel DeviceDhcp4ConfigPropertyInfo = "dhcp4-config"
type AttrOrigin DeviceDhcp4ConfigPropertyInfo = Device
attrGet = getDeviceDhcp4Config
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.dhcp4Config"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:dhcp4Config"
})
#endif
getDeviceDhcp6Config :: (MonadIO m, IsDevice o) => o -> m NM.DhcpConfig.DhcpConfig
getDeviceDhcp6Config :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DhcpConfig
getDeviceDhcp6Config o
obj = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDhcp6Config" (IO (Maybe DhcpConfig) -> IO DhcpConfig)
-> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DhcpConfig -> DhcpConfig)
-> IO (Maybe DhcpConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"dhcp6-config" ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig
#if defined(ENABLE_OVERLOADING)
data DeviceDhcp6ConfigPropertyInfo
instance AttrInfo DeviceDhcp6ConfigPropertyInfo where
type AttrAllowedOps DeviceDhcp6ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceDhcp6ConfigPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDhcp6ConfigPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceDhcp6ConfigPropertyInfo = (~) ()
type AttrTransferType DeviceDhcp6ConfigPropertyInfo = ()
type AttrGetType DeviceDhcp6ConfigPropertyInfo = NM.DhcpConfig.DhcpConfig
type AttrLabel DeviceDhcp6ConfigPropertyInfo = "dhcp6-config"
type AttrOrigin DeviceDhcp6ConfigPropertyInfo = Device
attrGet = getDeviceDhcp6Config
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.dhcp6Config"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:dhcp6Config"
})
#endif
getDeviceDriver :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceDriver :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceDriver o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDriver" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"driver"
#if defined(ENABLE_OVERLOADING)
data DeviceDriverPropertyInfo
instance AttrInfo DeviceDriverPropertyInfo where
type AttrAllowedOps DeviceDriverPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceDriverPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDriverPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceDriverPropertyInfo = (~) ()
type AttrTransferType DeviceDriverPropertyInfo = ()
type AttrGetType DeviceDriverPropertyInfo = T.Text
type AttrLabel DeviceDriverPropertyInfo = "driver"
type AttrOrigin DeviceDriverPropertyInfo = Device
attrGet = getDeviceDriver
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.driver"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:driver"
})
#endif
getDeviceDriverVersion :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceDriverVersion :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceDriverVersion o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDriverVersion" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"driver-version"
#if defined(ENABLE_OVERLOADING)
data DeviceDriverVersionPropertyInfo
instance AttrInfo DeviceDriverVersionPropertyInfo where
type AttrAllowedOps DeviceDriverVersionPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceDriverVersionPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceDriverVersionPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceDriverVersionPropertyInfo = (~) ()
type AttrTransferType DeviceDriverVersionPropertyInfo = ()
type AttrGetType DeviceDriverVersionPropertyInfo = T.Text
type AttrLabel DeviceDriverVersionPropertyInfo = "driver-version"
type AttrOrigin DeviceDriverVersionPropertyInfo = Device
attrGet = getDeviceDriverVersion
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.driverVersion"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:driverVersion"
})
#endif
getDeviceFirmwareMissing :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceFirmwareMissing :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceFirmwareMissing o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"firmware-missing"
#if defined(ENABLE_OVERLOADING)
data DeviceFirmwareMissingPropertyInfo
instance AttrInfo DeviceFirmwareMissingPropertyInfo where
type AttrAllowedOps DeviceFirmwareMissingPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceFirmwareMissingPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceFirmwareMissingPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceFirmwareMissingPropertyInfo = (~) ()
type AttrTransferType DeviceFirmwareMissingPropertyInfo = ()
type AttrGetType DeviceFirmwareMissingPropertyInfo = Bool
type AttrLabel DeviceFirmwareMissingPropertyInfo = "firmware-missing"
type AttrOrigin DeviceFirmwareMissingPropertyInfo = Device
attrGet = getDeviceFirmwareMissing
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.firmwareMissing"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:firmwareMissing"
})
#endif
getDeviceFirmwareVersion :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceFirmwareVersion :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceFirmwareVersion o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceFirmwareVersion" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"firmware-version"
#if defined(ENABLE_OVERLOADING)
data DeviceFirmwareVersionPropertyInfo
instance AttrInfo DeviceFirmwareVersionPropertyInfo where
type AttrAllowedOps DeviceFirmwareVersionPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceFirmwareVersionPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceFirmwareVersionPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceFirmwareVersionPropertyInfo = (~) ()
type AttrTransferType DeviceFirmwareVersionPropertyInfo = ()
type AttrGetType DeviceFirmwareVersionPropertyInfo = T.Text
type AttrLabel DeviceFirmwareVersionPropertyInfo = "firmware-version"
type AttrOrigin DeviceFirmwareVersionPropertyInfo = Device
attrGet = getDeviceFirmwareVersion
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.firmwareVersion"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:firmwareVersion"
})
#endif
getDeviceHwAddress :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceHwAddress :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceHwAddress o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceHwAddress" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"hw-address"
#if defined(ENABLE_OVERLOADING)
data DeviceHwAddressPropertyInfo
instance AttrInfo DeviceHwAddressPropertyInfo where
type AttrAllowedOps DeviceHwAddressPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceHwAddressPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceHwAddressPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceHwAddressPropertyInfo = (~) ()
type AttrTransferType DeviceHwAddressPropertyInfo = ()
type AttrGetType DeviceHwAddressPropertyInfo = T.Text
type AttrLabel DeviceHwAddressPropertyInfo = "hw-address"
type AttrOrigin DeviceHwAddressPropertyInfo = Device
attrGet = getDeviceHwAddress
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.hwAddress"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:hwAddress"
})
#endif
getDeviceInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe T.Text)
getDeviceInterface :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Text)
getDeviceInterface o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"interface"
#if defined(ENABLE_OVERLOADING)
data DeviceInterfacePropertyInfo
instance AttrInfo DeviceInterfacePropertyInfo where
type AttrAllowedOps DeviceInterfacePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceInterfacePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceInterfacePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceInterfacePropertyInfo = (~) ()
type AttrTransferType DeviceInterfacePropertyInfo = ()
type AttrGetType DeviceInterfacePropertyInfo = (Maybe T.Text)
type AttrLabel DeviceInterfacePropertyInfo = "interface"
type AttrOrigin DeviceInterfacePropertyInfo = Device
attrGet = getDeviceInterface
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.interface"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:interface"
})
#endif
getDeviceInterfaceFlags :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceInterfaceFlags :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceInterfaceFlags o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"interface-flags"
#if defined(ENABLE_OVERLOADING)
data DeviceInterfaceFlagsPropertyInfo
instance AttrInfo DeviceInterfaceFlagsPropertyInfo where
type AttrAllowedOps DeviceInterfaceFlagsPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceInterfaceFlagsPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceInterfaceFlagsPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceInterfaceFlagsPropertyInfo = (~) ()
type AttrTransferType DeviceInterfaceFlagsPropertyInfo = ()
type AttrGetType DeviceInterfaceFlagsPropertyInfo = Word32
type AttrLabel DeviceInterfaceFlagsPropertyInfo = "interface-flags"
type AttrOrigin DeviceInterfaceFlagsPropertyInfo = Device
attrGet = getDeviceInterfaceFlags
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.interfaceFlags"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:interfaceFlags"
})
#endif
getDeviceIpInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe T.Text)
getDeviceIpInterface :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Text)
getDeviceIpInterface o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"ip-interface"
#if defined(ENABLE_OVERLOADING)
data DeviceIpInterfacePropertyInfo
instance AttrInfo DeviceIpInterfacePropertyInfo where
type AttrAllowedOps DeviceIpInterfacePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceIpInterfacePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceIpInterfacePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceIpInterfacePropertyInfo = (~) ()
type AttrTransferType DeviceIpInterfacePropertyInfo = ()
type AttrGetType DeviceIpInterfacePropertyInfo = (Maybe T.Text)
type AttrLabel DeviceIpInterfacePropertyInfo = "ip-interface"
type AttrOrigin DeviceIpInterfacePropertyInfo = Device
attrGet = getDeviceIpInterface
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.ipInterface"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ipInterface"
})
#endif
getDeviceIp4Config :: (MonadIO m, IsDevice o) => o -> m NM.IPConfig.IPConfig
getDeviceIp4Config :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m IPConfig
getDeviceIp4Config o
obj = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe IPConfig) -> IO IPConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceIp4Config" (IO (Maybe IPConfig) -> IO IPConfig)
-> IO (Maybe IPConfig) -> IO IPConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr IPConfig -> IPConfig)
-> IO (Maybe IPConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"ip4-config" ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig
#if defined(ENABLE_OVERLOADING)
data DeviceIp4ConfigPropertyInfo
instance AttrInfo DeviceIp4ConfigPropertyInfo where
type AttrAllowedOps DeviceIp4ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceIp4ConfigPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceIp4ConfigPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceIp4ConfigPropertyInfo = (~) ()
type AttrTransferType DeviceIp4ConfigPropertyInfo = ()
type AttrGetType DeviceIp4ConfigPropertyInfo = NM.IPConfig.IPConfig
type AttrLabel DeviceIp4ConfigPropertyInfo = "ip4-config"
type AttrOrigin DeviceIp4ConfigPropertyInfo = Device
attrGet = getDeviceIp4Config
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.ip4Config"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip4Config"
})
#endif
getDeviceIp4Connectivity :: (MonadIO m, IsDevice o) => o -> m NM.Enums.ConnectivityState
getDeviceIp4Connectivity :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m ConnectivityState
getDeviceIp4Connectivity o
obj = IO ConnectivityState -> m ConnectivityState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ConnectivityState -> m ConnectivityState)
-> IO ConnectivityState -> m ConnectivityState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ConnectivityState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"ip4-connectivity"
#if defined(ENABLE_OVERLOADING)
data DeviceIp4ConnectivityPropertyInfo
instance AttrInfo DeviceIp4ConnectivityPropertyInfo where
type AttrAllowedOps DeviceIp4ConnectivityPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceIp4ConnectivityPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceIp4ConnectivityPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceIp4ConnectivityPropertyInfo = (~) ()
type AttrTransferType DeviceIp4ConnectivityPropertyInfo = ()
type AttrGetType DeviceIp4ConnectivityPropertyInfo = NM.Enums.ConnectivityState
type AttrLabel DeviceIp4ConnectivityPropertyInfo = "ip4-connectivity"
type AttrOrigin DeviceIp4ConnectivityPropertyInfo = Device
attrGet = getDeviceIp4Connectivity
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.ip4Connectivity"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip4Connectivity"
})
#endif
getDeviceIp6Config :: (MonadIO m, IsDevice o) => o -> m NM.IPConfig.IPConfig
getDeviceIp6Config :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m IPConfig
getDeviceIp6Config o
obj = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe IPConfig) -> IO IPConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceIp6Config" (IO (Maybe IPConfig) -> IO IPConfig)
-> IO (Maybe IPConfig) -> IO IPConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr IPConfig -> IPConfig)
-> IO (Maybe IPConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"ip6-config" ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig
#if defined(ENABLE_OVERLOADING)
data DeviceIp6ConfigPropertyInfo
instance AttrInfo DeviceIp6ConfigPropertyInfo where
type AttrAllowedOps DeviceIp6ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceIp6ConfigPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceIp6ConfigPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceIp6ConfigPropertyInfo = (~) ()
type AttrTransferType DeviceIp6ConfigPropertyInfo = ()
type AttrGetType DeviceIp6ConfigPropertyInfo = NM.IPConfig.IPConfig
type AttrLabel DeviceIp6ConfigPropertyInfo = "ip6-config"
type AttrOrigin DeviceIp6ConfigPropertyInfo = Device
attrGet = getDeviceIp6Config
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.ip6Config"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip6Config"
})
#endif
getDeviceIp6Connectivity :: (MonadIO m, IsDevice o) => o -> m NM.Enums.ConnectivityState
getDeviceIp6Connectivity :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m ConnectivityState
getDeviceIp6Connectivity o
obj = IO ConnectivityState -> m ConnectivityState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ConnectivityState -> m ConnectivityState)
-> IO ConnectivityState -> m ConnectivityState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ConnectivityState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"ip6-connectivity"
#if defined(ENABLE_OVERLOADING)
data DeviceIp6ConnectivityPropertyInfo
instance AttrInfo DeviceIp6ConnectivityPropertyInfo where
type AttrAllowedOps DeviceIp6ConnectivityPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceIp6ConnectivityPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceIp6ConnectivityPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceIp6ConnectivityPropertyInfo = (~) ()
type AttrTransferType DeviceIp6ConnectivityPropertyInfo = ()
type AttrGetType DeviceIp6ConnectivityPropertyInfo = NM.Enums.ConnectivityState
type AttrLabel DeviceIp6ConnectivityPropertyInfo = "ip6-connectivity"
type AttrOrigin DeviceIp6ConnectivityPropertyInfo = Device
attrGet = getDeviceIp6Connectivity
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.ip6Connectivity"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip6Connectivity"
})
#endif
#if defined(ENABLE_OVERLOADING)
data DeviceLldpNeighborsPropertyInfo
instance AttrInfo DeviceLldpNeighborsPropertyInfo where
type AttrAllowedOps DeviceLldpNeighborsPropertyInfo = '[]
type AttrSetTypeConstraint DeviceLldpNeighborsPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceLldpNeighborsPropertyInfo = (~) ()
type AttrTransferType DeviceLldpNeighborsPropertyInfo = ()
type AttrBaseTypeConstraint DeviceLldpNeighborsPropertyInfo = (~) ()
type AttrGetType DeviceLldpNeighborsPropertyInfo = ()
type AttrLabel DeviceLldpNeighborsPropertyInfo = ""
type AttrOrigin DeviceLldpNeighborsPropertyInfo = Device
attrGet = undefined
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
#endif
getDeviceManaged :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceManaged :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceManaged o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"managed"
#if defined(ENABLE_OVERLOADING)
data DeviceManagedPropertyInfo
instance AttrInfo DeviceManagedPropertyInfo where
type AttrAllowedOps DeviceManagedPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceManagedPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceManagedPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceManagedPropertyInfo = (~) ()
type AttrTransferType DeviceManagedPropertyInfo = ()
type AttrGetType DeviceManagedPropertyInfo = Bool
type AttrLabel DeviceManagedPropertyInfo = "managed"
type AttrOrigin DeviceManagedPropertyInfo = Device
attrGet = getDeviceManaged
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.managed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:managed"
})
#endif
getDeviceMetered :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMetered :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMetered o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"metered"
#if defined(ENABLE_OVERLOADING)
data DeviceMeteredPropertyInfo
instance AttrInfo DeviceMeteredPropertyInfo where
type AttrAllowedOps DeviceMeteredPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceMeteredPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceMeteredPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceMeteredPropertyInfo = (~) ()
type AttrTransferType DeviceMeteredPropertyInfo = ()
type AttrGetType DeviceMeteredPropertyInfo = Word32
type AttrLabel DeviceMeteredPropertyInfo = "metered"
type AttrOrigin DeviceMeteredPropertyInfo = Device
attrGet = getDeviceMetered
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.metered"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:metered"
})
#endif
getDeviceMtu :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMtu :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMtu o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"mtu"
#if defined(ENABLE_OVERLOADING)
data DeviceMtuPropertyInfo
instance AttrInfo DeviceMtuPropertyInfo where
type AttrAllowedOps DeviceMtuPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceMtuPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceMtuPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceMtuPropertyInfo = (~) ()
type AttrTransferType DeviceMtuPropertyInfo = ()
type AttrGetType DeviceMtuPropertyInfo = Word32
type AttrLabel DeviceMtuPropertyInfo = "mtu"
type AttrOrigin DeviceMtuPropertyInfo = Device
attrGet = getDeviceMtu
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.mtu"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:mtu"
})
#endif
getDeviceNmPluginMissing :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceNmPluginMissing :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceNmPluginMissing o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"nm-plugin-missing"
#if defined(ENABLE_OVERLOADING)
data DeviceNmPluginMissingPropertyInfo
instance AttrInfo DeviceNmPluginMissingPropertyInfo where
type AttrAllowedOps DeviceNmPluginMissingPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceNmPluginMissingPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceNmPluginMissingPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceNmPluginMissingPropertyInfo = (~) ()
type AttrTransferType DeviceNmPluginMissingPropertyInfo = ()
type AttrGetType DeviceNmPluginMissingPropertyInfo = Bool
type AttrLabel DeviceNmPluginMissingPropertyInfo = "nm-plugin-missing"
type AttrOrigin DeviceNmPluginMissingPropertyInfo = Device
attrGet = getDeviceNmPluginMissing
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.nmPluginMissing"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:nmPluginMissing"
})
#endif
getDevicePath :: (MonadIO m, IsDevice o) => o -> m T.Text
getDevicePath :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDevicePath o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDevicePath" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"path"
#if defined(ENABLE_OVERLOADING)
data DevicePathPropertyInfo
instance AttrInfo DevicePathPropertyInfo where
type AttrAllowedOps DevicePathPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DevicePathPropertyInfo = IsDevice
type AttrSetTypeConstraint DevicePathPropertyInfo = (~) ()
type AttrTransferTypeConstraint DevicePathPropertyInfo = (~) ()
type AttrTransferType DevicePathPropertyInfo = ()
type AttrGetType DevicePathPropertyInfo = T.Text
type AttrLabel DevicePathPropertyInfo = "path"
type AttrOrigin DevicePathPropertyInfo = Device
attrGet = getDevicePath
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.path"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:path"
})
#endif
getDevicePhysicalPortId :: (MonadIO m, IsDevice o) => o -> m T.Text
getDevicePhysicalPortId :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDevicePhysicalPortId o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDevicePhysicalPortId" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"physical-port-id"
#if defined(ENABLE_OVERLOADING)
data DevicePhysicalPortIdPropertyInfo
instance AttrInfo DevicePhysicalPortIdPropertyInfo where
type AttrAllowedOps DevicePhysicalPortIdPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DevicePhysicalPortIdPropertyInfo = IsDevice
type AttrSetTypeConstraint DevicePhysicalPortIdPropertyInfo = (~) ()
type AttrTransferTypeConstraint DevicePhysicalPortIdPropertyInfo = (~) ()
type AttrTransferType DevicePhysicalPortIdPropertyInfo = ()
type AttrGetType DevicePhysicalPortIdPropertyInfo = T.Text
type AttrLabel DevicePhysicalPortIdPropertyInfo = "physical-port-id"
type AttrOrigin DevicePhysicalPortIdPropertyInfo = Device
attrGet = getDevicePhysicalPortId
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.physicalPortId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:physicalPortId"
})
#endif
#if defined(ENABLE_OVERLOADING)
data DevicePortsPropertyInfo
instance AttrInfo DevicePortsPropertyInfo where
type AttrAllowedOps DevicePortsPropertyInfo = '[]
type AttrSetTypeConstraint DevicePortsPropertyInfo = (~) ()
type AttrTransferTypeConstraint DevicePortsPropertyInfo = (~) ()
type AttrTransferType DevicePortsPropertyInfo = ()
type AttrBaseTypeConstraint DevicePortsPropertyInfo = (~) ()
type AttrGetType DevicePortsPropertyInfo = ()
type AttrLabel DevicePortsPropertyInfo = ""
type AttrOrigin DevicePortsPropertyInfo = Device
attrGet = undefined
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
#endif
getDeviceProduct :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceProduct :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceProduct o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceProduct" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"product"
#if defined(ENABLE_OVERLOADING)
data DeviceProductPropertyInfo
instance AttrInfo DeviceProductPropertyInfo where
type AttrAllowedOps DeviceProductPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceProductPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceProductPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceProductPropertyInfo = (~) ()
type AttrTransferType DeviceProductPropertyInfo = ()
type AttrGetType DeviceProductPropertyInfo = T.Text
type AttrLabel DeviceProductPropertyInfo = "product"
type AttrOrigin DeviceProductPropertyInfo = Device
attrGet = getDeviceProduct
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.product"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:product"
})
#endif
getDeviceReal :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceReal :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceReal o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"real"
#if defined(ENABLE_OVERLOADING)
data DeviceRealPropertyInfo
instance AttrInfo DeviceRealPropertyInfo where
type AttrAllowedOps DeviceRealPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceRealPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceRealPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceRealPropertyInfo = (~) ()
type AttrTransferType DeviceRealPropertyInfo = ()
type AttrGetType DeviceRealPropertyInfo = Bool
type AttrLabel DeviceRealPropertyInfo = "real"
type AttrOrigin DeviceRealPropertyInfo = Device
attrGet = getDeviceReal
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.real"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:real"
})
#endif
getDeviceState :: (MonadIO m, IsDevice o) => o -> m NM.Enums.DeviceState
getDeviceState :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DeviceState
getDeviceState o
obj = IO DeviceState -> m DeviceState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceState -> m DeviceState)
-> IO DeviceState -> m DeviceState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DeviceState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"state"
#if defined(ENABLE_OVERLOADING)
data DeviceStatePropertyInfo
instance AttrInfo DeviceStatePropertyInfo where
type AttrAllowedOps DeviceStatePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceStatePropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceStatePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceStatePropertyInfo = (~) ()
type AttrTransferType DeviceStatePropertyInfo = ()
type AttrGetType DeviceStatePropertyInfo = NM.Enums.DeviceState
type AttrLabel DeviceStatePropertyInfo = "state"
type AttrOrigin DeviceStatePropertyInfo = Device
attrGet = getDeviceState
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.state"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:state"
})
#endif
getDeviceStateReason :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceStateReason :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceStateReason o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"state-reason"
#if defined(ENABLE_OVERLOADING)
data DeviceStateReasonPropertyInfo
instance AttrInfo DeviceStateReasonPropertyInfo where
type AttrAllowedOps DeviceStateReasonPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceStateReasonPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceStateReasonPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceStateReasonPropertyInfo = (~) ()
type AttrTransferType DeviceStateReasonPropertyInfo = ()
type AttrGetType DeviceStateReasonPropertyInfo = Word32
type AttrLabel DeviceStateReasonPropertyInfo = "state-reason"
type AttrOrigin DeviceStateReasonPropertyInfo = Device
attrGet = getDeviceStateReason
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.stateReason"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:stateReason"
})
#endif
getDeviceUdi :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceUdi :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceUdi o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceUdi" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"udi"
#if defined(ENABLE_OVERLOADING)
data DeviceUdiPropertyInfo
instance AttrInfo DeviceUdiPropertyInfo where
type AttrAllowedOps DeviceUdiPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceUdiPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceUdiPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceUdiPropertyInfo = (~) ()
type AttrTransferType DeviceUdiPropertyInfo = ()
type AttrGetType DeviceUdiPropertyInfo = T.Text
type AttrLabel DeviceUdiPropertyInfo = "udi"
type AttrOrigin DeviceUdiPropertyInfo = Device
attrGet = getDeviceUdi
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.udi"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:udi"
})
#endif
getDeviceVendor :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceVendor :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceVendor o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceVendor" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"vendor"
#if defined(ENABLE_OVERLOADING)
data DeviceVendorPropertyInfo
instance AttrInfo DeviceVendorPropertyInfo where
type AttrAllowedOps DeviceVendorPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceVendorPropertyInfo = IsDevice
type AttrSetTypeConstraint DeviceVendorPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceVendorPropertyInfo = (~) ()
type AttrTransferType DeviceVendorPropertyInfo = ()
type AttrGetType DeviceVendorPropertyInfo = T.Text
type AttrLabel DeviceVendorPropertyInfo = "vendor"
type AttrOrigin DeviceVendorPropertyInfo = Device
attrGet = getDeviceVendor
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.vendor"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:vendor"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Device
type instance O.AttributeList Device = DeviceAttributeList
type DeviceAttributeList = ('[ '("activeConnection", DeviceActiveConnectionPropertyInfo), '("autoconnect", DeviceAutoconnectPropertyInfo), '("availableConnections", DeviceAvailableConnectionsPropertyInfo), '("capabilities", DeviceCapabilitiesPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("deviceType", DeviceDeviceTypePropertyInfo), '("dhcp4Config", DeviceDhcp4ConfigPropertyInfo), '("dhcp6Config", DeviceDhcp6ConfigPropertyInfo), '("driver", DeviceDriverPropertyInfo), '("driverVersion", DeviceDriverVersionPropertyInfo), '("firmwareMissing", DeviceFirmwareMissingPropertyInfo), '("firmwareVersion", DeviceFirmwareVersionPropertyInfo), '("hwAddress", DeviceHwAddressPropertyInfo), '("interface", DeviceInterfacePropertyInfo), '("interfaceFlags", DeviceInterfaceFlagsPropertyInfo), '("ipInterface", DeviceIpInterfacePropertyInfo), '("ip4Config", DeviceIp4ConfigPropertyInfo), '("ip4Connectivity", DeviceIp4ConnectivityPropertyInfo), '("ip6Config", DeviceIp6ConfigPropertyInfo), '("ip6Connectivity", DeviceIp6ConnectivityPropertyInfo), '("lldpNeighbors", DeviceLldpNeighborsPropertyInfo), '("managed", DeviceManagedPropertyInfo), '("metered", DeviceMeteredPropertyInfo), '("mtu", DeviceMtuPropertyInfo), '("nmPluginMissing", DeviceNmPluginMissingPropertyInfo), '("path", DevicePathPropertyInfo), '("physicalPortId", DevicePhysicalPortIdPropertyInfo), '("ports", DevicePortsPropertyInfo), '("product", DeviceProductPropertyInfo), '("real", DeviceRealPropertyInfo), '("state", DeviceStatePropertyInfo), '("stateReason", DeviceStateReasonPropertyInfo), '("udi", DeviceUdiPropertyInfo), '("vendor", DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceActiveConnection :: AttrLabelProxy "activeConnection"
deviceActiveConnection = AttrLabelProxy
deviceAutoconnect :: AttrLabelProxy "autoconnect"
deviceAutoconnect = AttrLabelProxy
deviceAvailableConnections :: AttrLabelProxy "availableConnections"
deviceAvailableConnections = AttrLabelProxy
deviceCapabilities :: AttrLabelProxy "capabilities"
deviceCapabilities = AttrLabelProxy
deviceDeviceType :: AttrLabelProxy "deviceType"
deviceDeviceType = AttrLabelProxy
deviceDhcp4Config :: AttrLabelProxy "dhcp4Config"
deviceDhcp4Config = AttrLabelProxy
deviceDhcp6Config :: AttrLabelProxy "dhcp6Config"
deviceDhcp6Config = AttrLabelProxy
deviceDriver :: AttrLabelProxy "driver"
deviceDriver = AttrLabelProxy
deviceDriverVersion :: AttrLabelProxy "driverVersion"
deviceDriverVersion = AttrLabelProxy
deviceFirmwareMissing :: AttrLabelProxy "firmwareMissing"
deviceFirmwareMissing = AttrLabelProxy
deviceFirmwareVersion :: AttrLabelProxy "firmwareVersion"
deviceFirmwareVersion = AttrLabelProxy
deviceHwAddress :: AttrLabelProxy "hwAddress"
deviceHwAddress = AttrLabelProxy
deviceInterface :: AttrLabelProxy "interface"
deviceInterface = AttrLabelProxy
deviceInterfaceFlags :: AttrLabelProxy "interfaceFlags"
deviceInterfaceFlags = AttrLabelProxy
deviceIpInterface :: AttrLabelProxy "ipInterface"
deviceIpInterface = AttrLabelProxy
deviceIp4Config :: AttrLabelProxy "ip4Config"
deviceIp4Config = AttrLabelProxy
deviceIp4Connectivity :: AttrLabelProxy "ip4Connectivity"
deviceIp4Connectivity = AttrLabelProxy
deviceIp6Config :: AttrLabelProxy "ip6Config"
deviceIp6Config = AttrLabelProxy
deviceIp6Connectivity :: AttrLabelProxy "ip6Connectivity"
deviceIp6Connectivity = AttrLabelProxy
deviceLldpNeighbors :: AttrLabelProxy "lldpNeighbors"
deviceLldpNeighbors = AttrLabelProxy
deviceManaged :: AttrLabelProxy "managed"
deviceManaged = AttrLabelProxy
deviceMetered :: AttrLabelProxy "metered"
deviceMetered = AttrLabelProxy
deviceMtu :: AttrLabelProxy "mtu"
deviceMtu = AttrLabelProxy
deviceNmPluginMissing :: AttrLabelProxy "nmPluginMissing"
deviceNmPluginMissing = AttrLabelProxy
devicePath :: AttrLabelProxy "path"
devicePath = AttrLabelProxy
devicePhysicalPortId :: AttrLabelProxy "physicalPortId"
devicePhysicalPortId = AttrLabelProxy
devicePorts :: AttrLabelProxy "ports"
devicePorts = AttrLabelProxy
deviceProduct :: AttrLabelProxy "product"
deviceProduct = AttrLabelProxy
deviceReal :: AttrLabelProxy "real"
deviceReal = AttrLabelProxy
deviceState :: AttrLabelProxy "state"
deviceState = AttrLabelProxy
deviceStateReason :: AttrLabelProxy "stateReason"
deviceStateReason = AttrLabelProxy
deviceUdi :: AttrLabelProxy "udi"
deviceUdi = AttrLabelProxy
deviceVendor :: AttrLabelProxy "vendor"
deviceVendor = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Device = DeviceSignalList
type DeviceSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_device_connection_compatible" nm_device_connection_compatible ::
Ptr Device ->
Ptr NM.Connection.Connection ->
Ptr (Ptr GError) ->
IO CInt
deviceConnectionCompatible ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b) =>
a
-> b
-> m ()
deviceConnectionCompatible :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b) =>
a -> b -> m ()
deviceConnectionCompatible a
device b
connection = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Connection
connection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
connection
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr Connection -> Ptr (Ptr GError) -> IO CInt
nm_device_connection_compatible Ptr Device
device' Ptr Connection
connection'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
connection
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceConnectionCompatibleMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, NM.Connection.IsConnection b) => O.OverloadedMethod DeviceConnectionCompatibleMethodInfo a signature where
overloadedMethod = deviceConnectionCompatible
instance O.OverloadedMethodInfo DeviceConnectionCompatibleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceConnectionCompatible",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceConnectionCompatible"
})
#endif
foreign import ccall "nm_device_connection_valid" nm_device_connection_valid ::
Ptr Device ->
Ptr NM.Connection.Connection ->
IO CInt
deviceConnectionValid ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b) =>
a
-> b
-> m Bool
deviceConnectionValid :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b) =>
a -> b -> m Bool
deviceConnectionValid a
device b
connection = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Connection
connection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
connection
CInt
result <- Ptr Device -> Ptr Connection -> IO CInt
nm_device_connection_valid Ptr Device
device' Ptr Connection
connection'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
connection
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceConnectionValidMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDevice a, NM.Connection.IsConnection b) => O.OverloadedMethod DeviceConnectionValidMethodInfo a signature where
overloadedMethod = deviceConnectionValid
instance O.OverloadedMethodInfo DeviceConnectionValidMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceConnectionValid",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceConnectionValid"
})
#endif
foreign import ccall "nm_device_delete" nm_device_delete ::
Ptr Device ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
{-# DEPRECATED deviceDelete ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceDeleteAsync' or GDBusConnection."] #-}
deviceDelete ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
deviceDelete :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> m ()
deviceDelete a
device Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
nm_device_delete Ptr Device
device' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceDeleteMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDeleteMethodInfo a signature where
overloadedMethod = deviceDelete
instance O.OverloadedMethodInfo DeviceDeleteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDelete",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDelete"
})
#endif
foreign import ccall "nm_device_delete_async" nm_device_delete_async ::
Ptr Device ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
deviceDeleteAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
deviceDeleteAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
deviceDeleteAsync a
device Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Device
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_delete_async Ptr Device
device' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceDeleteAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDeleteAsyncMethodInfo a signature where
overloadedMethod = deviceDeleteAsync
instance O.OverloadedMethodInfo DeviceDeleteAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDeleteAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDeleteAsync"
})
#endif
foreign import ccall "nm_device_delete_finish" nm_device_delete_finish ::
Ptr Device ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
deviceDeleteFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
deviceDeleteFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m ()
deviceDeleteFinish a
device b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
nm_device_delete_finish Ptr Device
device' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceDeleteFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceDeleteFinishMethodInfo a signature where
overloadedMethod = deviceDeleteFinish
instance O.OverloadedMethodInfo DeviceDeleteFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDeleteFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDeleteFinish"
})
#endif
foreign import ccall "nm_device_disconnect" nm_device_disconnect ::
Ptr Device ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
{-# DEPRECATED deviceDisconnect ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceDisconnectAsync' or GDBusConnection."] #-}
deviceDisconnect ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
deviceDisconnect :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> m ()
deviceDisconnect a
device Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
nm_device_disconnect Ptr Device
device' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceDisconnectMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDisconnectMethodInfo a signature where
overloadedMethod = deviceDisconnect
instance O.OverloadedMethodInfo DeviceDisconnectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDisconnect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDisconnect"
})
#endif
foreign import ccall "nm_device_disconnect_async" nm_device_disconnect_async ::
Ptr Device ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
deviceDisconnectAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
deviceDisconnectAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
deviceDisconnectAsync a
device Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Device
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_disconnect_async Ptr Device
device' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceDisconnectAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDisconnectAsyncMethodInfo a signature where
overloadedMethod = deviceDisconnectAsync
instance O.OverloadedMethodInfo DeviceDisconnectAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDisconnectAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDisconnectAsync"
})
#endif
foreign import ccall "nm_device_disconnect_finish" nm_device_disconnect_finish ::
Ptr Device ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
deviceDisconnectFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
deviceDisconnectFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m ()
deviceDisconnectFinish a
device b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
nm_device_disconnect_finish Ptr Device
device' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceDisconnectFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceDisconnectFinishMethodInfo a signature where
overloadedMethod = deviceDisconnectFinish
instance O.OverloadedMethodInfo DeviceDisconnectFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDisconnectFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDisconnectFinish"
})
#endif
foreign import ccall "nm_device_filter_connections" nm_device_filter_connections ::
Ptr Device ->
Ptr (GPtrArray (Ptr NM.Connection.Connection)) ->
IO (Ptr (GPtrArray (Ptr NM.Connection.Connection)))
deviceFilterConnections ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> [NM.Connection.Connection]
-> m [NM.Connection.Connection]
deviceFilterConnections :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> [Connection] -> m [Connection]
deviceFilterConnections a
device [Connection]
connections = IO [Connection] -> m [Connection]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Connection] -> m [Connection])
-> IO [Connection] -> m [Connection]
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
[Ptr Connection]
connections' <- (Connection -> IO (Ptr Connection))
-> [Connection] -> IO [Ptr Connection]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Connection -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Connection]
connections
Ptr (GPtrArray (Ptr Connection))
connections'' <- [Ptr Connection] -> IO (Ptr (GPtrArray (Ptr Connection)))
forall a. [Ptr a] -> IO (Ptr (GPtrArray (Ptr a)))
packGPtrArray [Ptr Connection]
connections'
Ptr (GPtrArray (Ptr Connection))
result <- Ptr Device
-> Ptr (GPtrArray (Ptr Connection))
-> IO (Ptr (GPtrArray (Ptr Connection)))
nm_device_filter_connections Ptr Device
device' Ptr (GPtrArray (Ptr Connection))
connections''
Text -> Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceFilterConnections" Ptr (GPtrArray (Ptr Connection))
result
[Ptr Connection]
result' <- Ptr (GPtrArray (Ptr Connection)) -> IO [Ptr Connection]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Connection))
result
[Connection]
result'' <- (Ptr Connection -> IO Connection)
-> [Ptr Connection] -> IO [Connection]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) [Ptr Connection]
result'
Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Connection))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
(Connection -> IO ()) -> [Connection] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Connection -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Connection]
connections
Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Connection))
connections''
[Connection] -> IO [Connection]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Connection]
result''
#if defined(ENABLE_OVERLOADING)
data DeviceFilterConnectionsMethodInfo
instance (signature ~ ([NM.Connection.Connection] -> m [NM.Connection.Connection]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceFilterConnectionsMethodInfo a signature where
overloadedMethod = deviceFilterConnections
instance O.OverloadedMethodInfo DeviceFilterConnectionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceFilterConnections",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceFilterConnections"
})
#endif
foreign import ccall "nm_device_get_active_connection" nm_device_get_active_connection ::
Ptr Device ->
IO (Ptr NM.ActiveConnection.ActiveConnection)
deviceGetActiveConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.ActiveConnection.ActiveConnection
deviceGetActiveConnection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m ActiveConnection
deviceGetActiveConnection a
device = IO ActiveConnection -> m ActiveConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ActiveConnection -> m ActiveConnection)
-> IO ActiveConnection -> m ActiveConnection
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr ActiveConnection
result <- Ptr Device -> IO (Ptr ActiveConnection)
nm_device_get_active_connection Ptr Device
device'
Text -> Ptr ActiveConnection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetActiveConnection" Ptr ActiveConnection
result
ActiveConnection
result' <- ((ManagedPtr ActiveConnection -> ActiveConnection)
-> Ptr ActiveConnection -> IO ActiveConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ActiveConnection -> ActiveConnection
NM.ActiveConnection.ActiveConnection) Ptr ActiveConnection
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
ActiveConnection -> IO ActiveConnection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ActiveConnection
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetActiveConnectionMethodInfo
instance (signature ~ (m NM.ActiveConnection.ActiveConnection), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetActiveConnectionMethodInfo a signature where
overloadedMethod = deviceGetActiveConnection
instance O.OverloadedMethodInfo DeviceGetActiveConnectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetActiveConnection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetActiveConnection"
})
#endif
foreign import ccall "nm_device_get_applied_connection" nm_device_get_applied_connection ::
Ptr Device ->
Word32 ->
Ptr Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr NM.Connection.Connection)
{-# DEPRECATED deviceGetAppliedConnection ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceGetAppliedConnectionAsync' or GDBusConnection."] #-}
deviceGetAppliedConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
a
-> Word32
-> Maybe (b)
-> m ((NM.Connection.Connection, Word64))
deviceGetAppliedConnection :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Word32 -> Maybe b -> m (Connection, Word64)
deviceGetAppliedConnection a
device Word32
flags Maybe b
cancellable = IO (Connection, Word64) -> m (Connection, Word64)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Connection, Word64) -> m (Connection, Word64))
-> IO (Connection, Word64) -> m (Connection, Word64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Word64
versionId <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO (Connection, Word64) -> IO () -> IO (Connection, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Connection
result <- (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection))
-> (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a b. (a -> b) -> a -> b
$ Ptr Device
-> Word32
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr Connection)
nm_device_get_applied_connection Ptr Device
device' Word32
flags Ptr Word64
versionId Ptr Cancellable
maybeCancellable
Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetAppliedConnection" Ptr Connection
result
Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
Word64
versionId' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
versionId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
(Connection, Word64) -> IO (Connection, Word64)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Connection
result', Word64
versionId')
) (do
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
)
#if defined(ENABLE_OVERLOADING)
data DeviceGetAppliedConnectionMethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> m ((NM.Connection.Connection, Word64))), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceGetAppliedConnectionMethodInfo a signature where
overloadedMethod = deviceGetAppliedConnection
instance O.OverloadedMethodInfo DeviceGetAppliedConnectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAppliedConnection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAppliedConnection"
})
#endif
foreign import ccall "nm_device_get_applied_connection_async" nm_device_get_applied_connection_async ::
Ptr Device ->
Word32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
deviceGetAppliedConnectionAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
a
-> Word32
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
deviceGetAppliedConnectionAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Word32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
deviceGetAppliedConnectionAsync a
device Word32
flags Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Device
-> Word32
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_get_applied_connection_async Ptr Device
device' Word32
flags Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceGetAppliedConnectionAsyncMethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceGetAppliedConnectionAsyncMethodInfo a signature where
overloadedMethod = deviceGetAppliedConnectionAsync
instance O.OverloadedMethodInfo DeviceGetAppliedConnectionAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAppliedConnectionAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAppliedConnectionAsync"
})
#endif
foreign import ccall "nm_device_get_applied_connection_finish" nm_device_get_applied_connection_finish ::
Ptr Device ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr Word64 ->
Ptr (Ptr GError) ->
IO (Ptr NM.Connection.Connection)
deviceGetAppliedConnectionFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ((NM.Connection.Connection, Word64))
deviceGetAppliedConnectionFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m (Connection, Word64)
deviceGetAppliedConnectionFinish a
device b
result_ = IO (Connection, Word64) -> m (Connection, Word64)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Connection, Word64) -> m (Connection, Word64))
-> IO (Connection, Word64) -> m (Connection, Word64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
Ptr Word64
versionId <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
IO (Connection, Word64) -> IO () -> IO (Connection, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Connection
result <- (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection))
-> (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a b. (a -> b) -> a -> b
$ Ptr Device
-> Ptr AsyncResult
-> Ptr Word64
-> Ptr (Ptr GError)
-> IO (Ptr Connection)
nm_device_get_applied_connection_finish Ptr Device
device' Ptr AsyncResult
result_' Ptr Word64
versionId
Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetAppliedConnectionFinish" Ptr Connection
result
Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
Word64
versionId' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
versionId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
(Connection, Word64) -> IO (Connection, Word64)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Connection
result', Word64
versionId')
) (do
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
)
#if defined(ENABLE_OVERLOADING)
data DeviceGetAppliedConnectionFinishMethodInfo
instance (signature ~ (b -> m ((NM.Connection.Connection, Word64))), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceGetAppliedConnectionFinishMethodInfo a signature where
overloadedMethod = deviceGetAppliedConnectionFinish
instance O.OverloadedMethodInfo DeviceGetAppliedConnectionFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAppliedConnectionFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAppliedConnectionFinish"
})
#endif
foreign import ccall "nm_device_get_autoconnect" nm_device_get_autoconnect ::
Ptr Device ->
IO CInt
deviceGetAutoconnect ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceGetAutoconnect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetAutoconnect a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr Device -> IO CInt
nm_device_get_autoconnect Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetAutoconnectMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAutoconnectMethodInfo a signature where
overloadedMethod = deviceGetAutoconnect
instance O.OverloadedMethodInfo DeviceGetAutoconnectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAutoconnect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAutoconnect"
})
#endif
foreign import ccall "nm_device_get_available_connections" nm_device_get_available_connections ::
Ptr Device ->
IO (Ptr (GPtrArray (Ptr NM.RemoteConnection.RemoteConnection)))
deviceGetAvailableConnections ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [NM.RemoteConnection.RemoteConnection]
deviceGetAvailableConnections :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [RemoteConnection]
deviceGetAvailableConnections a
device = IO [RemoteConnection] -> m [RemoteConnection]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [RemoteConnection] -> m [RemoteConnection])
-> IO [RemoteConnection] -> m [RemoteConnection]
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr (GPtrArray (Ptr RemoteConnection))
result <- Ptr Device -> IO (Ptr (GPtrArray (Ptr RemoteConnection)))
nm_device_get_available_connections Ptr Device
device'
Text -> Ptr (GPtrArray (Ptr RemoteConnection)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetAvailableConnections" Ptr (GPtrArray (Ptr RemoteConnection))
result
[Ptr RemoteConnection]
result' <- Ptr (GPtrArray (Ptr RemoteConnection)) -> IO [Ptr RemoteConnection]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr RemoteConnection))
result
[RemoteConnection]
result'' <- (Ptr RemoteConnection -> IO RemoteConnection)
-> [Ptr RemoteConnection] -> IO [RemoteConnection]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr RemoteConnection -> RemoteConnection)
-> Ptr RemoteConnection -> IO RemoteConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr RemoteConnection -> RemoteConnection
NM.RemoteConnection.RemoteConnection) [Ptr RemoteConnection]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
[RemoteConnection] -> IO [RemoteConnection]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [RemoteConnection]
result''
#if defined(ENABLE_OVERLOADING)
data DeviceGetAvailableConnectionsMethodInfo
instance (signature ~ (m [NM.RemoteConnection.RemoteConnection]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAvailableConnectionsMethodInfo a signature where
overloadedMethod = deviceGetAvailableConnections
instance O.OverloadedMethodInfo DeviceGetAvailableConnectionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAvailableConnections",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAvailableConnections"
})
#endif
foreign import ccall "nm_device_get_capabilities" nm_device_get_capabilities ::
Ptr Device ->
IO CUInt
deviceGetCapabilities ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [NM.Flags.DeviceCapabilities]
deviceGetCapabilities :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [DeviceCapabilities]
deviceGetCapabilities a
device = IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DeviceCapabilities] -> m [DeviceCapabilities])
-> IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_capabilities Ptr Device
device'
let result' :: [DeviceCapabilities]
result' = CUInt -> [DeviceCapabilities]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
[DeviceCapabilities] -> IO [DeviceCapabilities]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [DeviceCapabilities]
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetCapabilitiesMethodInfo
instance (signature ~ (m [NM.Flags.DeviceCapabilities]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetCapabilitiesMethodInfo a signature where
overloadedMethod = deviceGetCapabilities
instance O.OverloadedMethodInfo DeviceGetCapabilitiesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetCapabilities",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetCapabilities"
})
#endif
foreign import ccall "nm_device_get_connectivity" nm_device_get_connectivity ::
Ptr Device ->
Int32 ->
IO CUInt
deviceGetConnectivity ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Int32
-> m NM.Enums.ConnectivityState
deviceGetConnectivity :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Int32 -> m ConnectivityState
deviceGetConnectivity a
device Int32
addrFamily = IO ConnectivityState -> m ConnectivityState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ConnectivityState -> m ConnectivityState)
-> IO ConnectivityState -> m ConnectivityState
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> Int32 -> IO CUInt
nm_device_get_connectivity Ptr Device
device' Int32
addrFamily
let result' :: ConnectivityState
result' = (Int -> ConnectivityState
forall a. Enum a => Int -> a
toEnum (Int -> ConnectivityState)
-> (CUInt -> Int) -> CUInt -> ConnectivityState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
ConnectivityState -> IO ConnectivityState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ConnectivityState
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetConnectivityMethodInfo
instance (signature ~ (Int32 -> m NM.Enums.ConnectivityState), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetConnectivityMethodInfo a signature where
overloadedMethod = deviceGetConnectivity
instance O.OverloadedMethodInfo DeviceGetConnectivityMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetConnectivity",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetConnectivity"
})
#endif
foreign import ccall "nm_device_get_description" nm_device_get_description ::
Ptr Device ->
IO CString
deviceGetDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetDescription a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_description Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDescription" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDescriptionMethodInfo a signature where
overloadedMethod = deviceGetDescription
instance O.OverloadedMethodInfo DeviceGetDescriptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDescription",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDescription"
})
#endif
foreign import ccall "nm_device_get_device_type" nm_device_get_device_type ::
Ptr Device ->
IO CUInt
deviceGetDeviceType ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.Enums.DeviceType
deviceGetDeviceType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceType
deviceGetDeviceType a
device = IO DeviceType -> m DeviceType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceType -> m DeviceType) -> IO DeviceType -> m DeviceType
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_device_type Ptr Device
device'
let result' :: DeviceType
result' = (Int -> DeviceType
forall a. Enum a => Int -> a
toEnum (Int -> DeviceType) -> (CUInt -> Int) -> CUInt -> DeviceType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
DeviceType -> IO DeviceType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceType
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDeviceTypeMethodInfo
instance (signature ~ (m NM.Enums.DeviceType), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDeviceTypeMethodInfo a signature where
overloadedMethod = deviceGetDeviceType
instance O.OverloadedMethodInfo DeviceGetDeviceTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDeviceType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDeviceType"
})
#endif
foreign import ccall "nm_device_get_dhcp4_config" nm_device_get_dhcp4_config ::
Ptr Device ->
IO (Ptr NM.DhcpConfig.DhcpConfig)
deviceGetDhcp4Config ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.DhcpConfig.DhcpConfig
deviceGetDhcp4Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DhcpConfig
deviceGetDhcp4Config a
device = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr DhcpConfig
result <- Ptr Device -> IO (Ptr DhcpConfig)
nm_device_get_dhcp4_config Ptr Device
device'
Text -> Ptr DhcpConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDhcp4Config" Ptr DhcpConfig
result
DhcpConfig
result' <- ((ManagedPtr DhcpConfig -> DhcpConfig)
-> Ptr DhcpConfig -> IO DhcpConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig) Ptr DhcpConfig
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
DhcpConfig -> IO DhcpConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DhcpConfig
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDhcp4ConfigMethodInfo
instance (signature ~ (m NM.DhcpConfig.DhcpConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDhcp4ConfigMethodInfo a signature where
overloadedMethod = deviceGetDhcp4Config
instance O.OverloadedMethodInfo DeviceGetDhcp4ConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDhcp4Config",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDhcp4Config"
})
#endif
foreign import ccall "nm_device_get_dhcp6_config" nm_device_get_dhcp6_config ::
Ptr Device ->
IO (Ptr NM.DhcpConfig.DhcpConfig)
deviceGetDhcp6Config ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.DhcpConfig.DhcpConfig
deviceGetDhcp6Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DhcpConfig
deviceGetDhcp6Config a
device = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr DhcpConfig
result <- Ptr Device -> IO (Ptr DhcpConfig)
nm_device_get_dhcp6_config Ptr Device
device'
Text -> Ptr DhcpConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDhcp6Config" Ptr DhcpConfig
result
DhcpConfig
result' <- ((ManagedPtr DhcpConfig -> DhcpConfig)
-> Ptr DhcpConfig -> IO DhcpConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig) Ptr DhcpConfig
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
DhcpConfig -> IO DhcpConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DhcpConfig
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDhcp6ConfigMethodInfo
instance (signature ~ (m NM.DhcpConfig.DhcpConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDhcp6ConfigMethodInfo a signature where
overloadedMethod = deviceGetDhcp6Config
instance O.OverloadedMethodInfo DeviceGetDhcp6ConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDhcp6Config",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDhcp6Config"
})
#endif
foreign import ccall "nm_device_get_driver" nm_device_get_driver ::
Ptr Device ->
IO CString
deviceGetDriver ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetDriver :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetDriver a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_driver Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDriver" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDriverMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDriverMethodInfo a signature where
overloadedMethod = deviceGetDriver
instance O.OverloadedMethodInfo DeviceGetDriverMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDriver",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDriver"
})
#endif
foreign import ccall "nm_device_get_driver_version" nm_device_get_driver_version ::
Ptr Device ->
IO CString
deviceGetDriverVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetDriverVersion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetDriverVersion a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_driver_version Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDriverVersion" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetDriverVersionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDriverVersionMethodInfo a signature where
overloadedMethod = deviceGetDriverVersion
instance O.OverloadedMethodInfo DeviceGetDriverVersionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDriverVersion",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDriverVersion"
})
#endif
foreign import ccall "nm_device_get_firmware_missing" nm_device_get_firmware_missing ::
Ptr Device ->
IO CInt
deviceGetFirmwareMissing ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceGetFirmwareMissing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetFirmwareMissing a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr Device -> IO CInt
nm_device_get_firmware_missing Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetFirmwareMissingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetFirmwareMissingMethodInfo a signature where
overloadedMethod = deviceGetFirmwareMissing
instance O.OverloadedMethodInfo DeviceGetFirmwareMissingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetFirmwareMissing",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetFirmwareMissing"
})
#endif
foreign import ccall "nm_device_get_firmware_version" nm_device_get_firmware_version ::
Ptr Device ->
IO CString
deviceGetFirmwareVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetFirmwareVersion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetFirmwareVersion a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_firmware_version Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetFirmwareVersion" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetFirmwareVersionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetFirmwareVersionMethodInfo a signature where
overloadedMethod = deviceGetFirmwareVersion
instance O.OverloadedMethodInfo DeviceGetFirmwareVersionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetFirmwareVersion",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetFirmwareVersion"
})
#endif
foreign import ccall "nm_device_get_hw_address" nm_device_get_hw_address ::
Ptr Device ->
IO CString
deviceGetHwAddress ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetHwAddress :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetHwAddress a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_hw_address Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetHwAddress" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetHwAddressMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetHwAddressMethodInfo a signature where
overloadedMethod = deviceGetHwAddress
instance O.OverloadedMethodInfo DeviceGetHwAddressMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetHwAddress",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetHwAddress"
})
#endif
foreign import ccall "nm_device_get_iface" nm_device_get_iface ::
Ptr Device ->
IO CString
deviceGetIface ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetIface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetIface a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_iface Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIface" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetIfaceMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIfaceMethodInfo a signature where
overloadedMethod = deviceGetIface
instance O.OverloadedMethodInfo DeviceGetIfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIface"
})
#endif
foreign import ccall "nm_device_get_interface_flags" nm_device_get_interface_flags ::
Ptr Device ->
IO CUInt
deviceGetInterfaceFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [NM.Flags.DeviceInterfaceFlags]
deviceGetInterfaceFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [DeviceInterfaceFlags]
deviceGetInterfaceFlags a
device = IO [DeviceInterfaceFlags] -> m [DeviceInterfaceFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DeviceInterfaceFlags] -> m [DeviceInterfaceFlags])
-> IO [DeviceInterfaceFlags] -> m [DeviceInterfaceFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_interface_flags Ptr Device
device'
let result' :: [DeviceInterfaceFlags]
result' = CUInt -> [DeviceInterfaceFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
[DeviceInterfaceFlags] -> IO [DeviceInterfaceFlags]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [DeviceInterfaceFlags]
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetInterfaceFlagsMethodInfo
instance (signature ~ (m [NM.Flags.DeviceInterfaceFlags]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetInterfaceFlagsMethodInfo a signature where
overloadedMethod = deviceGetInterfaceFlags
instance O.OverloadedMethodInfo DeviceGetInterfaceFlagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetInterfaceFlags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetInterfaceFlags"
})
#endif
foreign import ccall "nm_device_get_ip4_config" nm_device_get_ip4_config ::
Ptr Device ->
IO (Ptr NM.IPConfig.IPConfig)
deviceGetIp4Config ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.IPConfig.IPConfig
deviceGetIp4Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m IPConfig
deviceGetIp4Config a
device = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr IPConfig
result <- Ptr Device -> IO (Ptr IPConfig)
nm_device_get_ip4_config Ptr Device
device'
Text -> Ptr IPConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIp4Config" Ptr IPConfig
result
IPConfig
result' <- ((ManagedPtr IPConfig -> IPConfig) -> Ptr IPConfig -> IO IPConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig) Ptr IPConfig
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
IPConfig -> IO IPConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IPConfig
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetIp4ConfigMethodInfo
instance (signature ~ (m NM.IPConfig.IPConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIp4ConfigMethodInfo a signature where
overloadedMethod = deviceGetIp4Config
instance O.OverloadedMethodInfo DeviceGetIp4ConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIp4Config",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIp4Config"
})
#endif
foreign import ccall "nm_device_get_ip6_config" nm_device_get_ip6_config ::
Ptr Device ->
IO (Ptr NM.IPConfig.IPConfig)
deviceGetIp6Config ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.IPConfig.IPConfig
deviceGetIp6Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m IPConfig
deviceGetIp6Config a
device = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr IPConfig
result <- Ptr Device -> IO (Ptr IPConfig)
nm_device_get_ip6_config Ptr Device
device'
Text -> Ptr IPConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIp6Config" Ptr IPConfig
result
IPConfig
result' <- ((ManagedPtr IPConfig -> IPConfig) -> Ptr IPConfig -> IO IPConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig) Ptr IPConfig
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
IPConfig -> IO IPConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IPConfig
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetIp6ConfigMethodInfo
instance (signature ~ (m NM.IPConfig.IPConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIp6ConfigMethodInfo a signature where
overloadedMethod = deviceGetIp6Config
instance O.OverloadedMethodInfo DeviceGetIp6ConfigMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIp6Config",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIp6Config"
})
#endif
foreign import ccall "nm_device_get_ip_iface" nm_device_get_ip_iface ::
Ptr Device ->
IO CString
deviceGetIpIface ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetIpIface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetIpIface a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_ip_iface Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIpIface" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetIpIfaceMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIpIfaceMethodInfo a signature where
overloadedMethod = deviceGetIpIface
instance O.OverloadedMethodInfo DeviceGetIpIfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIpIface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIpIface"
})
#endif
foreign import ccall "nm_device_get_lldp_neighbors" nm_device_get_lldp_neighbors ::
Ptr Device ->
IO (Ptr (GPtrArray (Ptr NM.LldpNeighbor.LldpNeighbor)))
deviceGetLldpNeighbors ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [NM.LldpNeighbor.LldpNeighbor]
deviceGetLldpNeighbors :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [LldpNeighbor]
deviceGetLldpNeighbors a
device = IO [LldpNeighbor] -> m [LldpNeighbor]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [LldpNeighbor] -> m [LldpNeighbor])
-> IO [LldpNeighbor] -> m [LldpNeighbor]
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr (GPtrArray (Ptr LldpNeighbor))
result <- Ptr Device -> IO (Ptr (GPtrArray (Ptr LldpNeighbor)))
nm_device_get_lldp_neighbors Ptr Device
device'
Text -> Ptr (GPtrArray (Ptr LldpNeighbor)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetLldpNeighbors" Ptr (GPtrArray (Ptr LldpNeighbor))
result
[Ptr LldpNeighbor]
result' <- Ptr (GPtrArray (Ptr LldpNeighbor)) -> IO [Ptr LldpNeighbor]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr LldpNeighbor))
result
[LldpNeighbor]
result'' <- (Ptr LldpNeighbor -> IO LldpNeighbor)
-> [Ptr LldpNeighbor] -> IO [LldpNeighbor]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr LldpNeighbor -> LldpNeighbor)
-> Ptr LldpNeighbor -> IO LldpNeighbor
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr LldpNeighbor -> LldpNeighbor
NM.LldpNeighbor.LldpNeighbor) [Ptr LldpNeighbor]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
[LldpNeighbor] -> IO [LldpNeighbor]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [LldpNeighbor]
result''
#if defined(ENABLE_OVERLOADING)
data DeviceGetLldpNeighborsMethodInfo
instance (signature ~ (m [NM.LldpNeighbor.LldpNeighbor]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetLldpNeighborsMethodInfo a signature where
overloadedMethod = deviceGetLldpNeighbors
instance O.OverloadedMethodInfo DeviceGetLldpNeighborsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetLldpNeighbors",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetLldpNeighbors"
})
#endif
foreign import ccall "nm_device_get_managed" nm_device_get_managed ::
Ptr Device ->
IO CInt
deviceGetManaged ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceGetManaged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetManaged a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr Device -> IO CInt
nm_device_get_managed Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetManagedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetManagedMethodInfo a signature where
overloadedMethod = deviceGetManaged
instance O.OverloadedMethodInfo DeviceGetManagedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetManaged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetManaged"
})
#endif
foreign import ccall "nm_device_get_metered" nm_device_get_metered ::
Ptr Device ->
IO CUInt
deviceGetMetered ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.Enums.Metered
deviceGetMetered :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Metered
deviceGetMetered a
device = IO Metered -> m Metered
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Metered -> m Metered) -> IO Metered -> m Metered
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_metered Ptr Device
device'
let result' :: Metered
result' = (Int -> Metered
forall a. Enum a => Int -> a
toEnum (Int -> Metered) -> (CUInt -> Int) -> CUInt -> Metered
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Metered -> IO Metered
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Metered
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetMeteredMethodInfo
instance (signature ~ (m NM.Enums.Metered), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetMeteredMethodInfo a signature where
overloadedMethod = deviceGetMetered
instance O.OverloadedMethodInfo DeviceGetMeteredMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetMetered",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetMetered"
})
#endif
foreign import ccall "nm_device_get_mtu" nm_device_get_mtu ::
Ptr Device ->
IO Word32
deviceGetMtu ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Word32
deviceGetMtu :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Word32
deviceGetMtu a
device = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Word32
result <- Ptr Device -> IO Word32
nm_device_get_mtu Ptr Device
device'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data DeviceGetMtuMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetMtuMethodInfo a signature where
overloadedMethod = deviceGetMtu
instance O.OverloadedMethodInfo DeviceGetMtuMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetMtu",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetMtu"
})
#endif
foreign import ccall "nm_device_get_nm_plugin_missing" nm_device_get_nm_plugin_missing ::
Ptr Device ->
IO CInt
deviceGetNmPluginMissing ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceGetNmPluginMissing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetNmPluginMissing a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr Device -> IO CInt
nm_device_get_nm_plugin_missing Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetNmPluginMissingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetNmPluginMissingMethodInfo a signature where
overloadedMethod = deviceGetNmPluginMissing
instance O.OverloadedMethodInfo DeviceGetNmPluginMissingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetNmPluginMissing",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetNmPluginMissing"
})
#endif
foreign import ccall "nm_device_get_path" nm_device_get_path ::
Ptr Device ->
IO CString
deviceGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetPath a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_path Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPathMethodInfo a signature where
overloadedMethod = deviceGetPath
instance O.OverloadedMethodInfo DeviceGetPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetPath"
})
#endif
foreign import ccall "nm_device_get_physical_port_id" nm_device_get_physical_port_id ::
Ptr Device ->
IO CString
deviceGetPhysicalPortId ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetPhysicalPortId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetPhysicalPortId a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_physical_port_id Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetPhysicalPortId" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetPhysicalPortIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPhysicalPortIdMethodInfo a signature where
overloadedMethod = deviceGetPhysicalPortId
instance O.OverloadedMethodInfo DeviceGetPhysicalPortIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetPhysicalPortId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetPhysicalPortId"
})
#endif
foreign import ccall "nm_device_get_ports" nm_device_get_ports ::
Ptr Device ->
IO (Ptr (GPtrArray (Ptr Device)))
deviceGetPorts ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m [Device]
deviceGetPorts :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [Device]
deviceGetPorts a
device = IO [Device] -> m [Device]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Device] -> m [Device]) -> IO [Device] -> m [Device]
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr (GPtrArray (Ptr Device))
result <- Ptr Device -> IO (Ptr (GPtrArray (Ptr Device)))
nm_device_get_ports Ptr Device
device'
Text -> Ptr (GPtrArray (Ptr Device)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetPorts" Ptr (GPtrArray (Ptr Device))
result
[Ptr Device]
result' <- Ptr (GPtrArray (Ptr Device)) -> IO [Ptr Device]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Device))
result
[Device]
result'' <- (Ptr Device -> IO Device) -> [Ptr Device] -> IO [Device]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Device -> Device
Device) [Ptr Device]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
[Device] -> IO [Device]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Device]
result''
#if defined(ENABLE_OVERLOADING)
data DeviceGetPortsMethodInfo
instance (signature ~ (m [Device]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPortsMethodInfo a signature where
overloadedMethod = deviceGetPorts
instance O.OverloadedMethodInfo DeviceGetPortsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetPorts",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetPorts"
})
#endif
foreign import ccall "nm_device_get_product" nm_device_get_product ::
Ptr Device ->
IO CString
deviceGetProduct ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetProduct :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetProduct a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_product Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetProduct" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetProductMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetProductMethodInfo a signature where
overloadedMethod = deviceGetProduct
instance O.OverloadedMethodInfo DeviceGetProductMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetProduct",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetProduct"
})
#endif
foreign import ccall "nm_device_get_setting_type" nm_device_get_setting_type ::
Ptr Device ->
IO CGType
deviceGetSettingType ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m GType
deviceGetSettingType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m GType
deviceGetSettingType a
device = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Word64
result <- Ptr Device -> IO Word64
nm_device_get_setting_type Ptr Device
device'
let result' :: GType
result' = Word64 -> GType
GType Word64
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetSettingTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetSettingTypeMethodInfo a signature where
overloadedMethod = deviceGetSettingType
instance O.OverloadedMethodInfo DeviceGetSettingTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetSettingType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetSettingType"
})
#endif
foreign import ccall "nm_device_get_state" nm_device_get_state ::
Ptr Device ->
IO CUInt
deviceGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.Enums.DeviceState
deviceGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceState
deviceGetState a
device = IO DeviceState -> m DeviceState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceState -> m DeviceState)
-> IO DeviceState -> m DeviceState
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_state Ptr Device
device'
let result' :: DeviceState
result' = (Int -> DeviceState
forall a. Enum a => Int -> a
toEnum (Int -> DeviceState) -> (CUInt -> Int) -> CUInt -> DeviceState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
DeviceState -> IO DeviceState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceState
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetStateMethodInfo
instance (signature ~ (m NM.Enums.DeviceState), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetStateMethodInfo a signature where
overloadedMethod = deviceGetState
instance O.OverloadedMethodInfo DeviceGetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetState"
})
#endif
foreign import ccall "nm_device_get_state_reason" nm_device_get_state_reason ::
Ptr Device ->
IO CUInt
deviceGetStateReason ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m NM.Enums.DeviceStateReason
deviceGetStateReason :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceStateReason
deviceGetStateReason a
device = IO DeviceStateReason -> m DeviceStateReason
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceStateReason -> m DeviceStateReason)
-> IO DeviceStateReason -> m DeviceStateReason
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_state_reason Ptr Device
device'
let result' :: DeviceStateReason
result' = (Int -> DeviceStateReason
forall a. Enum a => Int -> a
toEnum (Int -> DeviceStateReason)
-> (CUInt -> Int) -> CUInt -> DeviceStateReason
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
DeviceStateReason -> IO DeviceStateReason
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceStateReason
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetStateReasonMethodInfo
instance (signature ~ (m NM.Enums.DeviceStateReason), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetStateReasonMethodInfo a signature where
overloadedMethod = deviceGetStateReason
instance O.OverloadedMethodInfo DeviceGetStateReasonMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetStateReason",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetStateReason"
})
#endif
foreign import ccall "nm_device_get_type_description" nm_device_get_type_description ::
Ptr Device ->
IO CString
deviceGetTypeDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetTypeDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetTypeDescription a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_type_description Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetTypeDescription" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetTypeDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetTypeDescriptionMethodInfo a signature where
overloadedMethod = deviceGetTypeDescription
instance O.OverloadedMethodInfo DeviceGetTypeDescriptionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetTypeDescription",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetTypeDescription"
})
#endif
foreign import ccall "nm_device_get_udi" nm_device_get_udi ::
Ptr Device ->
IO CString
deviceGetUdi ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetUdi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetUdi a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_udi Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetUdi" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetUdiMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetUdiMethodInfo a signature where
overloadedMethod = deviceGetUdi
instance O.OverloadedMethodInfo DeviceGetUdiMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetUdi",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetUdi"
})
#endif
foreign import ccall "nm_device_get_vendor" nm_device_get_vendor ::
Ptr Device ->
IO CString
deviceGetVendor ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m T.Text
deviceGetVendor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetVendor a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr Device -> IO CString
nm_device_get_vendor Ptr Device
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetVendor" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DeviceGetVendorMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetVendorMethodInfo a signature where
overloadedMethod = deviceGetVendor
instance O.OverloadedMethodInfo DeviceGetVendorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetVendor",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetVendor"
})
#endif
foreign import ccall "nm_device_is_real" nm_device_is_real ::
Ptr Device ->
IO CInt
deviceIsReal ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceIsReal :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceIsReal a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr Device -> IO CInt
nm_device_is_real Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceIsRealMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceIsRealMethodInfo a signature where
overloadedMethod = deviceIsReal
instance O.OverloadedMethodInfo DeviceIsRealMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceIsReal",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceIsReal"
})
#endif
foreign import ccall "nm_device_is_software" nm_device_is_software ::
Ptr Device ->
IO CInt
deviceIsSoftware ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> m Bool
deviceIsSoftware :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceIsSoftware a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr Device -> IO CInt
nm_device_is_software Ptr Device
device'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DeviceIsSoftwareMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceIsSoftwareMethodInfo a signature where
overloadedMethod = deviceIsSoftware
instance O.OverloadedMethodInfo DeviceIsSoftwareMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceIsSoftware",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceIsSoftware"
})
#endif
foreign import ccall "nm_device_reapply" nm_device_reapply ::
Ptr Device ->
Ptr NM.Connection.Connection ->
Word64 ->
Word32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
{-# DEPRECATED deviceReapply ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceReapplyAsync' or GDBusConnection."] #-}
deviceReapply ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (b)
-> Word64
-> Word32
-> Maybe (c)
-> m ()
deviceReapply :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b,
IsCancellable c) =>
a -> Maybe b -> Word64 -> Word32 -> Maybe c -> m ()
deviceReapply a
device Maybe b
connection Word64
versionId Word32
flags Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Connection
maybeConnection <- case Maybe b
connection of
Maybe b
Nothing -> Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
forall a. Ptr a
FP.nullPtr
Just b
jConnection -> do
Ptr Connection
jConnection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jConnection
Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
jConnection'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device
-> Ptr Connection
-> Word64
-> Word32
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
nm_device_reapply Ptr Device
device' Ptr Connection
maybeConnection Word64
versionId Word32
flags Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
connection b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceReapplyMethodInfo
instance (signature ~ (Maybe (b) -> Word64 -> Word32 -> Maybe (c) -> m ()), MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DeviceReapplyMethodInfo a signature where
overloadedMethod = deviceReapply
instance O.OverloadedMethodInfo DeviceReapplyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceReapply",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceReapply"
})
#endif
foreign import ccall "nm_device_reapply_async" nm_device_reapply_async ::
Ptr Device ->
Ptr NM.Connection.Connection ->
Word64 ->
Word32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
deviceReapplyAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (b)
-> Word64
-> Word32
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
deviceReapplyAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b,
IsCancellable c) =>
a
-> Maybe b
-> Word64
-> Word32
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
deviceReapplyAsync a
device Maybe b
connection Word64
versionId Word32
flags Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Connection
maybeConnection <- case Maybe b
connection of
Maybe b
Nothing -> Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
forall a. Ptr a
FP.nullPtr
Just b
jConnection -> do
Ptr Connection
jConnection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jConnection
Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
jConnection'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Device
-> Ptr Connection
-> Word64
-> Word32
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_reapply_async Ptr Device
device' Ptr Connection
maybeConnection Word64
versionId Word32
flags Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
connection b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceReapplyAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Word64 -> Word32 -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DeviceReapplyAsyncMethodInfo a signature where
overloadedMethod = deviceReapplyAsync
instance O.OverloadedMethodInfo DeviceReapplyAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceReapplyAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceReapplyAsync"
})
#endif
foreign import ccall "nm_device_reapply_finish" nm_device_reapply_finish ::
Ptr Device ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
deviceReapplyFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
deviceReapplyFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m ()
deviceReapplyFinish a
device b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
nm_device_reapply_finish Ptr Device
device' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data DeviceReapplyFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceReapplyFinishMethodInfo a signature where
overloadedMethod = deviceReapplyFinish
instance O.OverloadedMethodInfo DeviceReapplyFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceReapplyFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceReapplyFinish"
})
#endif
foreign import ccall "nm_device_set_autoconnect" nm_device_set_autoconnect ::
Ptr Device ->
CInt ->
IO ()
{-# DEPRECATED deviceSetAutoconnect ["(Since version 1.22)","Use the async command 'GI.NM.Objects.Client.clientDbusSetProperty' on","'GI.NM.Objects.Object.objectGetPath', @/NM_DBUS_INTERFACE_DEVICE/@ to set \\\"Autoconnect\\\" property to a \\\"(b)\\\" value.","This function is deprecated because it calls a synchronous D-Bus method","and modifies the content of the NMClient cache client side."] #-}
deviceSetAutoconnect ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Bool
-> m ()
deviceSetAutoconnect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Bool -> m ()
deviceSetAutoconnect a
device Bool
autoconnect = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
let autoconnect' :: CInt
autoconnect' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
autoconnect
Ptr Device -> CInt -> IO ()
nm_device_set_autoconnect Ptr Device
device' CInt
autoconnect'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceSetAutoconnectMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetAutoconnectMethodInfo a signature where
overloadedMethod = deviceSetAutoconnect
instance O.OverloadedMethodInfo DeviceSetAutoconnectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceSetAutoconnect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceSetAutoconnect"
})
#endif
foreign import ccall "nm_device_set_managed" nm_device_set_managed ::
Ptr Device ->
CInt ->
IO ()
{-# DEPRECATED deviceSetManaged ["(Since version 1.22)","Use the async command 'GI.NM.Objects.Client.clientDbusSetProperty' on","'GI.NM.Objects.Object.objectGetPath', interface @/NM_DBUS_INTERFACE_DEVICE/@ to set the","\\\"Managed\\\" property to a \\\"(b)\\\" boolean value.","This function is deprecated because it calls a synchronous D-Bus method","and modifies the content of the NMClient cache client side. Also, it does","not emit a property changed signal."] #-}
deviceSetManaged ::
(B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
a
-> Bool
-> m ()
deviceSetManaged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Bool -> m ()
deviceSetManaged a
device Bool
managed = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
let managed' :: CInt
managed' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
managed
Ptr Device -> CInt -> IO ()
nm_device_set_managed Ptr Device
device' CInt
managed'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DeviceSetManagedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetManagedMethodInfo a signature where
overloadedMethod = deviceSetManaged
instance O.OverloadedMethodInfo DeviceSetManagedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.Device.deviceSetManaged",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceSetManaged"
})
#endif
foreign import ccall "nm_device_disambiguate_names" nm_device_disambiguate_names ::
Ptr (Ptr Device) ->
Int32 ->
IO (Ptr CString)
deviceDisambiguateNames ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Device]
-> m [T.Text]
deviceDisambiguateNames :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[Device] -> m [Text]
deviceDisambiguateNames [Device]
devices = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
let numDevices :: Int32
numDevices = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Device] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Device]
devices
[Ptr Device]
devices' <- (Device -> IO (Ptr Device)) -> [Device] -> IO [Ptr Device]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Device -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Device]
devices
Ptr (Ptr Device)
devices'' <- [Ptr Device] -> IO (Ptr (Ptr Device))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr Device]
devices'
Ptr CString
result <- Ptr (Ptr Device) -> Int32 -> IO (Ptr CString)
nm_device_disambiguate_names Ptr (Ptr Device)
devices'' Int32
numDevices
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceDisambiguateNames" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
(Device -> IO ()) -> [Device] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Device -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Device]
devices
Ptr (Ptr Device) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Device)
devices''
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
#endif