{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.DeviceVlan
(
DeviceVlan(..) ,
IsDeviceVlan ,
toDeviceVlan ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceVlanMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceVlanGetCarrierMethodInfo ,
#endif
deviceVlanGetCarrier ,
#if defined(ENABLE_OVERLOADING)
DeviceVlanGetParentMethodInfo ,
#endif
deviceVlanGetParent ,
#if defined(ENABLE_OVERLOADING)
DeviceVlanGetVlanIdMethodInfo ,
#endif
deviceVlanGetVlanId ,
#if defined(ENABLE_OVERLOADING)
DeviceVlanCarrierPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceVlanCarrier ,
#endif
getDeviceVlanCarrier ,
#if defined(ENABLE_OVERLOADING)
DeviceVlanParentPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceVlanParent ,
#endif
getDeviceVlanParent ,
#if defined(ENABLE_OVERLOADING)
DeviceVlanVlanIdPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceVlanVlanId ,
#endif
getDeviceVlanVlanId ,
) 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 DeviceVlan = DeviceVlan (SP.ManagedPtr DeviceVlan)
deriving (DeviceVlan -> DeviceVlan -> Bool
(DeviceVlan -> DeviceVlan -> Bool)
-> (DeviceVlan -> DeviceVlan -> Bool) -> Eq DeviceVlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceVlan -> DeviceVlan -> Bool
== :: DeviceVlan -> DeviceVlan -> Bool
$c/= :: DeviceVlan -> DeviceVlan -> Bool
/= :: DeviceVlan -> DeviceVlan -> Bool
Eq)
instance SP.ManagedPtrNewtype DeviceVlan where
toManagedPtr :: DeviceVlan -> ManagedPtr DeviceVlan
toManagedPtr (DeviceVlan ManagedPtr DeviceVlan
p) = ManagedPtr DeviceVlan
p
foreign import ccall "nm_device_vlan_get_type"
c_nm_device_vlan_get_type :: IO B.Types.GType
instance B.Types.TypedObject DeviceVlan where
glibType :: IO GType
glibType = IO GType
c_nm_device_vlan_get_type
instance B.Types.GObject DeviceVlan
class (SP.GObject o, O.IsDescendantOf DeviceVlan o) => IsDeviceVlan o
instance (SP.GObject o, O.IsDescendantOf DeviceVlan o) => IsDeviceVlan o
instance O.HasParentTypes DeviceVlan
type instance O.ParentTypes DeviceVlan = '[NM.Device.Device, NM.Object.Object, GObject.Object.Object]
toDeviceVlan :: (MIO.MonadIO m, IsDeviceVlan o) => o -> m DeviceVlan
toDeviceVlan :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceVlan o) =>
o -> m DeviceVlan
toDeviceVlan = IO DeviceVlan -> m DeviceVlan
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceVlan -> m DeviceVlan)
-> (o -> IO DeviceVlan) -> o -> m DeviceVlan
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DeviceVlan -> DeviceVlan) -> o -> IO DeviceVlan
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DeviceVlan -> DeviceVlan
DeviceVlan
instance B.GValue.IsGValue (Maybe DeviceVlan) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_vlan_get_type
gvalueSet_ :: Ptr GValue -> Maybe DeviceVlan -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DeviceVlan
P.Nothing = Ptr GValue -> Ptr DeviceVlan -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DeviceVlan
forall a. Ptr a
FP.nullPtr :: FP.Ptr DeviceVlan)
gvalueSet_ Ptr GValue
gv (P.Just DeviceVlan
obj) = DeviceVlan -> (Ptr DeviceVlan -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DeviceVlan
obj (Ptr GValue -> Ptr DeviceVlan -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DeviceVlan)
gvalueGet_ Ptr GValue
gv = do
Ptr DeviceVlan
ptr <- Ptr GValue -> IO (Ptr DeviceVlan)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DeviceVlan)
if Ptr DeviceVlan
ptr Ptr DeviceVlan -> Ptr DeviceVlan -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DeviceVlan
forall a. Ptr a
FP.nullPtr
then DeviceVlan -> Maybe DeviceVlan
forall a. a -> Maybe a
P.Just (DeviceVlan -> Maybe DeviceVlan)
-> IO DeviceVlan -> IO (Maybe DeviceVlan)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DeviceVlan -> DeviceVlan)
-> Ptr DeviceVlan -> IO DeviceVlan
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DeviceVlan -> DeviceVlan
DeviceVlan Ptr DeviceVlan
ptr
else Maybe DeviceVlan -> IO (Maybe DeviceVlan)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DeviceVlan
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceVlanMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceVlanMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceVlanMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceVlanMethod "connectionCompatible" o = NM.Device.DeviceConnectionCompatibleMethodInfo
ResolveDeviceVlanMethod "connectionValid" o = NM.Device.DeviceConnectionValidMethodInfo
ResolveDeviceVlanMethod "delete" o = NM.Device.DeviceDeleteMethodInfo
ResolveDeviceVlanMethod "deleteAsync" o = NM.Device.DeviceDeleteAsyncMethodInfo
ResolveDeviceVlanMethod "deleteFinish" o = NM.Device.DeviceDeleteFinishMethodInfo
ResolveDeviceVlanMethod "disconnect" o = NM.Device.DeviceDisconnectMethodInfo
ResolveDeviceVlanMethod "disconnectAsync" o = NM.Device.DeviceDisconnectAsyncMethodInfo
ResolveDeviceVlanMethod "disconnectFinish" o = NM.Device.DeviceDisconnectFinishMethodInfo
ResolveDeviceVlanMethod "filterConnections" o = NM.Device.DeviceFilterConnectionsMethodInfo
ResolveDeviceVlanMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceVlanMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceVlanMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceVlanMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceVlanMethod "isReal" o = NM.Device.DeviceIsRealMethodInfo
ResolveDeviceVlanMethod "isSoftware" o = NM.Device.DeviceIsSoftwareMethodInfo
ResolveDeviceVlanMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceVlanMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceVlanMethod "reapply" o = NM.Device.DeviceReapplyMethodInfo
ResolveDeviceVlanMethod "reapplyAsync" o = NM.Device.DeviceReapplyAsyncMethodInfo
ResolveDeviceVlanMethod "reapplyFinish" o = NM.Device.DeviceReapplyFinishMethodInfo
ResolveDeviceVlanMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceVlanMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceVlanMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceVlanMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceVlanMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceVlanMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceVlanMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceVlanMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceVlanMethod "getActiveConnection" o = NM.Device.DeviceGetActiveConnectionMethodInfo
ResolveDeviceVlanMethod "getAppliedConnection" o = NM.Device.DeviceGetAppliedConnectionMethodInfo
ResolveDeviceVlanMethod "getAppliedConnectionAsync" o = NM.Device.DeviceGetAppliedConnectionAsyncMethodInfo
ResolveDeviceVlanMethod "getAppliedConnectionFinish" o = NM.Device.DeviceGetAppliedConnectionFinishMethodInfo
ResolveDeviceVlanMethod "getAutoconnect" o = NM.Device.DeviceGetAutoconnectMethodInfo
ResolveDeviceVlanMethod "getAvailableConnections" o = NM.Device.DeviceGetAvailableConnectionsMethodInfo
ResolveDeviceVlanMethod "getCapabilities" o = NM.Device.DeviceGetCapabilitiesMethodInfo
ResolveDeviceVlanMethod "getCarrier" o = DeviceVlanGetCarrierMethodInfo
ResolveDeviceVlanMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveDeviceVlanMethod "getConnectivity" o = NM.Device.DeviceGetConnectivityMethodInfo
ResolveDeviceVlanMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceVlanMethod "getDescription" o = NM.Device.DeviceGetDescriptionMethodInfo
ResolveDeviceVlanMethod "getDeviceType" o = NM.Device.DeviceGetDeviceTypeMethodInfo
ResolveDeviceVlanMethod "getDhcp4Config" o = NM.Device.DeviceGetDhcp4ConfigMethodInfo
ResolveDeviceVlanMethod "getDhcp6Config" o = NM.Device.DeviceGetDhcp6ConfigMethodInfo
ResolveDeviceVlanMethod "getDriver" o = NM.Device.DeviceGetDriverMethodInfo
ResolveDeviceVlanMethod "getDriverVersion" o = NM.Device.DeviceGetDriverVersionMethodInfo
ResolveDeviceVlanMethod "getFirmwareMissing" o = NM.Device.DeviceGetFirmwareMissingMethodInfo
ResolveDeviceVlanMethod "getFirmwareVersion" o = NM.Device.DeviceGetFirmwareVersionMethodInfo
ResolveDeviceVlanMethod "getHwAddress" o = NM.Device.DeviceGetHwAddressMethodInfo
ResolveDeviceVlanMethod "getIface" o = NM.Device.DeviceGetIfaceMethodInfo
ResolveDeviceVlanMethod "getInterfaceFlags" o = NM.Device.DeviceGetInterfaceFlagsMethodInfo
ResolveDeviceVlanMethod "getIp4Config" o = NM.Device.DeviceGetIp4ConfigMethodInfo
ResolveDeviceVlanMethod "getIp6Config" o = NM.Device.DeviceGetIp6ConfigMethodInfo
ResolveDeviceVlanMethod "getIpIface" o = NM.Device.DeviceGetIpIfaceMethodInfo
ResolveDeviceVlanMethod "getLldpNeighbors" o = NM.Device.DeviceGetLldpNeighborsMethodInfo
ResolveDeviceVlanMethod "getManaged" o = NM.Device.DeviceGetManagedMethodInfo
ResolveDeviceVlanMethod "getMetered" o = NM.Device.DeviceGetMeteredMethodInfo
ResolveDeviceVlanMethod "getMtu" o = NM.Device.DeviceGetMtuMethodInfo
ResolveDeviceVlanMethod "getNmPluginMissing" o = NM.Device.DeviceGetNmPluginMissingMethodInfo
ResolveDeviceVlanMethod "getParent" o = DeviceVlanGetParentMethodInfo
ResolveDeviceVlanMethod "getPath" o = NM.Device.DeviceGetPathMethodInfo
ResolveDeviceVlanMethod "getPhysicalPortId" o = NM.Device.DeviceGetPhysicalPortIdMethodInfo
ResolveDeviceVlanMethod "getPorts" o = NM.Device.DeviceGetPortsMethodInfo
ResolveDeviceVlanMethod "getProduct" o = NM.Device.DeviceGetProductMethodInfo
ResolveDeviceVlanMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceVlanMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceVlanMethod "getSettingType" o = NM.Device.DeviceGetSettingTypeMethodInfo
ResolveDeviceVlanMethod "getState" o = NM.Device.DeviceGetStateMethodInfo
ResolveDeviceVlanMethod "getStateReason" o = NM.Device.DeviceGetStateReasonMethodInfo
ResolveDeviceVlanMethod "getTypeDescription" o = NM.Device.DeviceGetTypeDescriptionMethodInfo
ResolveDeviceVlanMethod "getUdi" o = NM.Device.DeviceGetUdiMethodInfo
ResolveDeviceVlanMethod "getVendor" o = NM.Device.DeviceGetVendorMethodInfo
ResolveDeviceVlanMethod "getVlanId" o = DeviceVlanGetVlanIdMethodInfo
ResolveDeviceVlanMethod "setAutoconnect" o = NM.Device.DeviceSetAutoconnectMethodInfo
ResolveDeviceVlanMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceVlanMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceVlanMethod "setManaged" o = NM.Device.DeviceSetManagedMethodInfo
ResolveDeviceVlanMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceVlanMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceVlanMethod t DeviceVlan, O.OverloadedMethod info DeviceVlan p) => OL.IsLabel t (DeviceVlan -> 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 ~ ResolveDeviceVlanMethod t DeviceVlan, O.OverloadedMethod info DeviceVlan p, R.HasField t DeviceVlan p) => R.HasField t DeviceVlan p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceVlanMethod t DeviceVlan, O.OverloadedMethodInfo info DeviceVlan) => OL.IsLabel t (O.MethodProxy info DeviceVlan) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDeviceVlanCarrier :: (MonadIO m, IsDeviceVlan o) => o -> m Bool
getDeviceVlanCarrier :: forall (m :: * -> *) o. (MonadIO m, IsDeviceVlan o) => o -> m Bool
getDeviceVlanCarrier 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 DeviceVlanCarrierPropertyInfo
instance AttrInfo DeviceVlanCarrierPropertyInfo where
type AttrAllowedOps DeviceVlanCarrierPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceVlanCarrierPropertyInfo = IsDeviceVlan
type AttrSetTypeConstraint DeviceVlanCarrierPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceVlanCarrierPropertyInfo = (~) ()
type AttrTransferType DeviceVlanCarrierPropertyInfo = ()
type AttrGetType DeviceVlanCarrierPropertyInfo = Bool
type AttrLabel DeviceVlanCarrierPropertyInfo = "carrier"
type AttrOrigin DeviceVlanCarrierPropertyInfo = DeviceVlan
attrGet = getDeviceVlanCarrier
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceVlan.carrier"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceVlan.html#g:attr:carrier"
})
#endif
getDeviceVlanParent :: (MonadIO m, IsDeviceVlan o) => o -> m NM.Device.Device
getDeviceVlanParent :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceVlan o) =>
o -> m Device
getDeviceVlanParent o
obj = 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) -> IO Device -> m Device
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Device) -> IO Device
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceVlanParent" (IO (Maybe Device) -> IO Device) -> IO (Maybe Device) -> IO Device
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Device -> Device) -> IO (Maybe Device)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"parent" ManagedPtr Device -> Device
NM.Device.Device
#if defined(ENABLE_OVERLOADING)
data DeviceVlanParentPropertyInfo
instance AttrInfo DeviceVlanParentPropertyInfo where
type AttrAllowedOps DeviceVlanParentPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceVlanParentPropertyInfo = IsDeviceVlan
type AttrSetTypeConstraint DeviceVlanParentPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceVlanParentPropertyInfo = (~) ()
type AttrTransferType DeviceVlanParentPropertyInfo = ()
type AttrGetType DeviceVlanParentPropertyInfo = NM.Device.Device
type AttrLabel DeviceVlanParentPropertyInfo = "parent"
type AttrOrigin DeviceVlanParentPropertyInfo = DeviceVlan
attrGet = getDeviceVlanParent
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceVlan.parent"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceVlan.html#g:attr:parent"
})
#endif
getDeviceVlanVlanId :: (MonadIO m, IsDeviceVlan o) => o -> m Word32
getDeviceVlanVlanId :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceVlan o) =>
o -> m Word32
getDeviceVlanVlanId 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
"vlan-id"
#if defined(ENABLE_OVERLOADING)
data DeviceVlanVlanIdPropertyInfo
instance AttrInfo DeviceVlanVlanIdPropertyInfo where
type AttrAllowedOps DeviceVlanVlanIdPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceVlanVlanIdPropertyInfo = IsDeviceVlan
type AttrSetTypeConstraint DeviceVlanVlanIdPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceVlanVlanIdPropertyInfo = (~) ()
type AttrTransferType DeviceVlanVlanIdPropertyInfo = ()
type AttrGetType DeviceVlanVlanIdPropertyInfo = Word32
type AttrLabel DeviceVlanVlanIdPropertyInfo = "vlan-id"
type AttrOrigin DeviceVlanVlanIdPropertyInfo = DeviceVlan
attrGet = getDeviceVlanVlanId
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceVlan.vlanId"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceVlan.html#g:attr:vlanId"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceVlan
type instance O.AttributeList DeviceVlan = DeviceVlanAttributeList
type DeviceVlanAttributeList = ('[ '("activeConnection", NM.Device.DeviceActiveConnectionPropertyInfo), '("autoconnect", NM.Device.DeviceAutoconnectPropertyInfo), '("availableConnections", NM.Device.DeviceAvailableConnectionsPropertyInfo), '("capabilities", NM.Device.DeviceCapabilitiesPropertyInfo), '("carrier", DeviceVlanCarrierPropertyInfo), '("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), '("parent", DeviceVlanParentPropertyInfo), '("path", NM.Device.DevicePathPropertyInfo), '("physicalPortId", NM.Device.DevicePhysicalPortIdPropertyInfo), '("ports", NM.Device.DevicePortsPropertyInfo), '("product", NM.Device.DeviceProductPropertyInfo), '("real", NM.Device.DeviceRealPropertyInfo), '("state", NM.Device.DeviceStatePropertyInfo), '("stateReason", NM.Device.DeviceStateReasonPropertyInfo), '("udi", NM.Device.DeviceUdiPropertyInfo), '("vendor", NM.Device.DeviceVendorPropertyInfo), '("vlanId", DeviceVlanVlanIdPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceVlanCarrier :: AttrLabelProxy "carrier"
deviceVlanCarrier = AttrLabelProxy
deviceVlanParent :: AttrLabelProxy "parent"
deviceVlanParent = AttrLabelProxy
deviceVlanVlanId :: AttrLabelProxy "vlanId"
deviceVlanVlanId = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DeviceVlan = DeviceVlanSignalList
type DeviceVlanSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", NM.Device.DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_device_vlan_get_carrier" nm_device_vlan_get_carrier ::
Ptr DeviceVlan ->
IO CInt
deviceVlanGetCarrier ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceVlan a) =>
a
-> m Bool
deviceVlanGetCarrier :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceVlan a) =>
a -> m Bool
deviceVlanGetCarrier 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 DeviceVlan
device' <- a -> IO (Ptr DeviceVlan)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr DeviceVlan -> IO CInt
nm_device_vlan_get_carrier Ptr DeviceVlan
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 DeviceVlanGetCarrierMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceVlan a) => O.OverloadedMethod DeviceVlanGetCarrierMethodInfo a signature where
overloadedMethod = deviceVlanGetCarrier
instance O.OverloadedMethodInfo DeviceVlanGetCarrierMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceVlan.deviceVlanGetCarrier",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceVlan.html#v:deviceVlanGetCarrier"
})
#endif
foreign import ccall "nm_device_vlan_get_parent" nm_device_vlan_get_parent ::
Ptr DeviceVlan ->
IO (Ptr NM.Device.Device)
deviceVlanGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceVlan a) =>
a
-> m NM.Device.Device
deviceVlanGetParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceVlan a) =>
a -> m Device
deviceVlanGetParent 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 DeviceVlan
device' <- a -> IO (Ptr DeviceVlan)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Device
result <- Ptr DeviceVlan -> IO (Ptr Device)
nm_device_vlan_get_parent Ptr DeviceVlan
device'
Text -> Ptr Device -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceVlanGetParent" Ptr Device
result
Device
result' <- ((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 DeviceVlanGetParentMethodInfo
instance (signature ~ (m NM.Device.Device), MonadIO m, IsDeviceVlan a) => O.OverloadedMethod DeviceVlanGetParentMethodInfo a signature where
overloadedMethod = deviceVlanGetParent
instance O.OverloadedMethodInfo DeviceVlanGetParentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceVlan.deviceVlanGetParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceVlan.html#v:deviceVlanGetParent"
})
#endif
foreign import ccall "nm_device_vlan_get_vlan_id" nm_device_vlan_get_vlan_id ::
Ptr DeviceVlan ->
IO Word32
deviceVlanGetVlanId ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceVlan a) =>
a
-> m Word32
deviceVlanGetVlanId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceVlan a) =>
a -> m Word32
deviceVlanGetVlanId 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 DeviceVlan
device' <- a -> IO (Ptr DeviceVlan)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Word32
result <- Ptr DeviceVlan -> IO Word32
nm_device_vlan_get_vlan_id Ptr DeviceVlan
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 DeviceVlanGetVlanIdMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDeviceVlan a) => O.OverloadedMethod DeviceVlanGetVlanIdMethodInfo a signature where
overloadedMethod = deviceVlanGetVlanId
instance O.OverloadedMethodInfo DeviceVlanGetVlanIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceVlan.deviceVlanGetVlanId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceVlan.html#v:deviceVlanGetVlanId"
})
#endif