{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.DeviceTun
(
DeviceTun(..) ,
IsDeviceTun ,
toDeviceTun ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceTunMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceTunGetGroupMethodInfo ,
#endif
deviceTunGetGroup ,
#if defined(ENABLE_OVERLOADING)
DeviceTunGetModeMethodInfo ,
#endif
deviceTunGetMode ,
#if defined(ENABLE_OVERLOADING)
DeviceTunGetMultiQueueMethodInfo ,
#endif
deviceTunGetMultiQueue ,
#if defined(ENABLE_OVERLOADING)
DeviceTunGetNoPiMethodInfo ,
#endif
deviceTunGetNoPi ,
#if defined(ENABLE_OVERLOADING)
DeviceTunGetOwnerMethodInfo ,
#endif
deviceTunGetOwner ,
#if defined(ENABLE_OVERLOADING)
DeviceTunGetVnetHdrMethodInfo ,
#endif
deviceTunGetVnetHdr ,
#if defined(ENABLE_OVERLOADING)
DeviceTunGroupPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunGroup ,
#endif
getDeviceTunGroup ,
#if defined(ENABLE_OVERLOADING)
DeviceTunModePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunMode ,
#endif
getDeviceTunMode ,
#if defined(ENABLE_OVERLOADING)
DeviceTunMultiQueuePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunMultiQueue ,
#endif
getDeviceTunMultiQueue ,
#if defined(ENABLE_OVERLOADING)
DeviceTunNoPiPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunNoPi ,
#endif
getDeviceTunNoPi ,
#if defined(ENABLE_OVERLOADING)
DeviceTunOwnerPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunOwner ,
#endif
getDeviceTunOwner ,
#if defined(ENABLE_OVERLOADING)
DeviceTunVnetHdrPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunVnetHdr ,
#endif
getDeviceTunVnetHdr ,
) 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 DeviceTun = DeviceTun (SP.ManagedPtr DeviceTun)
deriving (DeviceTun -> DeviceTun -> Bool
(DeviceTun -> DeviceTun -> Bool)
-> (DeviceTun -> DeviceTun -> Bool) -> Eq DeviceTun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceTun -> DeviceTun -> Bool
== :: DeviceTun -> DeviceTun -> Bool
$c/= :: DeviceTun -> DeviceTun -> Bool
/= :: DeviceTun -> DeviceTun -> Bool
Eq)
instance SP.ManagedPtrNewtype DeviceTun where
toManagedPtr :: DeviceTun -> ManagedPtr DeviceTun
toManagedPtr (DeviceTun ManagedPtr DeviceTun
p) = ManagedPtr DeviceTun
p
foreign import ccall "nm_device_tun_get_type"
c_nm_device_tun_get_type :: IO B.Types.GType
instance B.Types.TypedObject DeviceTun where
glibType :: IO GType
glibType = IO GType
c_nm_device_tun_get_type
instance B.Types.GObject DeviceTun
class (SP.GObject o, O.IsDescendantOf DeviceTun o) => IsDeviceTun o
instance (SP.GObject o, O.IsDescendantOf DeviceTun o) => IsDeviceTun o
instance O.HasParentTypes DeviceTun
type instance O.ParentTypes DeviceTun = '[NM.Device.Device, NM.Object.Object, GObject.Object.Object]
toDeviceTun :: (MIO.MonadIO m, IsDeviceTun o) => o -> m DeviceTun
toDeviceTun :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceTun o) =>
o -> m DeviceTun
toDeviceTun = IO DeviceTun -> m DeviceTun
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceTun -> m DeviceTun)
-> (o -> IO DeviceTun) -> o -> m DeviceTun
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DeviceTun -> DeviceTun) -> o -> IO DeviceTun
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DeviceTun -> DeviceTun
DeviceTun
instance B.GValue.IsGValue (Maybe DeviceTun) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_tun_get_type
gvalueSet_ :: Ptr GValue -> Maybe DeviceTun -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DeviceTun
P.Nothing = Ptr GValue -> Ptr DeviceTun -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DeviceTun
forall a. Ptr a
FP.nullPtr :: FP.Ptr DeviceTun)
gvalueSet_ Ptr GValue
gv (P.Just DeviceTun
obj) = DeviceTun -> (Ptr DeviceTun -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DeviceTun
obj (Ptr GValue -> Ptr DeviceTun -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DeviceTun)
gvalueGet_ Ptr GValue
gv = do
Ptr DeviceTun
ptr <- Ptr GValue -> IO (Ptr DeviceTun)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DeviceTun)
if Ptr DeviceTun
ptr Ptr DeviceTun -> Ptr DeviceTun -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DeviceTun
forall a. Ptr a
FP.nullPtr
then DeviceTun -> Maybe DeviceTun
forall a. a -> Maybe a
P.Just (DeviceTun -> Maybe DeviceTun)
-> IO DeviceTun -> IO (Maybe DeviceTun)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DeviceTun -> DeviceTun)
-> Ptr DeviceTun -> IO DeviceTun
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DeviceTun -> DeviceTun
DeviceTun Ptr DeviceTun
ptr
else Maybe DeviceTun -> IO (Maybe DeviceTun)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DeviceTun
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceTunMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceTunMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceTunMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceTunMethod "connectionCompatible" o = NM.Device.DeviceConnectionCompatibleMethodInfo
ResolveDeviceTunMethod "connectionValid" o = NM.Device.DeviceConnectionValidMethodInfo
ResolveDeviceTunMethod "delete" o = NM.Device.DeviceDeleteMethodInfo
ResolveDeviceTunMethod "deleteAsync" o = NM.Device.DeviceDeleteAsyncMethodInfo
ResolveDeviceTunMethod "deleteFinish" o = NM.Device.DeviceDeleteFinishMethodInfo
ResolveDeviceTunMethod "disconnect" o = NM.Device.DeviceDisconnectMethodInfo
ResolveDeviceTunMethod "disconnectAsync" o = NM.Device.DeviceDisconnectAsyncMethodInfo
ResolveDeviceTunMethod "disconnectFinish" o = NM.Device.DeviceDisconnectFinishMethodInfo
ResolveDeviceTunMethod "filterConnections" o = NM.Device.DeviceFilterConnectionsMethodInfo
ResolveDeviceTunMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceTunMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceTunMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceTunMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceTunMethod "isReal" o = NM.Device.DeviceIsRealMethodInfo
ResolveDeviceTunMethod "isSoftware" o = NM.Device.DeviceIsSoftwareMethodInfo
ResolveDeviceTunMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceTunMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceTunMethod "reapply" o = NM.Device.DeviceReapplyMethodInfo
ResolveDeviceTunMethod "reapplyAsync" o = NM.Device.DeviceReapplyAsyncMethodInfo
ResolveDeviceTunMethod "reapplyFinish" o = NM.Device.DeviceReapplyFinishMethodInfo
ResolveDeviceTunMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceTunMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceTunMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceTunMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceTunMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceTunMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceTunMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceTunMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceTunMethod "getActiveConnection" o = NM.Device.DeviceGetActiveConnectionMethodInfo
ResolveDeviceTunMethod "getAppliedConnection" o = NM.Device.DeviceGetAppliedConnectionMethodInfo
ResolveDeviceTunMethod "getAppliedConnectionAsync" o = NM.Device.DeviceGetAppliedConnectionAsyncMethodInfo
ResolveDeviceTunMethod "getAppliedConnectionFinish" o = NM.Device.DeviceGetAppliedConnectionFinishMethodInfo
ResolveDeviceTunMethod "getAutoconnect" o = NM.Device.DeviceGetAutoconnectMethodInfo
ResolveDeviceTunMethod "getAvailableConnections" o = NM.Device.DeviceGetAvailableConnectionsMethodInfo
ResolveDeviceTunMethod "getCapabilities" o = NM.Device.DeviceGetCapabilitiesMethodInfo
ResolveDeviceTunMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveDeviceTunMethod "getConnectivity" o = NM.Device.DeviceGetConnectivityMethodInfo
ResolveDeviceTunMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceTunMethod "getDescription" o = NM.Device.DeviceGetDescriptionMethodInfo
ResolveDeviceTunMethod "getDeviceType" o = NM.Device.DeviceGetDeviceTypeMethodInfo
ResolveDeviceTunMethod "getDhcp4Config" o = NM.Device.DeviceGetDhcp4ConfigMethodInfo
ResolveDeviceTunMethod "getDhcp6Config" o = NM.Device.DeviceGetDhcp6ConfigMethodInfo
ResolveDeviceTunMethod "getDriver" o = NM.Device.DeviceGetDriverMethodInfo
ResolveDeviceTunMethod "getDriverVersion" o = NM.Device.DeviceGetDriverVersionMethodInfo
ResolveDeviceTunMethod "getFirmwareMissing" o = NM.Device.DeviceGetFirmwareMissingMethodInfo
ResolveDeviceTunMethod "getFirmwareVersion" o = NM.Device.DeviceGetFirmwareVersionMethodInfo
ResolveDeviceTunMethod "getGroup" o = DeviceTunGetGroupMethodInfo
ResolveDeviceTunMethod "getHwAddress" o = NM.Device.DeviceGetHwAddressMethodInfo
ResolveDeviceTunMethod "getIface" o = NM.Device.DeviceGetIfaceMethodInfo
ResolveDeviceTunMethod "getInterfaceFlags" o = NM.Device.DeviceGetInterfaceFlagsMethodInfo
ResolveDeviceTunMethod "getIp4Config" o = NM.Device.DeviceGetIp4ConfigMethodInfo
ResolveDeviceTunMethod "getIp6Config" o = NM.Device.DeviceGetIp6ConfigMethodInfo
ResolveDeviceTunMethod "getIpIface" o = NM.Device.DeviceGetIpIfaceMethodInfo
ResolveDeviceTunMethod "getLldpNeighbors" o = NM.Device.DeviceGetLldpNeighborsMethodInfo
ResolveDeviceTunMethod "getManaged" o = NM.Device.DeviceGetManagedMethodInfo
ResolveDeviceTunMethod "getMetered" o = NM.Device.DeviceGetMeteredMethodInfo
ResolveDeviceTunMethod "getMode" o = DeviceTunGetModeMethodInfo
ResolveDeviceTunMethod "getMtu" o = NM.Device.DeviceGetMtuMethodInfo
ResolveDeviceTunMethod "getMultiQueue" o = DeviceTunGetMultiQueueMethodInfo
ResolveDeviceTunMethod "getNmPluginMissing" o = NM.Device.DeviceGetNmPluginMissingMethodInfo
ResolveDeviceTunMethod "getNoPi" o = DeviceTunGetNoPiMethodInfo
ResolveDeviceTunMethod "getOwner" o = DeviceTunGetOwnerMethodInfo
ResolveDeviceTunMethod "getPath" o = NM.Device.DeviceGetPathMethodInfo
ResolveDeviceTunMethod "getPhysicalPortId" o = NM.Device.DeviceGetPhysicalPortIdMethodInfo
ResolveDeviceTunMethod "getPorts" o = NM.Device.DeviceGetPortsMethodInfo
ResolveDeviceTunMethod "getProduct" o = NM.Device.DeviceGetProductMethodInfo
ResolveDeviceTunMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceTunMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceTunMethod "getSettingType" o = NM.Device.DeviceGetSettingTypeMethodInfo
ResolveDeviceTunMethod "getState" o = NM.Device.DeviceGetStateMethodInfo
ResolveDeviceTunMethod "getStateReason" o = NM.Device.DeviceGetStateReasonMethodInfo
ResolveDeviceTunMethod "getTypeDescription" o = NM.Device.DeviceGetTypeDescriptionMethodInfo
ResolveDeviceTunMethod "getUdi" o = NM.Device.DeviceGetUdiMethodInfo
ResolveDeviceTunMethod "getVendor" o = NM.Device.DeviceGetVendorMethodInfo
ResolveDeviceTunMethod "getVnetHdr" o = DeviceTunGetVnetHdrMethodInfo
ResolveDeviceTunMethod "setAutoconnect" o = NM.Device.DeviceSetAutoconnectMethodInfo
ResolveDeviceTunMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceTunMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceTunMethod "setManaged" o = NM.Device.DeviceSetManagedMethodInfo
ResolveDeviceTunMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceTunMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceTunMethod t DeviceTun, O.OverloadedMethod info DeviceTun p) => OL.IsLabel t (DeviceTun -> 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 ~ ResolveDeviceTunMethod t DeviceTun, O.OverloadedMethod info DeviceTun p, R.HasField t DeviceTun p) => R.HasField t DeviceTun p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceTunMethod t DeviceTun, O.OverloadedMethodInfo info DeviceTun) => OL.IsLabel t (O.MethodProxy info DeviceTun) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDeviceTunGroup :: (MonadIO m, IsDeviceTun o) => o -> m Int64
getDeviceTunGroup :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTun o) => o -> m Int64
getDeviceTunGroup o
obj = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj String
"group"
#if defined(ENABLE_OVERLOADING)
data DeviceTunGroupPropertyInfo
instance AttrInfo DeviceTunGroupPropertyInfo where
type AttrAllowedOps DeviceTunGroupPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceTunGroupPropertyInfo = IsDeviceTun
type AttrSetTypeConstraint DeviceTunGroupPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceTunGroupPropertyInfo = (~) ()
type AttrTransferType DeviceTunGroupPropertyInfo = ()
type AttrGetType DeviceTunGroupPropertyInfo = Int64
type AttrLabel DeviceTunGroupPropertyInfo = "group"
type AttrOrigin DeviceTunGroupPropertyInfo = DeviceTun
attrGet = getDeviceTunGroup
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.group"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#g:attr:group"
})
#endif
getDeviceTunMode :: (MonadIO m, IsDeviceTun o) => o -> m T.Text
getDeviceTunMode :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTun o) => o -> m Text
getDeviceTunMode 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
"getDeviceTunMode" (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
"mode"
#if defined(ENABLE_OVERLOADING)
data DeviceTunModePropertyInfo
instance AttrInfo DeviceTunModePropertyInfo where
type AttrAllowedOps DeviceTunModePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceTunModePropertyInfo = IsDeviceTun
type AttrSetTypeConstraint DeviceTunModePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceTunModePropertyInfo = (~) ()
type AttrTransferType DeviceTunModePropertyInfo = ()
type AttrGetType DeviceTunModePropertyInfo = T.Text
type AttrLabel DeviceTunModePropertyInfo = "mode"
type AttrOrigin DeviceTunModePropertyInfo = DeviceTun
attrGet = getDeviceTunMode
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.mode"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#g:attr:mode"
})
#endif
getDeviceTunMultiQueue :: (MonadIO m, IsDeviceTun o) => o -> m Bool
getDeviceTunMultiQueue :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTun o) => o -> m Bool
getDeviceTunMultiQueue 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
"multi-queue"
#if defined(ENABLE_OVERLOADING)
data DeviceTunMultiQueuePropertyInfo
instance AttrInfo DeviceTunMultiQueuePropertyInfo where
type AttrAllowedOps DeviceTunMultiQueuePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceTunMultiQueuePropertyInfo = IsDeviceTun
type AttrSetTypeConstraint DeviceTunMultiQueuePropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceTunMultiQueuePropertyInfo = (~) ()
type AttrTransferType DeviceTunMultiQueuePropertyInfo = ()
type AttrGetType DeviceTunMultiQueuePropertyInfo = Bool
type AttrLabel DeviceTunMultiQueuePropertyInfo = "multi-queue"
type AttrOrigin DeviceTunMultiQueuePropertyInfo = DeviceTun
attrGet = getDeviceTunMultiQueue
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.multiQueue"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#g:attr:multiQueue"
})
#endif
getDeviceTunNoPi :: (MonadIO m, IsDeviceTun o) => o -> m Bool
getDeviceTunNoPi :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTun o) => o -> m Bool
getDeviceTunNoPi 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
"no-pi"
#if defined(ENABLE_OVERLOADING)
data DeviceTunNoPiPropertyInfo
instance AttrInfo DeviceTunNoPiPropertyInfo where
type AttrAllowedOps DeviceTunNoPiPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceTunNoPiPropertyInfo = IsDeviceTun
type AttrSetTypeConstraint DeviceTunNoPiPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceTunNoPiPropertyInfo = (~) ()
type AttrTransferType DeviceTunNoPiPropertyInfo = ()
type AttrGetType DeviceTunNoPiPropertyInfo = Bool
type AttrLabel DeviceTunNoPiPropertyInfo = "no-pi"
type AttrOrigin DeviceTunNoPiPropertyInfo = DeviceTun
attrGet = getDeviceTunNoPi
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.noPi"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#g:attr:noPi"
})
#endif
getDeviceTunOwner :: (MonadIO m, IsDeviceTun o) => o -> m Int64
getDeviceTunOwner :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTun o) => o -> m Int64
getDeviceTunOwner o
obj = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj String
"owner"
#if defined(ENABLE_OVERLOADING)
data DeviceTunOwnerPropertyInfo
instance AttrInfo DeviceTunOwnerPropertyInfo where
type AttrAllowedOps DeviceTunOwnerPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceTunOwnerPropertyInfo = IsDeviceTun
type AttrSetTypeConstraint DeviceTunOwnerPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceTunOwnerPropertyInfo = (~) ()
type AttrTransferType DeviceTunOwnerPropertyInfo = ()
type AttrGetType DeviceTunOwnerPropertyInfo = Int64
type AttrLabel DeviceTunOwnerPropertyInfo = "owner"
type AttrOrigin DeviceTunOwnerPropertyInfo = DeviceTun
attrGet = getDeviceTunOwner
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.owner"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#g:attr:owner"
})
#endif
getDeviceTunVnetHdr :: (MonadIO m, IsDeviceTun o) => o -> m Bool
getDeviceTunVnetHdr :: forall (m :: * -> *) o. (MonadIO m, IsDeviceTun o) => o -> m Bool
getDeviceTunVnetHdr 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
"vnet-hdr"
#if defined(ENABLE_OVERLOADING)
data DeviceTunVnetHdrPropertyInfo
instance AttrInfo DeviceTunVnetHdrPropertyInfo where
type AttrAllowedOps DeviceTunVnetHdrPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceTunVnetHdrPropertyInfo = IsDeviceTun
type AttrSetTypeConstraint DeviceTunVnetHdrPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceTunVnetHdrPropertyInfo = (~) ()
type AttrTransferType DeviceTunVnetHdrPropertyInfo = ()
type AttrGetType DeviceTunVnetHdrPropertyInfo = Bool
type AttrLabel DeviceTunVnetHdrPropertyInfo = "vnet-hdr"
type AttrOrigin DeviceTunVnetHdrPropertyInfo = DeviceTun
attrGet = getDeviceTunVnetHdr
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.vnetHdr"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#g:attr:vnetHdr"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceTun
type instance O.AttributeList DeviceTun = DeviceTunAttributeList
type DeviceTunAttributeList = ('[ '("activeConnection", NM.Device.DeviceActiveConnectionPropertyInfo), '("autoconnect", NM.Device.DeviceAutoconnectPropertyInfo), '("availableConnections", NM.Device.DeviceAvailableConnectionsPropertyInfo), '("capabilities", NM.Device.DeviceCapabilitiesPropertyInfo), '("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), '("group", DeviceTunGroupPropertyInfo), '("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), '("mode", DeviceTunModePropertyInfo), '("mtu", NM.Device.DeviceMtuPropertyInfo), '("multiQueue", DeviceTunMultiQueuePropertyInfo), '("nmPluginMissing", NM.Device.DeviceNmPluginMissingPropertyInfo), '("noPi", DeviceTunNoPiPropertyInfo), '("owner", DeviceTunOwnerPropertyInfo), '("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), '("vnetHdr", DeviceTunVnetHdrPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceTunGroup :: AttrLabelProxy "group"
deviceTunGroup = AttrLabelProxy
deviceTunMode :: AttrLabelProxy "mode"
deviceTunMode = AttrLabelProxy
deviceTunMultiQueue :: AttrLabelProxy "multiQueue"
deviceTunMultiQueue = AttrLabelProxy
deviceTunNoPi :: AttrLabelProxy "noPi"
deviceTunNoPi = AttrLabelProxy
deviceTunOwner :: AttrLabelProxy "owner"
deviceTunOwner = AttrLabelProxy
deviceTunVnetHdr :: AttrLabelProxy "vnetHdr"
deviceTunVnetHdr = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DeviceTun = DeviceTunSignalList
type DeviceTunSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", NM.Device.DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_device_tun_get_group" nm_device_tun_get_group ::
Ptr DeviceTun ->
IO Int64
deviceTunGetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceTun a) =>
a
-> m Int64
deviceTunGetGroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTun a) =>
a -> m Int64
deviceTunGetGroup a
device = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr DeviceTun
device' <- a -> IO (Ptr DeviceTun)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Int64
result <- Ptr DeviceTun -> IO Int64
nm_device_tun_get_group Ptr DeviceTun
device'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data DeviceTunGetGroupMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsDeviceTun a) => O.OverloadedMethod DeviceTunGetGroupMethodInfo a signature where
overloadedMethod = deviceTunGetGroup
instance O.OverloadedMethodInfo DeviceTunGetGroupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.deviceTunGetGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#v:deviceTunGetGroup"
})
#endif
foreign import ccall "nm_device_tun_get_mode" nm_device_tun_get_mode ::
Ptr DeviceTun ->
IO CString
deviceTunGetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceTun a) =>
a
-> m T.Text
deviceTunGetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTun a) =>
a -> m Text
deviceTunGetMode 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 DeviceTun
device' <- a -> IO (Ptr DeviceTun)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CString
result <- Ptr DeviceTun -> IO CString
nm_device_tun_get_mode Ptr DeviceTun
device'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceTunGetMode" 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 DeviceTunGetModeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDeviceTun a) => O.OverloadedMethod DeviceTunGetModeMethodInfo a signature where
overloadedMethod = deviceTunGetMode
instance O.OverloadedMethodInfo DeviceTunGetModeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.deviceTunGetMode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#v:deviceTunGetMode"
})
#endif
foreign import ccall "nm_device_tun_get_multi_queue" nm_device_tun_get_multi_queue ::
Ptr DeviceTun ->
IO CInt
deviceTunGetMultiQueue ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceTun a) =>
a
-> m Bool
deviceTunGetMultiQueue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTun a) =>
a -> m Bool
deviceTunGetMultiQueue 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 DeviceTun
device' <- a -> IO (Ptr DeviceTun)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr DeviceTun -> IO CInt
nm_device_tun_get_multi_queue Ptr DeviceTun
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 DeviceTunGetMultiQueueMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceTun a) => O.OverloadedMethod DeviceTunGetMultiQueueMethodInfo a signature where
overloadedMethod = deviceTunGetMultiQueue
instance O.OverloadedMethodInfo DeviceTunGetMultiQueueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.deviceTunGetMultiQueue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#v:deviceTunGetMultiQueue"
})
#endif
foreign import ccall "nm_device_tun_get_no_pi" nm_device_tun_get_no_pi ::
Ptr DeviceTun ->
IO CInt
deviceTunGetNoPi ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceTun a) =>
a
-> m Bool
deviceTunGetNoPi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTun a) =>
a -> m Bool
deviceTunGetNoPi 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 DeviceTun
device' <- a -> IO (Ptr DeviceTun)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr DeviceTun -> IO CInt
nm_device_tun_get_no_pi Ptr DeviceTun
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 DeviceTunGetNoPiMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceTun a) => O.OverloadedMethod DeviceTunGetNoPiMethodInfo a signature where
overloadedMethod = deviceTunGetNoPi
instance O.OverloadedMethodInfo DeviceTunGetNoPiMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.deviceTunGetNoPi",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#v:deviceTunGetNoPi"
})
#endif
foreign import ccall "nm_device_tun_get_owner" nm_device_tun_get_owner ::
Ptr DeviceTun ->
IO Int64
deviceTunGetOwner ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceTun a) =>
a
-> m Int64
deviceTunGetOwner :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTun a) =>
a -> m Int64
deviceTunGetOwner a
device = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr DeviceTun
device' <- a -> IO (Ptr DeviceTun)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Int64
result <- Ptr DeviceTun -> IO Int64
nm_device_tun_get_owner Ptr DeviceTun
device'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data DeviceTunGetOwnerMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsDeviceTun a) => O.OverloadedMethod DeviceTunGetOwnerMethodInfo a signature where
overloadedMethod = deviceTunGetOwner
instance O.OverloadedMethodInfo DeviceTunGetOwnerMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.deviceTunGetOwner",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#v:deviceTunGetOwner"
})
#endif
foreign import ccall "nm_device_tun_get_vnet_hdr" nm_device_tun_get_vnet_hdr ::
Ptr DeviceTun ->
IO CInt
deviceTunGetVnetHdr ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceTun a) =>
a
-> m Bool
deviceTunGetVnetHdr :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceTun a) =>
a -> m Bool
deviceTunGetVnetHdr 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 DeviceTun
device' <- a -> IO (Ptr DeviceTun)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr DeviceTun -> IO CInt
nm_device_tun_get_vnet_hdr Ptr DeviceTun
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 DeviceTunGetVnetHdrMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceTun a) => O.OverloadedMethod DeviceTunGetVnetHdrMethodInfo a signature where
overloadedMethod = deviceTunGetVnetHdr
instance O.OverloadedMethodInfo DeviceTunGetVnetHdrMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceTun.deviceTunGetVnetHdr",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceTun.html#v:deviceTunGetVnetHdr"
})
#endif