{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.DeviceBond
(
DeviceBond(..) ,
IsDeviceBond ,
toDeviceBond ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceBondMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceBondGetCarrierMethodInfo ,
#endif
deviceBondGetCarrier ,
#if defined(ENABLE_OVERLOADING)
DeviceBondGetSlavesMethodInfo ,
#endif
deviceBondGetSlaves ,
#if defined(ENABLE_OVERLOADING)
DeviceBondCarrierPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceBondCarrier ,
#endif
getDeviceBondCarrier ,
#if defined(ENABLE_OVERLOADING)
DeviceBondSlavesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceBondSlaves ,
#endif
) 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.Device as NM.Device
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 {-# SOURCE #-} qualified GI.NM.Objects.Device as NM.Device
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
#endif
newtype DeviceBond = DeviceBond (SP.ManagedPtr DeviceBond)
deriving (DeviceBond -> DeviceBond -> Bool
(DeviceBond -> DeviceBond -> Bool)
-> (DeviceBond -> DeviceBond -> Bool) -> Eq DeviceBond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceBond -> DeviceBond -> Bool
== :: DeviceBond -> DeviceBond -> Bool
$c/= :: DeviceBond -> DeviceBond -> Bool
/= :: DeviceBond -> DeviceBond -> Bool
Eq)
instance SP.ManagedPtrNewtype DeviceBond where
toManagedPtr :: DeviceBond -> ManagedPtr DeviceBond
toManagedPtr (DeviceBond ManagedPtr DeviceBond
p) = ManagedPtr DeviceBond
p
foreign import ccall "nm_device_bond_get_type"
c_nm_device_bond_get_type :: IO B.Types.GType
instance B.Types.TypedObject DeviceBond where
glibType :: IO GType
glibType = IO GType
c_nm_device_bond_get_type
instance B.Types.GObject DeviceBond
class (SP.GObject o, O.IsDescendantOf DeviceBond o) => IsDeviceBond o
instance (SP.GObject o, O.IsDescendantOf DeviceBond o) => IsDeviceBond o
instance O.HasParentTypes DeviceBond
type instance O.ParentTypes DeviceBond = '[NM.Device.Device, NM.Object.Object, GObject.Object.Object]
toDeviceBond :: (MIO.MonadIO m, IsDeviceBond o) => o -> m DeviceBond
toDeviceBond :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceBond o) =>
o -> m DeviceBond
toDeviceBond = IO DeviceBond -> m DeviceBond
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceBond -> m DeviceBond)
-> (o -> IO DeviceBond) -> o -> m DeviceBond
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DeviceBond -> DeviceBond) -> o -> IO DeviceBond
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DeviceBond -> DeviceBond
DeviceBond
instance B.GValue.IsGValue (Maybe DeviceBond) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_bond_get_type
gvalueSet_ :: Ptr GValue -> Maybe DeviceBond -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DeviceBond
P.Nothing = Ptr GValue -> Ptr DeviceBond -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DeviceBond
forall a. Ptr a
FP.nullPtr :: FP.Ptr DeviceBond)
gvalueSet_ Ptr GValue
gv (P.Just DeviceBond
obj) = DeviceBond -> (Ptr DeviceBond -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DeviceBond
obj (Ptr GValue -> Ptr DeviceBond -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DeviceBond)
gvalueGet_ Ptr GValue
gv = do
Ptr DeviceBond
ptr <- Ptr GValue -> IO (Ptr DeviceBond)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DeviceBond)
if Ptr DeviceBond
ptr Ptr DeviceBond -> Ptr DeviceBond -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DeviceBond
forall a. Ptr a
FP.nullPtr
then DeviceBond -> Maybe DeviceBond
forall a. a -> Maybe a
P.Just (DeviceBond -> Maybe DeviceBond)
-> IO DeviceBond -> IO (Maybe DeviceBond)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DeviceBond -> DeviceBond)
-> Ptr DeviceBond -> IO DeviceBond
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DeviceBond -> DeviceBond
DeviceBond Ptr DeviceBond
ptr
else Maybe DeviceBond -> IO (Maybe DeviceBond)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DeviceBond
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceBondMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceBondMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceBondMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceBondMethod "connectionCompatible" o = NM.Device.DeviceConnectionCompatibleMethodInfo
ResolveDeviceBondMethod "connectionValid" o = NM.Device.DeviceConnectionValidMethodInfo
ResolveDeviceBondMethod "delete" o = NM.Device.DeviceDeleteMethodInfo
ResolveDeviceBondMethod "deleteAsync" o = NM.Device.DeviceDeleteAsyncMethodInfo
ResolveDeviceBondMethod "deleteFinish" o = NM.Device.DeviceDeleteFinishMethodInfo
ResolveDeviceBondMethod "disconnect" o = NM.Device.DeviceDisconnectMethodInfo
ResolveDeviceBondMethod "disconnectAsync" o = NM.Device.DeviceDisconnectAsyncMethodInfo
ResolveDeviceBondMethod "disconnectFinish" o = NM.Device.DeviceDisconnectFinishMethodInfo
ResolveDeviceBondMethod "filterConnections" o = NM.Device.DeviceFilterConnectionsMethodInfo
ResolveDeviceBondMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceBondMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceBondMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceBondMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceBondMethod "isReal" o = NM.Device.DeviceIsRealMethodInfo
ResolveDeviceBondMethod "isSoftware" o = NM.Device.DeviceIsSoftwareMethodInfo
ResolveDeviceBondMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceBondMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceBondMethod "reapply" o = NM.Device.DeviceReapplyMethodInfo
ResolveDeviceBondMethod "reapplyAsync" o = NM.Device.DeviceReapplyAsyncMethodInfo
ResolveDeviceBondMethod "reapplyFinish" o = NM.Device.DeviceReapplyFinishMethodInfo
ResolveDeviceBondMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceBondMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceBondMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceBondMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceBondMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceBondMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceBondMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceBondMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceBondMethod "getActiveConnection" o = NM.Device.DeviceGetActiveConnectionMethodInfo
ResolveDeviceBondMethod "getAppliedConnection" o = NM.Device.DeviceGetAppliedConnectionMethodInfo
ResolveDeviceBondMethod "getAppliedConnectionAsync" o = NM.Device.DeviceGetAppliedConnectionAsyncMethodInfo
ResolveDeviceBondMethod "getAppliedConnectionFinish" o = NM.Device.DeviceGetAppliedConnectionFinishMethodInfo
ResolveDeviceBondMethod "getAutoconnect" o = NM.Device.DeviceGetAutoconnectMethodInfo
ResolveDeviceBondMethod "getAvailableConnections" o = NM.Device.DeviceGetAvailableConnectionsMethodInfo
ResolveDeviceBondMethod "getCapabilities" o = NM.Device.DeviceGetCapabilitiesMethodInfo
ResolveDeviceBondMethod "getCarrier" o = DeviceBondGetCarrierMethodInfo
ResolveDeviceBondMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveDeviceBondMethod "getConnectivity" o = NM.Device.DeviceGetConnectivityMethodInfo
ResolveDeviceBondMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceBondMethod "getDescription" o = NM.Device.DeviceGetDescriptionMethodInfo
ResolveDeviceBondMethod "getDeviceType" o = NM.Device.DeviceGetDeviceTypeMethodInfo
ResolveDeviceBondMethod "getDhcp4Config" o = NM.Device.DeviceGetDhcp4ConfigMethodInfo
ResolveDeviceBondMethod "getDhcp6Config" o = NM.Device.DeviceGetDhcp6ConfigMethodInfo
ResolveDeviceBondMethod "getDriver" o = NM.Device.DeviceGetDriverMethodInfo
ResolveDeviceBondMethod "getDriverVersion" o = NM.Device.DeviceGetDriverVersionMethodInfo
ResolveDeviceBondMethod "getFirmwareMissing" o = NM.Device.DeviceGetFirmwareMissingMethodInfo
ResolveDeviceBondMethod "getFirmwareVersion" o = NM.Device.DeviceGetFirmwareVersionMethodInfo
ResolveDeviceBondMethod "getHwAddress" o = NM.Device.DeviceGetHwAddressMethodInfo
ResolveDeviceBondMethod "getIface" o = NM.Device.DeviceGetIfaceMethodInfo
ResolveDeviceBondMethod "getInterfaceFlags" o = NM.Device.DeviceGetInterfaceFlagsMethodInfo
ResolveDeviceBondMethod "getIp4Config" o = NM.Device.DeviceGetIp4ConfigMethodInfo
ResolveDeviceBondMethod "getIp6Config" o = NM.Device.DeviceGetIp6ConfigMethodInfo
ResolveDeviceBondMethod "getIpIface" o = NM.Device.DeviceGetIpIfaceMethodInfo
ResolveDeviceBondMethod "getLldpNeighbors" o = NM.Device.DeviceGetLldpNeighborsMethodInfo
ResolveDeviceBondMethod "getManaged" o = NM.Device.DeviceGetManagedMethodInfo
ResolveDeviceBondMethod "getMetered" o = NM.Device.DeviceGetMeteredMethodInfo
ResolveDeviceBondMethod "getMtu" o = NM.Device.DeviceGetMtuMethodInfo
ResolveDeviceBondMethod "getNmPluginMissing" o = NM.Device.DeviceGetNmPluginMissingMethodInfo
ResolveDeviceBondMethod "getPath" o = NM.Device.DeviceGetPathMethodInfo
ResolveDeviceBondMethod "getPhysicalPortId" o = NM.Device.DeviceGetPhysicalPortIdMethodInfo
ResolveDeviceBondMethod "getPorts" o = NM.Device.DeviceGetPortsMethodInfo
ResolveDeviceBondMethod "getProduct" o = NM.Device.DeviceGetProductMethodInfo
ResolveDeviceBondMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceBondMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceBondMethod "getSettingType" o = NM.Device.DeviceGetSettingTypeMethodInfo
ResolveDeviceBondMethod "getSlaves" o = DeviceBondGetSlavesMethodInfo
ResolveDeviceBondMethod "getState" o = NM.Device.DeviceGetStateMethodInfo
ResolveDeviceBondMethod "getStateReason" o = NM.Device.DeviceGetStateReasonMethodInfo
ResolveDeviceBondMethod "getTypeDescription" o = NM.Device.DeviceGetTypeDescriptionMethodInfo
ResolveDeviceBondMethod "getUdi" o = NM.Device.DeviceGetUdiMethodInfo
ResolveDeviceBondMethod "getVendor" o = NM.Device.DeviceGetVendorMethodInfo
ResolveDeviceBondMethod "setAutoconnect" o = NM.Device.DeviceSetAutoconnectMethodInfo
ResolveDeviceBondMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceBondMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceBondMethod "setManaged" o = NM.Device.DeviceSetManagedMethodInfo
ResolveDeviceBondMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceBondMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceBondMethod t DeviceBond, O.OverloadedMethod info DeviceBond p) => OL.IsLabel t (DeviceBond -> 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 ~ ResolveDeviceBondMethod t DeviceBond, O.OverloadedMethod info DeviceBond p, R.HasField t DeviceBond p) => R.HasField t DeviceBond p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceBondMethod t DeviceBond, O.OverloadedMethodInfo info DeviceBond) => OL.IsLabel t (O.MethodProxy info DeviceBond) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDeviceBondCarrier :: (MonadIO m, IsDeviceBond o) => o -> m Bool
getDeviceBondCarrier :: forall (m :: * -> *) o. (MonadIO m, IsDeviceBond o) => o -> m Bool
getDeviceBondCarrier 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
"carrier"
#if defined(ENABLE_OVERLOADING)
data DeviceBondCarrierPropertyInfo
instance AttrInfo DeviceBondCarrierPropertyInfo where
type AttrAllowedOps DeviceBondCarrierPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceBondCarrierPropertyInfo = IsDeviceBond
type AttrSetTypeConstraint DeviceBondCarrierPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceBondCarrierPropertyInfo = (~) ()
type AttrTransferType DeviceBondCarrierPropertyInfo = ()
type AttrGetType DeviceBondCarrierPropertyInfo = Bool
type AttrLabel DeviceBondCarrierPropertyInfo = "carrier"
type AttrOrigin DeviceBondCarrierPropertyInfo = DeviceBond
attrGet = getDeviceBondCarrier
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceBond.carrier"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceBond.html#g:attr:carrier"
})
#endif
#if defined(ENABLE_OVERLOADING)
data DeviceBondSlavesPropertyInfo
instance AttrInfo DeviceBondSlavesPropertyInfo where
type AttrAllowedOps DeviceBondSlavesPropertyInfo = '[]
type AttrSetTypeConstraint DeviceBondSlavesPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceBondSlavesPropertyInfo = (~) ()
type AttrTransferType DeviceBondSlavesPropertyInfo = ()
type AttrBaseTypeConstraint DeviceBondSlavesPropertyInfo = (~) ()
type AttrGetType DeviceBondSlavesPropertyInfo = ()
type AttrLabel DeviceBondSlavesPropertyInfo = ""
type AttrOrigin DeviceBondSlavesPropertyInfo = DeviceBond
attrGet = undefined
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceBond
type instance O.AttributeList DeviceBond = DeviceBondAttributeList
type DeviceBondAttributeList = ('[ '("activeConnection", NM.Device.DeviceActiveConnectionPropertyInfo), '("autoconnect", NM.Device.DeviceAutoconnectPropertyInfo), '("availableConnections", NM.Device.DeviceAvailableConnectionsPropertyInfo), '("capabilities", NM.Device.DeviceCapabilitiesPropertyInfo), '("carrier", DeviceBondCarrierPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("deviceType", NM.Device.DeviceDeviceTypePropertyInfo), '("dhcp4Config", NM.Device.DeviceDhcp4ConfigPropertyInfo), '("dhcp6Config", NM.Device.DeviceDhcp6ConfigPropertyInfo), '("driver", NM.Device.DeviceDriverPropertyInfo), '("driverVersion", NM.Device.DeviceDriverVersionPropertyInfo), '("firmwareMissing", NM.Device.DeviceFirmwareMissingPropertyInfo), '("firmwareVersion", NM.Device.DeviceFirmwareVersionPropertyInfo), '("hwAddress", NM.Device.DeviceHwAddressPropertyInfo), '("interface", NM.Device.DeviceInterfacePropertyInfo), '("interfaceFlags", NM.Device.DeviceInterfaceFlagsPropertyInfo), '("ipInterface", NM.Device.DeviceIpInterfacePropertyInfo), '("ip4Config", NM.Device.DeviceIp4ConfigPropertyInfo), '("ip4Connectivity", NM.Device.DeviceIp4ConnectivityPropertyInfo), '("ip6Config", NM.Device.DeviceIp6ConfigPropertyInfo), '("ip6Connectivity", NM.Device.DeviceIp6ConnectivityPropertyInfo), '("lldpNeighbors", NM.Device.DeviceLldpNeighborsPropertyInfo), '("managed", NM.Device.DeviceManagedPropertyInfo), '("metered", NM.Device.DeviceMeteredPropertyInfo), '("mtu", NM.Device.DeviceMtuPropertyInfo), '("nmPluginMissing", NM.Device.DeviceNmPluginMissingPropertyInfo), '("path", NM.Device.DevicePathPropertyInfo), '("physicalPortId", NM.Device.DevicePhysicalPortIdPropertyInfo), '("ports", NM.Device.DevicePortsPropertyInfo), '("product", NM.Device.DeviceProductPropertyInfo), '("real", NM.Device.DeviceRealPropertyInfo), '("slaves", DeviceBondSlavesPropertyInfo), '("state", NM.Device.DeviceStatePropertyInfo), '("stateReason", NM.Device.DeviceStateReasonPropertyInfo), '("udi", NM.Device.DeviceUdiPropertyInfo), '("vendor", NM.Device.DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceBondCarrier :: AttrLabelProxy "carrier"
deviceBondCarrier = AttrLabelProxy
deviceBondSlaves :: AttrLabelProxy "slaves"
deviceBondSlaves = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DeviceBond = DeviceBondSignalList
type DeviceBondSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", NM.Device.DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_device_bond_get_carrier" nm_device_bond_get_carrier ::
Ptr DeviceBond ->
IO CInt
deviceBondGetCarrier ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceBond a) =>
a
-> m Bool
deviceBondGetCarrier :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceBond a) =>
a -> m Bool
deviceBondGetCarrier 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 DeviceBond
device' <- a -> IO (Ptr DeviceBond)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr DeviceBond -> IO CInt
nm_device_bond_get_carrier Ptr DeviceBond
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 DeviceBondGetCarrierMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceBond a) => O.OverloadedMethod DeviceBondGetCarrierMethodInfo a signature where
overloadedMethod = deviceBondGetCarrier
instance O.OverloadedMethodInfo DeviceBondGetCarrierMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceBond.deviceBondGetCarrier",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceBond.html#v:deviceBondGetCarrier"
})
#endif
foreign import ccall "nm_device_bond_get_slaves" nm_device_bond_get_slaves ::
Ptr DeviceBond ->
IO (Ptr (GPtrArray (Ptr NM.Device.Device)))
{-# DEPRECATED deviceBondGetSlaves ["(Since version 1.34)","Use 'GI.NM.Objects.Device.deviceGetPorts' instead."] #-}
deviceBondGetSlaves ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceBond a) =>
a
-> m [NM.Device.Device]
deviceBondGetSlaves :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceBond a) =>
a -> m [Device]
deviceBondGetSlaves 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 DeviceBond
device' <- a -> IO (Ptr DeviceBond)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr (GPtrArray (Ptr Device))
result <- Ptr DeviceBond -> IO (Ptr (GPtrArray (Ptr Device)))
nm_device_bond_get_slaves Ptr DeviceBond
device'
Text -> Ptr (GPtrArray (Ptr Device)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceBondGetSlaves" 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
NM.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 DeviceBondGetSlavesMethodInfo
instance (signature ~ (m [NM.Device.Device]), MonadIO m, IsDeviceBond a) => O.OverloadedMethod DeviceBondGetSlavesMethodInfo a signature where
overloadedMethod = deviceBondGetSlaves
instance O.OverloadedMethodInfo DeviceBondGetSlavesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceBond.deviceBondGetSlaves",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceBond.html#v:deviceBondGetSlaves"
})
#endif