{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.DeviceWireGuard
(
DeviceWireGuard(..) ,
IsDeviceWireGuard ,
toDeviceWireGuard ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceWireGuardMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceWireGuardGetFwmarkMethodInfo ,
#endif
deviceWireGuardGetFwmark ,
#if defined(ENABLE_OVERLOADING)
DeviceWireGuardGetListenPortMethodInfo ,
#endif
deviceWireGuardGetListenPort ,
#if defined(ENABLE_OVERLOADING)
DeviceWireGuardGetPublicKeyMethodInfo ,
#endif
deviceWireGuardGetPublicKey ,
#if defined(ENABLE_OVERLOADING)
DeviceWireGuardFwmarkPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceWireGuardFwmark ,
#endif
getDeviceWireGuardFwmark ,
#if defined(ENABLE_OVERLOADING)
DeviceWireGuardListenPortPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceWireGuardListenPort ,
#endif
getDeviceWireGuardListenPort ,
#if defined(ENABLE_OVERLOADING)
DeviceWireGuardPublicKeyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceWireGuardPublicKey ,
#endif
getDeviceWireGuardPublicKey ,
) 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.GLib.Structs.Bytes as GLib.Bytes
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 DeviceWireGuard = DeviceWireGuard (SP.ManagedPtr DeviceWireGuard)
deriving (DeviceWireGuard -> DeviceWireGuard -> Bool
(DeviceWireGuard -> DeviceWireGuard -> Bool)
-> (DeviceWireGuard -> DeviceWireGuard -> Bool)
-> Eq DeviceWireGuard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceWireGuard -> DeviceWireGuard -> Bool
== :: DeviceWireGuard -> DeviceWireGuard -> Bool
$c/= :: DeviceWireGuard -> DeviceWireGuard -> Bool
/= :: DeviceWireGuard -> DeviceWireGuard -> Bool
Eq)
instance SP.ManagedPtrNewtype DeviceWireGuard where
toManagedPtr :: DeviceWireGuard -> ManagedPtr DeviceWireGuard
toManagedPtr (DeviceWireGuard ManagedPtr DeviceWireGuard
p) = ManagedPtr DeviceWireGuard
p
foreign import ccall "nm_device_wireguard_get_type"
c_nm_device_wireguard_get_type :: IO B.Types.GType
instance B.Types.TypedObject DeviceWireGuard where
glibType :: IO GType
glibType = IO GType
c_nm_device_wireguard_get_type
instance B.Types.GObject DeviceWireGuard
class (SP.GObject o, O.IsDescendantOf DeviceWireGuard o) => IsDeviceWireGuard o
instance (SP.GObject o, O.IsDescendantOf DeviceWireGuard o) => IsDeviceWireGuard o
instance O.HasParentTypes DeviceWireGuard
type instance O.ParentTypes DeviceWireGuard = '[NM.Device.Device, NM.Object.Object, GObject.Object.Object]
toDeviceWireGuard :: (MIO.MonadIO m, IsDeviceWireGuard o) => o -> m DeviceWireGuard
toDeviceWireGuard :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceWireGuard o) =>
o -> m DeviceWireGuard
toDeviceWireGuard = IO DeviceWireGuard -> m DeviceWireGuard
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceWireGuard -> m DeviceWireGuard)
-> (o -> IO DeviceWireGuard) -> o -> m DeviceWireGuard
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DeviceWireGuard -> DeviceWireGuard)
-> o -> IO DeviceWireGuard
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DeviceWireGuard -> DeviceWireGuard
DeviceWireGuard
instance B.GValue.IsGValue (Maybe DeviceWireGuard) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_wireguard_get_type
gvalueSet_ :: Ptr GValue -> Maybe DeviceWireGuard -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DeviceWireGuard
P.Nothing = Ptr GValue -> Ptr DeviceWireGuard -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DeviceWireGuard
forall a. Ptr a
FP.nullPtr :: FP.Ptr DeviceWireGuard)
gvalueSet_ Ptr GValue
gv (P.Just DeviceWireGuard
obj) = DeviceWireGuard -> (Ptr DeviceWireGuard -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DeviceWireGuard
obj (Ptr GValue -> Ptr DeviceWireGuard -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DeviceWireGuard)
gvalueGet_ Ptr GValue
gv = do
Ptr DeviceWireGuard
ptr <- Ptr GValue -> IO (Ptr DeviceWireGuard)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DeviceWireGuard)
if Ptr DeviceWireGuard
ptr Ptr DeviceWireGuard -> Ptr DeviceWireGuard -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DeviceWireGuard
forall a. Ptr a
FP.nullPtr
then DeviceWireGuard -> Maybe DeviceWireGuard
forall a. a -> Maybe a
P.Just (DeviceWireGuard -> Maybe DeviceWireGuard)
-> IO DeviceWireGuard -> IO (Maybe DeviceWireGuard)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DeviceWireGuard -> DeviceWireGuard)
-> Ptr DeviceWireGuard -> IO DeviceWireGuard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DeviceWireGuard -> DeviceWireGuard
DeviceWireGuard Ptr DeviceWireGuard
ptr
else Maybe DeviceWireGuard -> IO (Maybe DeviceWireGuard)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DeviceWireGuard
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceWireGuardMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceWireGuardMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceWireGuardMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceWireGuardMethod "connectionCompatible" o = NM.Device.DeviceConnectionCompatibleMethodInfo
ResolveDeviceWireGuardMethod "connectionValid" o = NM.Device.DeviceConnectionValidMethodInfo
ResolveDeviceWireGuardMethod "delete" o = NM.Device.DeviceDeleteMethodInfo
ResolveDeviceWireGuardMethod "deleteAsync" o = NM.Device.DeviceDeleteAsyncMethodInfo
ResolveDeviceWireGuardMethod "deleteFinish" o = NM.Device.DeviceDeleteFinishMethodInfo
ResolveDeviceWireGuardMethod "disconnect" o = NM.Device.DeviceDisconnectMethodInfo
ResolveDeviceWireGuardMethod "disconnectAsync" o = NM.Device.DeviceDisconnectAsyncMethodInfo
ResolveDeviceWireGuardMethod "disconnectFinish" o = NM.Device.DeviceDisconnectFinishMethodInfo
ResolveDeviceWireGuardMethod "filterConnections" o = NM.Device.DeviceFilterConnectionsMethodInfo
ResolveDeviceWireGuardMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceWireGuardMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceWireGuardMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceWireGuardMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceWireGuardMethod "isReal" o = NM.Device.DeviceIsRealMethodInfo
ResolveDeviceWireGuardMethod "isSoftware" o = NM.Device.DeviceIsSoftwareMethodInfo
ResolveDeviceWireGuardMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceWireGuardMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceWireGuardMethod "reapply" o = NM.Device.DeviceReapplyMethodInfo
ResolveDeviceWireGuardMethod "reapplyAsync" o = NM.Device.DeviceReapplyAsyncMethodInfo
ResolveDeviceWireGuardMethod "reapplyFinish" o = NM.Device.DeviceReapplyFinishMethodInfo
ResolveDeviceWireGuardMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceWireGuardMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceWireGuardMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceWireGuardMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceWireGuardMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceWireGuardMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceWireGuardMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceWireGuardMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceWireGuardMethod "getActiveConnection" o = NM.Device.DeviceGetActiveConnectionMethodInfo
ResolveDeviceWireGuardMethod "getAppliedConnection" o = NM.Device.DeviceGetAppliedConnectionMethodInfo
ResolveDeviceWireGuardMethod "getAppliedConnectionAsync" o = NM.Device.DeviceGetAppliedConnectionAsyncMethodInfo
ResolveDeviceWireGuardMethod "getAppliedConnectionFinish" o = NM.Device.DeviceGetAppliedConnectionFinishMethodInfo
ResolveDeviceWireGuardMethod "getAutoconnect" o = NM.Device.DeviceGetAutoconnectMethodInfo
ResolveDeviceWireGuardMethod "getAvailableConnections" o = NM.Device.DeviceGetAvailableConnectionsMethodInfo
ResolveDeviceWireGuardMethod "getCapabilities" o = NM.Device.DeviceGetCapabilitiesMethodInfo
ResolveDeviceWireGuardMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveDeviceWireGuardMethod "getConnectivity" o = NM.Device.DeviceGetConnectivityMethodInfo
ResolveDeviceWireGuardMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceWireGuardMethod "getDescription" o = NM.Device.DeviceGetDescriptionMethodInfo
ResolveDeviceWireGuardMethod "getDeviceType" o = NM.Device.DeviceGetDeviceTypeMethodInfo
ResolveDeviceWireGuardMethod "getDhcp4Config" o = NM.Device.DeviceGetDhcp4ConfigMethodInfo
ResolveDeviceWireGuardMethod "getDhcp6Config" o = NM.Device.DeviceGetDhcp6ConfigMethodInfo
ResolveDeviceWireGuardMethod "getDriver" o = NM.Device.DeviceGetDriverMethodInfo
ResolveDeviceWireGuardMethod "getDriverVersion" o = NM.Device.DeviceGetDriverVersionMethodInfo
ResolveDeviceWireGuardMethod "getFirmwareMissing" o = NM.Device.DeviceGetFirmwareMissingMethodInfo
ResolveDeviceWireGuardMethod "getFirmwareVersion" o = NM.Device.DeviceGetFirmwareVersionMethodInfo
ResolveDeviceWireGuardMethod "getFwmark" o = DeviceWireGuardGetFwmarkMethodInfo
ResolveDeviceWireGuardMethod "getHwAddress" o = NM.Device.DeviceGetHwAddressMethodInfo
ResolveDeviceWireGuardMethod "getIface" o = NM.Device.DeviceGetIfaceMethodInfo
ResolveDeviceWireGuardMethod "getInterfaceFlags" o = NM.Device.DeviceGetInterfaceFlagsMethodInfo
ResolveDeviceWireGuardMethod "getIp4Config" o = NM.Device.DeviceGetIp4ConfigMethodInfo
ResolveDeviceWireGuardMethod "getIp6Config" o = NM.Device.DeviceGetIp6ConfigMethodInfo
ResolveDeviceWireGuardMethod "getIpIface" o = NM.Device.DeviceGetIpIfaceMethodInfo
ResolveDeviceWireGuardMethod "getListenPort" o = DeviceWireGuardGetListenPortMethodInfo
ResolveDeviceWireGuardMethod "getLldpNeighbors" o = NM.Device.DeviceGetLldpNeighborsMethodInfo
ResolveDeviceWireGuardMethod "getManaged" o = NM.Device.DeviceGetManagedMethodInfo
ResolveDeviceWireGuardMethod "getMetered" o = NM.Device.DeviceGetMeteredMethodInfo
ResolveDeviceWireGuardMethod "getMtu" o = NM.Device.DeviceGetMtuMethodInfo
ResolveDeviceWireGuardMethod "getNmPluginMissing" o = NM.Device.DeviceGetNmPluginMissingMethodInfo
ResolveDeviceWireGuardMethod "getPath" o = NM.Device.DeviceGetPathMethodInfo
ResolveDeviceWireGuardMethod "getPhysicalPortId" o = NM.Device.DeviceGetPhysicalPortIdMethodInfo
ResolveDeviceWireGuardMethod "getPorts" o = NM.Device.DeviceGetPortsMethodInfo
ResolveDeviceWireGuardMethod "getProduct" o = NM.Device.DeviceGetProductMethodInfo
ResolveDeviceWireGuardMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceWireGuardMethod "getPublicKey" o = DeviceWireGuardGetPublicKeyMethodInfo
ResolveDeviceWireGuardMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceWireGuardMethod "getSettingType" o = NM.Device.DeviceGetSettingTypeMethodInfo
ResolveDeviceWireGuardMethod "getState" o = NM.Device.DeviceGetStateMethodInfo
ResolveDeviceWireGuardMethod "getStateReason" o = NM.Device.DeviceGetStateReasonMethodInfo
ResolveDeviceWireGuardMethod "getTypeDescription" o = NM.Device.DeviceGetTypeDescriptionMethodInfo
ResolveDeviceWireGuardMethod "getUdi" o = NM.Device.DeviceGetUdiMethodInfo
ResolveDeviceWireGuardMethod "getVendor" o = NM.Device.DeviceGetVendorMethodInfo
ResolveDeviceWireGuardMethod "setAutoconnect" o = NM.Device.DeviceSetAutoconnectMethodInfo
ResolveDeviceWireGuardMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceWireGuardMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceWireGuardMethod "setManaged" o = NM.Device.DeviceSetManagedMethodInfo
ResolveDeviceWireGuardMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceWireGuardMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceWireGuardMethod t DeviceWireGuard, O.OverloadedMethod info DeviceWireGuard p) => OL.IsLabel t (DeviceWireGuard -> 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 ~ ResolveDeviceWireGuardMethod t DeviceWireGuard, O.OverloadedMethod info DeviceWireGuard p, R.HasField t DeviceWireGuard p) => R.HasField t DeviceWireGuard p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceWireGuardMethod t DeviceWireGuard, O.OverloadedMethodInfo info DeviceWireGuard) => OL.IsLabel t (O.MethodProxy info DeviceWireGuard) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDeviceWireGuardFwmark :: (MonadIO m, IsDeviceWireGuard o) => o -> m Word32
getDeviceWireGuardFwmark :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceWireGuard o) =>
o -> m Word32
getDeviceWireGuardFwmark 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
"fwmark"
#if defined(ENABLE_OVERLOADING)
data DeviceWireGuardFwmarkPropertyInfo
instance AttrInfo DeviceWireGuardFwmarkPropertyInfo where
type AttrAllowedOps DeviceWireGuardFwmarkPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceWireGuardFwmarkPropertyInfo = IsDeviceWireGuard
type AttrSetTypeConstraint DeviceWireGuardFwmarkPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceWireGuardFwmarkPropertyInfo = (~) ()
type AttrTransferType DeviceWireGuardFwmarkPropertyInfo = ()
type AttrGetType DeviceWireGuardFwmarkPropertyInfo = Word32
type AttrLabel DeviceWireGuardFwmarkPropertyInfo = "fwmark"
type AttrOrigin DeviceWireGuardFwmarkPropertyInfo = DeviceWireGuard
attrGet = getDeviceWireGuardFwmark
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceWireGuard.fwmark"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceWireGuard.html#g:attr:fwmark"
})
#endif
getDeviceWireGuardListenPort :: (MonadIO m, IsDeviceWireGuard o) => o -> m Word32
getDeviceWireGuardListenPort :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceWireGuard o) =>
o -> m Word32
getDeviceWireGuardListenPort 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
"listen-port"
#if defined(ENABLE_OVERLOADING)
data DeviceWireGuardListenPortPropertyInfo
instance AttrInfo DeviceWireGuardListenPortPropertyInfo where
type AttrAllowedOps DeviceWireGuardListenPortPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceWireGuardListenPortPropertyInfo = IsDeviceWireGuard
type AttrSetTypeConstraint DeviceWireGuardListenPortPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceWireGuardListenPortPropertyInfo = (~) ()
type AttrTransferType DeviceWireGuardListenPortPropertyInfo = ()
type AttrGetType DeviceWireGuardListenPortPropertyInfo = Word32
type AttrLabel DeviceWireGuardListenPortPropertyInfo = "listen-port"
type AttrOrigin DeviceWireGuardListenPortPropertyInfo = DeviceWireGuard
attrGet = getDeviceWireGuardListenPort
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceWireGuard.listenPort"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceWireGuard.html#g:attr:listenPort"
})
#endif
getDeviceWireGuardPublicKey :: (MonadIO m, IsDeviceWireGuard o) => o -> m GLib.Bytes.Bytes
getDeviceWireGuardPublicKey :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceWireGuard o) =>
o -> m Bytes
getDeviceWireGuardPublicKey o
obj = IO Bytes -> m Bytes
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bytes -> m Bytes) -> IO Bytes -> m Bytes
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Bytes) -> IO Bytes
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceWireGuardPublicKey" (IO (Maybe Bytes) -> IO Bytes) -> IO (Maybe Bytes) -> IO Bytes
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Bytes -> Bytes) -> IO (Maybe Bytes)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"public-key" ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes
#if defined(ENABLE_OVERLOADING)
data DeviceWireGuardPublicKeyPropertyInfo
instance AttrInfo DeviceWireGuardPublicKeyPropertyInfo where
type AttrAllowedOps DeviceWireGuardPublicKeyPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DeviceWireGuardPublicKeyPropertyInfo = IsDeviceWireGuard
type AttrSetTypeConstraint DeviceWireGuardPublicKeyPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceWireGuardPublicKeyPropertyInfo = (~) ()
type AttrTransferType DeviceWireGuardPublicKeyPropertyInfo = ()
type AttrGetType DeviceWireGuardPublicKeyPropertyInfo = GLib.Bytes.Bytes
type AttrLabel DeviceWireGuardPublicKeyPropertyInfo = "public-key"
type AttrOrigin DeviceWireGuardPublicKeyPropertyInfo = DeviceWireGuard
attrGet = getDeviceWireGuardPublicKey
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceWireGuard.publicKey"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceWireGuard.html#g:attr:publicKey"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceWireGuard
type instance O.AttributeList DeviceWireGuard = DeviceWireGuardAttributeList
type DeviceWireGuardAttributeList = ('[ '("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), '("fwmark", DeviceWireGuardFwmarkPropertyInfo), '("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), '("listenPort", DeviceWireGuardListenPortPropertyInfo), '("lldpNeighbors", NM.Device.DeviceLldpNeighborsPropertyInfo), '("managed", NM.Device.DeviceManagedPropertyInfo), '("metered", NM.Device.DeviceMeteredPropertyInfo), '("mtu", NM.Device.DeviceMtuPropertyInfo), '("nmPluginMissing", NM.Device.DeviceNmPluginMissingPropertyInfo), '("path", NM.Device.DevicePathPropertyInfo), '("physicalPortId", NM.Device.DevicePhysicalPortIdPropertyInfo), '("ports", NM.Device.DevicePortsPropertyInfo), '("product", NM.Device.DeviceProductPropertyInfo), '("publicKey", DeviceWireGuardPublicKeyPropertyInfo), '("real", NM.Device.DeviceRealPropertyInfo), '("state", NM.Device.DeviceStatePropertyInfo), '("stateReason", NM.Device.DeviceStateReasonPropertyInfo), '("udi", NM.Device.DeviceUdiPropertyInfo), '("vendor", NM.Device.DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceWireGuardFwmark :: AttrLabelProxy "fwmark"
deviceWireGuardFwmark = AttrLabelProxy
deviceWireGuardListenPort :: AttrLabelProxy "listenPort"
deviceWireGuardListenPort = AttrLabelProxy
deviceWireGuardPublicKey :: AttrLabelProxy "publicKey"
deviceWireGuardPublicKey = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DeviceWireGuard = DeviceWireGuardSignalList
type DeviceWireGuardSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", NM.Device.DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_device_wireguard_get_fwmark" nm_device_wireguard_get_fwmark ::
Ptr DeviceWireGuard ->
IO Word32
deviceWireGuardGetFwmark ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceWireGuard a) =>
a
-> m Word32
deviceWireGuardGetFwmark :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceWireGuard a) =>
a -> m Word32
deviceWireGuardGetFwmark 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 DeviceWireGuard
device' <- a -> IO (Ptr DeviceWireGuard)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Word32
result <- Ptr DeviceWireGuard -> IO Word32
nm_device_wireguard_get_fwmark Ptr DeviceWireGuard
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 DeviceWireGuardGetFwmarkMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDeviceWireGuard a) => O.OverloadedMethod DeviceWireGuardGetFwmarkMethodInfo a signature where
overloadedMethod = deviceWireGuardGetFwmark
instance O.OverloadedMethodInfo DeviceWireGuardGetFwmarkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceWireGuard.deviceWireGuardGetFwmark",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceWireGuard.html#v:deviceWireGuardGetFwmark"
})
#endif
foreign import ccall "nm_device_wireguard_get_listen_port" nm_device_wireguard_get_listen_port ::
Ptr DeviceWireGuard ->
IO Word16
deviceWireGuardGetListenPort ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceWireGuard a) =>
a
-> m Word16
deviceWireGuardGetListenPort :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceWireGuard a) =>
a -> m Word16
deviceWireGuardGetListenPort a
device = IO Word16 -> m Word16
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ do
Ptr DeviceWireGuard
device' <- a -> IO (Ptr DeviceWireGuard)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Word16
result <- Ptr DeviceWireGuard -> IO Word16
nm_device_wireguard_get_listen_port Ptr DeviceWireGuard
device'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Word16 -> IO Word16
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
result
#if defined(ENABLE_OVERLOADING)
data DeviceWireGuardGetListenPortMethodInfo
instance (signature ~ (m Word16), MonadIO m, IsDeviceWireGuard a) => O.OverloadedMethod DeviceWireGuardGetListenPortMethodInfo a signature where
overloadedMethod = deviceWireGuardGetListenPort
instance O.OverloadedMethodInfo DeviceWireGuardGetListenPortMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceWireGuard.deviceWireGuardGetListenPort",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceWireGuard.html#v:deviceWireGuardGetListenPort"
})
#endif
foreign import ccall "nm_device_wireguard_get_public_key" nm_device_wireguard_get_public_key ::
Ptr DeviceWireGuard ->
IO (Ptr GLib.Bytes.Bytes)
deviceWireGuardGetPublicKey ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceWireGuard a) =>
a
-> m GLib.Bytes.Bytes
deviceWireGuardGetPublicKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceWireGuard a) =>
a -> m Bytes
deviceWireGuardGetPublicKey a
device = IO Bytes -> m Bytes
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bytes -> m Bytes) -> IO Bytes -> m Bytes
forall a b. (a -> b) -> a -> b
$ do
Ptr DeviceWireGuard
device' <- a -> IO (Ptr DeviceWireGuard)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
Ptr Bytes
result <- Ptr DeviceWireGuard -> IO (Ptr Bytes)
nm_device_wireguard_get_public_key Ptr DeviceWireGuard
device'
Text -> Ptr Bytes -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceWireGuardGetPublicKey" Ptr Bytes
result
Bytes
result' <- ((ManagedPtr Bytes -> Bytes) -> Ptr Bytes -> IO Bytes
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
Bytes -> IO Bytes
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bytes
result'
#if defined(ENABLE_OVERLOADING)
data DeviceWireGuardGetPublicKeyMethodInfo
instance (signature ~ (m GLib.Bytes.Bytes), MonadIO m, IsDeviceWireGuard a) => O.OverloadedMethod DeviceWireGuardGetPublicKeyMethodInfo a signature where
overloadedMethod = deviceWireGuardGetPublicKey
instance O.OverloadedMethodInfo DeviceWireGuardGetPublicKeyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceWireGuard.deviceWireGuardGetPublicKey",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceWireGuard.html#v:deviceWireGuardGetPublicKey"
})
#endif