{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.SettingBondPort
(
SettingBondPort(..) ,
IsSettingBondPort ,
toSettingBondPort ,
#if defined(ENABLE_OVERLOADING)
ResolveSettingBondPortMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingBondPortGetPrioMethodInfo ,
#endif
settingBondPortGetPrio ,
#if defined(ENABLE_OVERLOADING)
SettingBondPortGetQueueIdMethodInfo ,
#endif
settingBondPortGetQueueId ,
settingBondPortNew ,
#if defined(ENABLE_OVERLOADING)
SettingBondPortPrioPropertyInfo ,
#endif
constructSettingBondPortPrio ,
getSettingBondPortPrio ,
setSettingBondPortPrio ,
#if defined(ENABLE_OVERLOADING)
settingBondPortPrio ,
#endif
#if defined(ENABLE_OVERLOADING)
SettingBondPortQueueIdPropertyInfo ,
#endif
constructSettingBondPortQueueId ,
getSettingBondPortQueueId ,
setSettingBondPortQueueId ,
#if defined(ENABLE_OVERLOADING)
settingBondPortQueueId ,
#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.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
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.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.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.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.Setting as NM.Setting
#endif
newtype SettingBondPort = SettingBondPort (SP.ManagedPtr SettingBondPort)
deriving (SettingBondPort -> SettingBondPort -> Bool
(SettingBondPort -> SettingBondPort -> Bool)
-> (SettingBondPort -> SettingBondPort -> Bool)
-> Eq SettingBondPort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SettingBondPort -> SettingBondPort -> Bool
== :: SettingBondPort -> SettingBondPort -> Bool
$c/= :: SettingBondPort -> SettingBondPort -> Bool
/= :: SettingBondPort -> SettingBondPort -> Bool
Eq)
instance SP.ManagedPtrNewtype SettingBondPort where
toManagedPtr :: SettingBondPort -> ManagedPtr SettingBondPort
toManagedPtr (SettingBondPort ManagedPtr SettingBondPort
p) = ManagedPtr SettingBondPort
p
foreign import ccall "nm_setting_bond_port_get_type"
c_nm_setting_bond_port_get_type :: IO B.Types.GType
instance B.Types.TypedObject SettingBondPort where
glibType :: IO GType
glibType = IO GType
c_nm_setting_bond_port_get_type
instance B.Types.GObject SettingBondPort
class (SP.GObject o, O.IsDescendantOf SettingBondPort o) => IsSettingBondPort o
instance (SP.GObject o, O.IsDescendantOf SettingBondPort o) => IsSettingBondPort o
instance O.HasParentTypes SettingBondPort
type instance O.ParentTypes SettingBondPort = '[NM.Setting.Setting, GObject.Object.Object]
toSettingBondPort :: (MIO.MonadIO m, IsSettingBondPort o) => o -> m SettingBondPort
toSettingBondPort :: forall (m :: * -> *) o.
(MonadIO m, IsSettingBondPort o) =>
o -> m SettingBondPort
toSettingBondPort = IO SettingBondPort -> m SettingBondPort
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SettingBondPort -> m SettingBondPort)
-> (o -> IO SettingBondPort) -> o -> m SettingBondPort
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SettingBondPort -> SettingBondPort)
-> o -> IO SettingBondPort
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr SettingBondPort -> SettingBondPort
SettingBondPort
instance B.GValue.IsGValue (Maybe SettingBondPort) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_setting_bond_port_get_type
gvalueSet_ :: Ptr GValue -> Maybe SettingBondPort -> IO ()
gvalueSet_ Ptr GValue
gv Maybe SettingBondPort
P.Nothing = Ptr GValue -> Ptr SettingBondPort -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr SettingBondPort
forall a. Ptr a
FP.nullPtr :: FP.Ptr SettingBondPort)
gvalueSet_ Ptr GValue
gv (P.Just SettingBondPort
obj) = SettingBondPort -> (Ptr SettingBondPort -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SettingBondPort
obj (Ptr GValue -> Ptr SettingBondPort -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe SettingBondPort)
gvalueGet_ Ptr GValue
gv = do
Ptr SettingBondPort
ptr <- Ptr GValue -> IO (Ptr SettingBondPort)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr SettingBondPort)
if Ptr SettingBondPort
ptr Ptr SettingBondPort -> Ptr SettingBondPort -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr SettingBondPort
forall a. Ptr a
FP.nullPtr
then SettingBondPort -> Maybe SettingBondPort
forall a. a -> Maybe a
P.Just (SettingBondPort -> Maybe SettingBondPort)
-> IO SettingBondPort -> IO (Maybe SettingBondPort)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr SettingBondPort -> SettingBondPort)
-> Ptr SettingBondPort -> IO SettingBondPort
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr SettingBondPort -> SettingBondPort
SettingBondPort Ptr SettingBondPort
ptr
else Maybe SettingBondPort -> IO (Maybe SettingBondPort)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SettingBondPort
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSettingBondPortMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveSettingBondPortMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSettingBondPortMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSettingBondPortMethod "compare" o = NM.Setting.SettingCompareMethodInfo
ResolveSettingBondPortMethod "diff" o = NM.Setting.SettingDiffMethodInfo
ResolveSettingBondPortMethod "duplicate" o = NM.Setting.SettingDuplicateMethodInfo
ResolveSettingBondPortMethod "enumerateValues" o = NM.Setting.SettingEnumerateValuesMethodInfo
ResolveSettingBondPortMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSettingBondPortMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSettingBondPortMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSettingBondPortMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSettingBondPortMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSettingBondPortMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSettingBondPortMethod "optionClearByName" o = NM.Setting.SettingOptionClearByNameMethodInfo
ResolveSettingBondPortMethod "optionGet" o = NM.Setting.SettingOptionGetMethodInfo
ResolveSettingBondPortMethod "optionGetAllNames" o = NM.Setting.SettingOptionGetAllNamesMethodInfo
ResolveSettingBondPortMethod "optionGetBoolean" o = NM.Setting.SettingOptionGetBooleanMethodInfo
ResolveSettingBondPortMethod "optionGetUint32" o = NM.Setting.SettingOptionGetUint32MethodInfo
ResolveSettingBondPortMethod "optionSet" o = NM.Setting.SettingOptionSetMethodInfo
ResolveSettingBondPortMethod "optionSetBoolean" o = NM.Setting.SettingOptionSetBooleanMethodInfo
ResolveSettingBondPortMethod "optionSetUint32" o = NM.Setting.SettingOptionSetUint32MethodInfo
ResolveSettingBondPortMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSettingBondPortMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSettingBondPortMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSettingBondPortMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSettingBondPortMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSettingBondPortMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSettingBondPortMethod "toString" o = NM.Setting.SettingToStringMethodInfo
ResolveSettingBondPortMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSettingBondPortMethod "verify" o = NM.Setting.SettingVerifyMethodInfo
ResolveSettingBondPortMethod "verifySecrets" o = NM.Setting.SettingVerifySecretsMethodInfo
ResolveSettingBondPortMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSettingBondPortMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSettingBondPortMethod "getDbusPropertyType" o = NM.Setting.SettingGetDbusPropertyTypeMethodInfo
ResolveSettingBondPortMethod "getName" o = NM.Setting.SettingGetNameMethodInfo
ResolveSettingBondPortMethod "getPrio" o = SettingBondPortGetPrioMethodInfo
ResolveSettingBondPortMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSettingBondPortMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSettingBondPortMethod "getQueueId" o = SettingBondPortGetQueueIdMethodInfo
ResolveSettingBondPortMethod "getSecretFlags" o = NM.Setting.SettingGetSecretFlagsMethodInfo
ResolveSettingBondPortMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSettingBondPortMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSettingBondPortMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSettingBondPortMethod "setSecretFlags" o = NM.Setting.SettingSetSecretFlagsMethodInfo
ResolveSettingBondPortMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSettingBondPortMethod t SettingBondPort, O.OverloadedMethod info SettingBondPort p) => OL.IsLabel t (SettingBondPort -> 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 ~ ResolveSettingBondPortMethod t SettingBondPort, O.OverloadedMethod info SettingBondPort p, R.HasField t SettingBondPort p) => R.HasField t SettingBondPort p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSettingBondPortMethod t SettingBondPort, O.OverloadedMethodInfo info SettingBondPort) => OL.IsLabel t (O.MethodProxy info SettingBondPort) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getSettingBondPortPrio :: (MonadIO m, IsSettingBondPort o) => o -> m Int32
getSettingBondPortPrio :: forall (m :: * -> *) o.
(MonadIO m, IsSettingBondPort o) =>
o -> m Int32
getSettingBondPortPrio o
obj = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"prio"
setSettingBondPortPrio :: (MonadIO m, IsSettingBondPort o) => o -> Int32 -> m ()
setSettingBondPortPrio :: forall (m :: * -> *) o.
(MonadIO m, IsSettingBondPort o) =>
o -> Int32 -> m ()
setSettingBondPortPrio o
obj Int32
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 -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"prio" Int32
val
constructSettingBondPortPrio :: (IsSettingBondPort o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructSettingBondPortPrio :: forall o (m :: * -> *).
(IsSettingBondPort o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructSettingBondPortPrio Int32
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 -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"prio" Int32
val
#if defined(ENABLE_OVERLOADING)
data SettingBondPortPrioPropertyInfo
instance AttrInfo SettingBondPortPrioPropertyInfo where
type AttrAllowedOps SettingBondPortPrioPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint SettingBondPortPrioPropertyInfo = IsSettingBondPort
type AttrSetTypeConstraint SettingBondPortPrioPropertyInfo = (~) Int32
type AttrTransferTypeConstraint SettingBondPortPrioPropertyInfo = (~) Int32
type AttrTransferType SettingBondPortPrioPropertyInfo = Int32
type AttrGetType SettingBondPortPrioPropertyInfo = Int32
type AttrLabel SettingBondPortPrioPropertyInfo = "prio"
type AttrOrigin SettingBondPortPrioPropertyInfo = SettingBondPort
attrGet = getSettingBondPortPrio
attrSet = setSettingBondPortPrio
attrTransfer _ v = do
return v
attrConstruct = constructSettingBondPortPrio
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.SettingBondPort.prio"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingBondPort.html#g:attr:prio"
})
#endif
getSettingBondPortQueueId :: (MonadIO m, IsSettingBondPort o) => o -> m Word32
getSettingBondPortQueueId :: forall (m :: * -> *) o.
(MonadIO m, IsSettingBondPort o) =>
o -> m Word32
getSettingBondPortQueueId 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
"queue-id"
setSettingBondPortQueueId :: (MonadIO m, IsSettingBondPort o) => o -> Word32 -> m ()
setSettingBondPortQueueId :: forall (m :: * -> *) o.
(MonadIO m, IsSettingBondPort o) =>
o -> Word32 -> m ()
setSettingBondPortQueueId o
obj Word32
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 -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"queue-id" Word32
val
constructSettingBondPortQueueId :: (IsSettingBondPort o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructSettingBondPortQueueId :: forall o (m :: * -> *).
(IsSettingBondPort o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructSettingBondPortQueueId Word32
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 -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"queue-id" Word32
val
#if defined(ENABLE_OVERLOADING)
data SettingBondPortQueueIdPropertyInfo
instance AttrInfo SettingBondPortQueueIdPropertyInfo where
type AttrAllowedOps SettingBondPortQueueIdPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint SettingBondPortQueueIdPropertyInfo = IsSettingBondPort
type AttrSetTypeConstraint SettingBondPortQueueIdPropertyInfo = (~) Word32
type AttrTransferTypeConstraint SettingBondPortQueueIdPropertyInfo = (~) Word32
type AttrTransferType SettingBondPortQueueIdPropertyInfo = Word32
type AttrGetType SettingBondPortQueueIdPropertyInfo = Word32
type AttrLabel SettingBondPortQueueIdPropertyInfo = "queue-id"
type AttrOrigin SettingBondPortQueueIdPropertyInfo = SettingBondPort
attrGet = getSettingBondPortQueueId
attrSet = setSettingBondPortQueueId
attrTransfer _ v = do
return v
attrConstruct = constructSettingBondPortQueueId
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.SettingBondPort.queueId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingBondPort.html#g:attr:queueId"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SettingBondPort
type instance O.AttributeList SettingBondPort = SettingBondPortAttributeList
type SettingBondPortAttributeList = ('[ '("name", NM.Setting.SettingNamePropertyInfo), '("prio", SettingBondPortPrioPropertyInfo), '("queueId", SettingBondPortQueueIdPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
settingBondPortPrio :: AttrLabelProxy "prio"
settingBondPortPrio = AttrLabelProxy
settingBondPortQueueId :: AttrLabelProxy "queueId"
settingBondPortQueueId = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SettingBondPort = SettingBondPortSignalList
type SettingBondPortSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_setting_bond_port_new" nm_setting_bond_port_new ::
IO (Ptr SettingBondPort)
settingBondPortNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m SettingBondPort
settingBondPortNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
m SettingBondPort
settingBondPortNew = IO SettingBondPort -> m SettingBondPort
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SettingBondPort -> m SettingBondPort)
-> IO SettingBondPort -> m SettingBondPort
forall a b. (a -> b) -> a -> b
$ do
Ptr SettingBondPort
result <- IO (Ptr SettingBondPort)
nm_setting_bond_port_new
Text -> Ptr SettingBondPort -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"settingBondPortNew" Ptr SettingBondPort
result
SettingBondPort
result' <- ((ManagedPtr SettingBondPort -> SettingBondPort)
-> Ptr SettingBondPort -> IO SettingBondPort
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SettingBondPort -> SettingBondPort
SettingBondPort) Ptr SettingBondPort
result
SettingBondPort -> IO SettingBondPort
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SettingBondPort
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "nm_setting_bond_port_get_prio" nm_setting_bond_port_get_prio ::
Ptr SettingBondPort ->
IO Int32
settingBondPortGetPrio ::
(B.CallStack.HasCallStack, MonadIO m, IsSettingBondPort a) =>
a
-> m Int32
settingBondPortGetPrio :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingBondPort a) =>
a -> m Int32
settingBondPortGetPrio a
setting = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr SettingBondPort
setting' <- a -> IO (Ptr SettingBondPort)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
Int32
result <- Ptr SettingBondPort -> IO Int32
nm_setting_bond_port_get_prio Ptr SettingBondPort
setting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SettingBondPortGetPrioMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSettingBondPort a) => O.OverloadedMethod SettingBondPortGetPrioMethodInfo a signature where
overloadedMethod = settingBondPortGetPrio
instance O.OverloadedMethodInfo SettingBondPortGetPrioMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.SettingBondPort.settingBondPortGetPrio",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingBondPort.html#v:settingBondPortGetPrio"
})
#endif
foreign import ccall "nm_setting_bond_port_get_queue_id" nm_setting_bond_port_get_queue_id ::
Ptr SettingBondPort ->
IO Word32
settingBondPortGetQueueId ::
(B.CallStack.HasCallStack, MonadIO m, IsSettingBondPort a) =>
a
-> m Word32
settingBondPortGetQueueId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSettingBondPort a) =>
a -> m Word32
settingBondPortGetQueueId a
setting = 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 SettingBondPort
setting' <- a -> IO (Ptr SettingBondPort)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
setting
Word32
result <- Ptr SettingBondPort -> IO Word32
nm_setting_bond_port_get_queue_id Ptr SettingBondPort
setting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
setting
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data SettingBondPortGetQueueIdMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsSettingBondPort a) => O.OverloadedMethod SettingBondPortGetQueueIdMethodInfo a signature where
overloadedMethod = settingBondPortGetQueueId
instance O.OverloadedMethodInfo SettingBondPortGetQueueIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.SettingBondPort.settingBondPortGetQueueId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-SettingBondPort.html#v:settingBondPortGetQueueId"
})
#endif