{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.SimpleConnection
(
SimpleConnection(..) ,
IsSimpleConnection ,
toSimpleConnection ,
#if defined(ENABLE_OVERLOADING)
ResolveSimpleConnectionMethod ,
#endif
simpleConnectionNew ,
simpleConnectionNewClone ,
simpleConnectionNewFromDbus ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.NM.Callbacks as NM.Callbacks
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.Setting as NM.Setting
import {-# SOURCE #-} qualified GI.NM.Objects.Setting8021x as NM.Setting8021x
import {-# SOURCE #-} qualified GI.NM.Objects.SettingAdsl as NM.SettingAdsl
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBluetooth as NM.SettingBluetooth
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBond as NM.SettingBond
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridge as NM.SettingBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridgePort as NM.SettingBridgePort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingCdma as NM.SettingCdma
import {-# SOURCE #-} qualified GI.NM.Objects.SettingConnection as NM.SettingConnection
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDcb as NM.SettingDcb
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDummy as NM.SettingDummy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGeneric as NM.SettingGeneric
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGsm as NM.SettingGsm
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP4Config as NM.SettingIP4Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP6Config as NM.SettingIP6Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPConfig as NM.SettingIPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPTunnel as NM.SettingIPTunnel
import {-# SOURCE #-} qualified GI.NM.Objects.SettingInfiniband as NM.SettingInfiniband
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacsec as NM.SettingMacsec
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacvlan as NM.SettingMacvlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOlpcMesh as NM.SettingOlpcMesh
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsBridge as NM.SettingOvsBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsInterface as NM.SettingOvsInterface
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPatch as NM.SettingOvsPatch
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPort as NM.SettingOvsPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPpp as NM.SettingPpp
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPppoe as NM.SettingPppoe
import {-# SOURCE #-} qualified GI.NM.Objects.SettingProxy as NM.SettingProxy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingSerial as NM.SettingSerial
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTCConfig as NM.SettingTCConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeam as NM.SettingTeam
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeamPort as NM.SettingTeamPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTun as NM.SettingTun
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVlan as NM.SettingVlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVpn as NM.SettingVpn
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVxlan as NM.SettingVxlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWimax as NM.SettingWimax
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWired as NM.SettingWired
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWireless as NM.SettingWireless
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWirelessSecurity as NM.SettingWirelessSecurity
import {-# SOURCE #-} qualified GI.NM.Structs.BridgeVlan as NM.BridgeVlan
import {-# SOURCE #-} qualified GI.NM.Structs.IPAddress as NM.IPAddress
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoute as NM.IPRoute
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoutingRule as NM.IPRoutingRule
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
#endif
newtype SimpleConnection = SimpleConnection (SP.ManagedPtr SimpleConnection)
deriving (SimpleConnection -> SimpleConnection -> Bool
(SimpleConnection -> SimpleConnection -> Bool)
-> (SimpleConnection -> SimpleConnection -> Bool)
-> Eq SimpleConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SimpleConnection -> SimpleConnection -> Bool
== :: SimpleConnection -> SimpleConnection -> Bool
$c/= :: SimpleConnection -> SimpleConnection -> Bool
/= :: SimpleConnection -> SimpleConnection -> Bool
Eq)
instance SP.ManagedPtrNewtype SimpleConnection where
toManagedPtr :: SimpleConnection -> ManagedPtr SimpleConnection
toManagedPtr (SimpleConnection ManagedPtr SimpleConnection
p) = ManagedPtr SimpleConnection
p
foreign import ccall "nm_simple_connection_get_type"
c_nm_simple_connection_get_type :: IO B.Types.GType
instance B.Types.TypedObject SimpleConnection where
glibType :: IO GType
glibType = IO GType
c_nm_simple_connection_get_type
instance B.Types.GObject SimpleConnection
class (SP.GObject o, O.IsDescendantOf SimpleConnection o) => IsSimpleConnection o
instance (SP.GObject o, O.IsDescendantOf SimpleConnection o) => IsSimpleConnection o
instance O.HasParentTypes SimpleConnection
type instance O.ParentTypes SimpleConnection = '[GObject.Object.Object, NM.Connection.Connection]
toSimpleConnection :: (MIO.MonadIO m, IsSimpleConnection o) => o -> m SimpleConnection
toSimpleConnection :: forall (m :: * -> *) o.
(MonadIO m, IsSimpleConnection o) =>
o -> m SimpleConnection
toSimpleConnection = IO SimpleConnection -> m SimpleConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SimpleConnection -> m SimpleConnection)
-> (o -> IO SimpleConnection) -> o -> m SimpleConnection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SimpleConnection -> SimpleConnection)
-> o -> IO SimpleConnection
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr SimpleConnection -> SimpleConnection
SimpleConnection
instance B.GValue.IsGValue (Maybe SimpleConnection) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_simple_connection_get_type
gvalueSet_ :: Ptr GValue -> Maybe SimpleConnection -> IO ()
gvalueSet_ Ptr GValue
gv Maybe SimpleConnection
P.Nothing = Ptr GValue -> Ptr SimpleConnection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr SimpleConnection
forall a. Ptr a
FP.nullPtr :: FP.Ptr SimpleConnection)
gvalueSet_ Ptr GValue
gv (P.Just SimpleConnection
obj) = SimpleConnection -> (Ptr SimpleConnection -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SimpleConnection
obj (Ptr GValue -> Ptr SimpleConnection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe SimpleConnection)
gvalueGet_ Ptr GValue
gv = do
Ptr SimpleConnection
ptr <- Ptr GValue -> IO (Ptr SimpleConnection)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr SimpleConnection)
if Ptr SimpleConnection
ptr Ptr SimpleConnection -> Ptr SimpleConnection -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr SimpleConnection
forall a. Ptr a
FP.nullPtr
then SimpleConnection -> Maybe SimpleConnection
forall a. a -> Maybe a
P.Just (SimpleConnection -> Maybe SimpleConnection)
-> IO SimpleConnection -> IO (Maybe SimpleConnection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr SimpleConnection -> SimpleConnection)
-> Ptr SimpleConnection -> IO SimpleConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr SimpleConnection -> SimpleConnection
SimpleConnection Ptr SimpleConnection
ptr
else Maybe SimpleConnection -> IO (Maybe SimpleConnection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SimpleConnection
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSimpleConnectionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveSimpleConnectionMethod "addSetting" o = NM.Connection.ConnectionAddSettingMethodInfo
ResolveSimpleConnectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSimpleConnectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSimpleConnectionMethod "clearSecrets" o = NM.Connection.ConnectionClearSecretsMethodInfo
ResolveSimpleConnectionMethod "clearSecretsWithFlags" o = NM.Connection.ConnectionClearSecretsWithFlagsMethodInfo
ResolveSimpleConnectionMethod "clearSettings" o = NM.Connection.ConnectionClearSettingsMethodInfo
ResolveSimpleConnectionMethod "compare" o = NM.Connection.ConnectionCompareMethodInfo
ResolveSimpleConnectionMethod "dump" o = NM.Connection.ConnectionDumpMethodInfo
ResolveSimpleConnectionMethod "forEachSettingValue" o = NM.Connection.ConnectionForEachSettingValueMethodInfo
ResolveSimpleConnectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSimpleConnectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSimpleConnectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSimpleConnectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSimpleConnectionMethod "isType" o = NM.Connection.ConnectionIsTypeMethodInfo
ResolveSimpleConnectionMethod "isVirtual" o = NM.Connection.ConnectionIsVirtualMethodInfo
ResolveSimpleConnectionMethod "needSecrets" o = NM.Connection.ConnectionNeedSecretsMethodInfo
ResolveSimpleConnectionMethod "normalize" o = NM.Connection.ConnectionNormalizeMethodInfo
ResolveSimpleConnectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSimpleConnectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSimpleConnectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSimpleConnectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSimpleConnectionMethod "removeSetting" o = NM.Connection.ConnectionRemoveSettingMethodInfo
ResolveSimpleConnectionMethod "replaceSettings" o = NM.Connection.ConnectionReplaceSettingsMethodInfo
ResolveSimpleConnectionMethod "replaceSettingsFromConnection" o = NM.Connection.ConnectionReplaceSettingsFromConnectionMethodInfo
ResolveSimpleConnectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSimpleConnectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSimpleConnectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSimpleConnectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSimpleConnectionMethod "toDbus" o = NM.Connection.ConnectionToDbusMethodInfo
ResolveSimpleConnectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSimpleConnectionMethod "updateSecrets" o = NM.Connection.ConnectionUpdateSecretsMethodInfo
ResolveSimpleConnectionMethod "verify" o = NM.Connection.ConnectionVerifyMethodInfo
ResolveSimpleConnectionMethod "verifySecrets" o = NM.Connection.ConnectionVerifySecretsMethodInfo
ResolveSimpleConnectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSimpleConnectionMethod "getConnectionType" o = NM.Connection.ConnectionGetConnectionTypeMethodInfo
ResolveSimpleConnectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSimpleConnectionMethod "getId" o = NM.Connection.ConnectionGetIdMethodInfo
ResolveSimpleConnectionMethod "getInterfaceName" o = NM.Connection.ConnectionGetInterfaceNameMethodInfo
ResolveSimpleConnectionMethod "getPath" o = NM.Connection.ConnectionGetPathMethodInfo
ResolveSimpleConnectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSimpleConnectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSimpleConnectionMethod "getSetting" o = NM.Connection.ConnectionGetSettingMethodInfo
ResolveSimpleConnectionMethod "getSetting8021x" o = NM.Connection.ConnectionGetSetting8021xMethodInfo
ResolveSimpleConnectionMethod "getSettingAdsl" o = NM.Connection.ConnectionGetSettingAdslMethodInfo
ResolveSimpleConnectionMethod "getSettingBluetooth" o = NM.Connection.ConnectionGetSettingBluetoothMethodInfo
ResolveSimpleConnectionMethod "getSettingBond" o = NM.Connection.ConnectionGetSettingBondMethodInfo
ResolveSimpleConnectionMethod "getSettingBridge" o = NM.Connection.ConnectionGetSettingBridgeMethodInfo
ResolveSimpleConnectionMethod "getSettingBridgePort" o = NM.Connection.ConnectionGetSettingBridgePortMethodInfo
ResolveSimpleConnectionMethod "getSettingByName" o = NM.Connection.ConnectionGetSettingByNameMethodInfo
ResolveSimpleConnectionMethod "getSettingCdma" o = NM.Connection.ConnectionGetSettingCdmaMethodInfo
ResolveSimpleConnectionMethod "getSettingConnection" o = NM.Connection.ConnectionGetSettingConnectionMethodInfo
ResolveSimpleConnectionMethod "getSettingDcb" o = NM.Connection.ConnectionGetSettingDcbMethodInfo
ResolveSimpleConnectionMethod "getSettingDummy" o = NM.Connection.ConnectionGetSettingDummyMethodInfo
ResolveSimpleConnectionMethod "getSettingGeneric" o = NM.Connection.ConnectionGetSettingGenericMethodInfo
ResolveSimpleConnectionMethod "getSettingGsm" o = NM.Connection.ConnectionGetSettingGsmMethodInfo
ResolveSimpleConnectionMethod "getSettingInfiniband" o = NM.Connection.ConnectionGetSettingInfinibandMethodInfo
ResolveSimpleConnectionMethod "getSettingIp4Config" o = NM.Connection.ConnectionGetSettingIp4ConfigMethodInfo
ResolveSimpleConnectionMethod "getSettingIp6Config" o = NM.Connection.ConnectionGetSettingIp6ConfigMethodInfo
ResolveSimpleConnectionMethod "getSettingIpTunnel" o = NM.Connection.ConnectionGetSettingIpTunnelMethodInfo
ResolveSimpleConnectionMethod "getSettingMacsec" o = NM.Connection.ConnectionGetSettingMacsecMethodInfo
ResolveSimpleConnectionMethod "getSettingMacvlan" o = NM.Connection.ConnectionGetSettingMacvlanMethodInfo
ResolveSimpleConnectionMethod "getSettingOlpcMesh" o = NM.Connection.ConnectionGetSettingOlpcMeshMethodInfo
ResolveSimpleConnectionMethod "getSettingOvsBridge" o = NM.Connection.ConnectionGetSettingOvsBridgeMethodInfo
ResolveSimpleConnectionMethod "getSettingOvsInterface" o = NM.Connection.ConnectionGetSettingOvsInterfaceMethodInfo
ResolveSimpleConnectionMethod "getSettingOvsPatch" o = NM.Connection.ConnectionGetSettingOvsPatchMethodInfo
ResolveSimpleConnectionMethod "getSettingOvsPort" o = NM.Connection.ConnectionGetSettingOvsPortMethodInfo
ResolveSimpleConnectionMethod "getSettingPpp" o = NM.Connection.ConnectionGetSettingPppMethodInfo
ResolveSimpleConnectionMethod "getSettingPppoe" o = NM.Connection.ConnectionGetSettingPppoeMethodInfo
ResolveSimpleConnectionMethod "getSettingProxy" o = NM.Connection.ConnectionGetSettingProxyMethodInfo
ResolveSimpleConnectionMethod "getSettingSerial" o = NM.Connection.ConnectionGetSettingSerialMethodInfo
ResolveSimpleConnectionMethod "getSettingTcConfig" o = NM.Connection.ConnectionGetSettingTcConfigMethodInfo
ResolveSimpleConnectionMethod "getSettingTeam" o = NM.Connection.ConnectionGetSettingTeamMethodInfo
ResolveSimpleConnectionMethod "getSettingTeamPort" o = NM.Connection.ConnectionGetSettingTeamPortMethodInfo
ResolveSimpleConnectionMethod "getSettingTun" o = NM.Connection.ConnectionGetSettingTunMethodInfo
ResolveSimpleConnectionMethod "getSettingVlan" o = NM.Connection.ConnectionGetSettingVlanMethodInfo
ResolveSimpleConnectionMethod "getSettingVpn" o = NM.Connection.ConnectionGetSettingVpnMethodInfo
ResolveSimpleConnectionMethod "getSettingVxlan" o = NM.Connection.ConnectionGetSettingVxlanMethodInfo
ResolveSimpleConnectionMethod "getSettingWimax" o = NM.Connection.ConnectionGetSettingWimaxMethodInfo
ResolveSimpleConnectionMethod "getSettingWired" o = NM.Connection.ConnectionGetSettingWiredMethodInfo
ResolveSimpleConnectionMethod "getSettingWireless" o = NM.Connection.ConnectionGetSettingWirelessMethodInfo
ResolveSimpleConnectionMethod "getSettingWirelessSecurity" o = NM.Connection.ConnectionGetSettingWirelessSecurityMethodInfo
ResolveSimpleConnectionMethod "getSettings" o = NM.Connection.ConnectionGetSettingsMethodInfo
ResolveSimpleConnectionMethod "getUuid" o = NM.Connection.ConnectionGetUuidMethodInfo
ResolveSimpleConnectionMethod "getVirtualDeviceDescription" o = NM.Connection.ConnectionGetVirtualDeviceDescriptionMethodInfo
ResolveSimpleConnectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSimpleConnectionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSimpleConnectionMethod "setPath" o = NM.Connection.ConnectionSetPathMethodInfo
ResolveSimpleConnectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSimpleConnectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSimpleConnectionMethod t SimpleConnection, O.OverloadedMethod info SimpleConnection p) => OL.IsLabel t (SimpleConnection -> 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 ~ ResolveSimpleConnectionMethod t SimpleConnection, O.OverloadedMethod info SimpleConnection p, R.HasField t SimpleConnection p) => R.HasField t SimpleConnection p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSimpleConnectionMethod t SimpleConnection, O.OverloadedMethodInfo info SimpleConnection) => OL.IsLabel t (O.MethodProxy info SimpleConnection) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SimpleConnection
type instance O.AttributeList SimpleConnection = SimpleConnectionAttributeList
type SimpleConnectionAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SimpleConnection = SimpleConnectionSignalList
type SimpleConnectionSignalList = ('[ '("changed", NM.Connection.ConnectionChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("secretsCleared", NM.Connection.ConnectionSecretsClearedSignalInfo), '("secretsUpdated", NM.Connection.ConnectionSecretsUpdatedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_simple_connection_new" nm_simple_connection_new ::
IO (Ptr NM.Connection.Connection)
simpleConnectionNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m NM.Connection.Connection
simpleConnectionNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Connection
simpleConnectionNew = IO Connection -> m Connection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Connection -> m Connection) -> IO Connection -> m Connection
forall a b. (a -> b) -> a -> b
$ do
Ptr Connection
result <- IO (Ptr Connection)
nm_simple_connection_new
Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleConnectionNew" Ptr Connection
result
Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
Connection -> IO Connection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Connection
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "nm_simple_connection_new_clone" nm_simple_connection_new_clone ::
Ptr NM.Connection.Connection ->
IO (Ptr NM.Connection.Connection)
simpleConnectionNewClone ::
(B.CallStack.HasCallStack, MonadIO m, NM.Connection.IsConnection a) =>
a
-> m NM.Connection.Connection
simpleConnectionNewClone :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConnection a) =>
a -> m Connection
simpleConnectionNewClone a
connection = IO Connection -> m Connection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Connection -> m Connection) -> IO Connection -> m Connection
forall a b. (a -> b) -> a -> b
$ do
Ptr Connection
connection' <- a -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
Ptr Connection
result <- Ptr Connection -> IO (Ptr Connection)
nm_simple_connection_new_clone Ptr Connection
connection'
Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleConnectionNewClone" Ptr Connection
result
Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
Connection -> IO Connection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Connection
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "nm_simple_connection_new_from_dbus" nm_simple_connection_new_from_dbus ::
Ptr GVariant ->
Ptr (Ptr GError) ->
IO (Ptr NM.Connection.Connection)
simpleConnectionNewFromDbus ::
(B.CallStack.HasCallStack, MonadIO m) =>
GVariant
-> m NM.Connection.Connection
simpleConnectionNewFromDbus :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GVariant -> m Connection
simpleConnectionNewFromDbus GVariant
dict = IO Connection -> m Connection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Connection -> m Connection) -> IO Connection -> m Connection
forall a b. (a -> b) -> a -> b
$ do
Ptr GVariant
dict' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
dict
IO Connection -> IO () -> IO Connection
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Connection
result <- (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection))
-> (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a b. (a -> b) -> a -> b
$ Ptr GVariant -> Ptr (Ptr GError) -> IO (Ptr Connection)
nm_simple_connection_new_from_dbus Ptr GVariant
dict'
Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleConnectionNewFromDbus" Ptr Connection
result
Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
dict
Connection -> IO Connection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Connection
result'
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif