Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.NM.Interfaces.Connection
Contents
- Exported types
- Methods
- addSetting
- clearSecrets
- clearSecretsWithFlags
- clearSettings
- compare
- dump
- forEachSettingValue
- getConnectionType
- getId
- getInterfaceName
- getPath
- getSetting
- getSetting8021x
- getSettingAdsl
- getSettingBluetooth
- getSettingBond
- getSettingBridge
- getSettingBridgePort
- getSettingByName
- getSettingCdma
- getSettingConnection
- getSettingDcb
- getSettingDummy
- getSettingGeneric
- getSettingGsm
- getSettingInfiniband
- getSettingIp4Config
- getSettingIp6Config
- getSettingIpTunnel
- getSettingMacsec
- getSettingMacvlan
- getSettingOlpcMesh
- getSettingOvsBridge
- getSettingOvsInterface
- getSettingOvsPatch
- getSettingOvsPort
- getSettingPpp
- getSettingPppoe
- getSettingProxy
- getSettingSerial
- getSettingTcConfig
- getSettingTeam
- getSettingTeamPort
- getSettingTun
- getSettingVlan
- getSettingVpn
- getSettingVxlan
- getSettingWimax
- getSettingWired
- getSettingWireless
- getSettingWirelessSecurity
- getSettings
- getUuid
- getVirtualDeviceDescription
- isType
- isVirtual
- needSecrets
- normalize
- removeSetting
- replaceSettings
- replaceSettingsFromConnection
- setPath
- toDbus
- updateSecrets
- verify
- verifySecrets
- Signals
Description
NMConnection is the interface implemented by RemoteConnection
on the
client side, and NMSettingsConnection
on the daemon side.
Synopsis
- newtype Connection = Connection (ManagedPtr Connection)
- class (GObject o, IsDescendantOf Connection o) => IsConnection o
- toConnection :: (MonadIO m, IsConnection o) => o -> m Connection
- connectionAddSetting :: (HasCallStack, MonadIO m, IsConnection a, IsSetting b) => a -> b -> m ()
- connectionClearSecrets :: (HasCallStack, MonadIO m, IsConnection a) => a -> m ()
- connectionClearSecretsWithFlags :: (HasCallStack, MonadIO m, IsConnection a) => a -> Maybe SettingClearSecretsWithFlagsFn -> m ()
- connectionClearSettings :: (HasCallStack, MonadIO m, IsConnection a) => a -> m ()
- connectionCompare :: (HasCallStack, MonadIO m, IsConnection a, IsConnection b) => a -> b -> SettingCompareFlags -> m Bool
- connectionDump :: (HasCallStack, MonadIO m, IsConnection a) => a -> m ()
- connectionForEachSettingValue :: (HasCallStack, MonadIO m, IsConnection a) => a -> SettingValueIterFn -> m ()
- connectionGetConnectionType :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Text
- connectionGetId :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Text
- connectionGetInterfaceName :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Text
- connectionGetPath :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Text
- connectionGetSetting :: (HasCallStack, MonadIO m, IsConnection a) => a -> GType -> m Setting
- connectionGetSetting8021x :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Setting8021x
- connectionGetSettingAdsl :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingAdsl
- connectionGetSettingBluetooth :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingBluetooth
- connectionGetSettingBond :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingBond
- connectionGetSettingBridge :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingBridge
- connectionGetSettingBridgePort :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingBridgePort
- connectionGetSettingByName :: (HasCallStack, MonadIO m, IsConnection a) => a -> Text -> m Setting
- connectionGetSettingCdma :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingCdma
- connectionGetSettingConnection :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingConnection
- connectionGetSettingDcb :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingDcb
- connectionGetSettingDummy :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingDummy
- connectionGetSettingGeneric :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingGeneric
- connectionGetSettingGsm :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingGsm
- connectionGetSettingInfiniband :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingInfiniband
- connectionGetSettingIp4Config :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingIP4Config
- connectionGetSettingIp6Config :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingIP6Config
- connectionGetSettingIpTunnel :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingIPTunnel
- connectionGetSettingMacsec :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingMacsec
- connectionGetSettingMacvlan :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingMacvlan
- connectionGetSettingOlpcMesh :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingOlpcMesh
- connectionGetSettingOvsBridge :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingOvsBridge
- connectionGetSettingOvsInterface :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingOvsInterface
- connectionGetSettingOvsPatch :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingOvsPatch
- connectionGetSettingOvsPort :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingOvsPort
- connectionGetSettingPpp :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingPpp
- connectionGetSettingPppoe :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingPppoe
- connectionGetSettingProxy :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingProxy
- connectionGetSettingSerial :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingSerial
- connectionGetSettingTcConfig :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingTCConfig
- connectionGetSettingTeam :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingTeam
- connectionGetSettingTeamPort :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingTeamPort
- connectionGetSettingTun :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingTun
- connectionGetSettingVlan :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingVlan
- connectionGetSettingVpn :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingVpn
- connectionGetSettingVxlan :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingVxlan
- connectionGetSettingWimax :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingWimax
- connectionGetSettingWired :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingWired
- connectionGetSettingWireless :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingWireless
- connectionGetSettingWirelessSecurity :: (HasCallStack, MonadIO m, IsConnection a) => a -> m SettingWirelessSecurity
- connectionGetSettings :: (HasCallStack, MonadIO m, IsConnection a) => a -> m (Maybe [Setting])
- connectionGetUuid :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Text
- connectionGetVirtualDeviceDescription :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Text
- connectionIsType :: (HasCallStack, MonadIO m, IsConnection a) => a -> Text -> m Bool
- connectionIsVirtual :: (HasCallStack, MonadIO m, IsConnection a) => a -> m Bool
- connectionNeedSecrets :: (HasCallStack, MonadIO m, IsConnection a) => a -> m (Maybe Text, Maybe [Text])
- connectionNormalize :: (HasCallStack, MonadIO m, IsConnection a) => a -> Maybe (Map Text (Ptr ())) -> m Bool
- connectionRemoveSetting :: (HasCallStack, MonadIO m, IsConnection a) => a -> GType -> m ()
- connectionReplaceSettings :: (HasCallStack, MonadIO m, IsConnection a) => a -> GVariant -> m ()
- connectionReplaceSettingsFromConnection :: (HasCallStack, MonadIO m, IsConnection a, IsConnection b) => a -> b -> m ()
- connectionSetPath :: (HasCallStack, MonadIO m, IsConnection a) => a -> Text -> m ()
- connectionToDbus :: (HasCallStack, MonadIO m, IsConnection a) => a -> [ConnectionSerializationFlags] -> m GVariant
- connectionUpdateSecrets :: (HasCallStack, MonadIO m, IsConnection a) => a -> Text -> GVariant -> m ()
- connectionVerify :: (HasCallStack, MonadIO m, IsConnection a) => a -> m ()
- connectionVerifySecrets :: (HasCallStack, MonadIO m, IsConnection a) => a -> m ()
- type ConnectionChangedCallback = IO ()
- afterConnectionChanged :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionChangedCallback) -> m SignalHandlerId
- onConnectionChanged :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionChangedCallback) -> m SignalHandlerId
- type ConnectionSecretsClearedCallback = IO ()
- afterConnectionSecretsCleared :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsClearedCallback) -> m SignalHandlerId
- onConnectionSecretsCleared :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsClearedCallback) -> m SignalHandlerId
- type ConnectionSecretsUpdatedCallback = Text -> IO ()
- afterConnectionSecretsUpdated :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsUpdatedCallback) -> m SignalHandlerId
- onConnectionSecretsUpdated :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsUpdatedCallback) -> m SignalHandlerId
Exported types
newtype Connection Source #
Memory-managed wrapper type.
Constructors
Connection (ManagedPtr Connection) |
Instances
Eq Connection Source # | |
Defined in GI.NM.Interfaces.Connection | |
GObject Connection Source # | |
Defined in GI.NM.Interfaces.Connection | |
ManagedPtrNewtype Connection Source # | |
Defined in GI.NM.Interfaces.Connection Methods | |
TypedObject Connection Source # | |
Defined in GI.NM.Interfaces.Connection | |
HasParentTypes Connection Source # | |
Defined in GI.NM.Interfaces.Connection | |
IsGValue (Maybe Connection) Source # | Convert |
Defined in GI.NM.Interfaces.Connection Methods gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe Connection -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe Connection) # | |
type ParentTypes Connection Source # | |
Defined in GI.NM.Interfaces.Connection |
class (GObject o, IsDescendantOf Connection o) => IsConnection o Source #
Type class for types which can be safely cast to Connection
, for instance with toConnection
.
Instances
(GObject o, IsDescendantOf Connection o) => IsConnection o Source # | |
Defined in GI.NM.Interfaces.Connection |
toConnection :: (MonadIO m, IsConnection o) => o -> m Connection Source #
Cast to Connection
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
addSetting, bindProperty, bindPropertyFull, clearSecrets, clearSecretsWithFlags, clearSettings, compare, dump, forEachSettingValue, forceFloating, freezeNotify, getv, isFloating, isType, isVirtual, needSecrets, normalize, notify, notifyByPspec, ref, refSink, removeSetting, replaceSettings, replaceSettingsFromConnection, runDispose, stealData, stealQdata, thawNotify, toDbus, unref, updateSecrets, verify, verifySecrets, watchClosure.
Getters
getConnectionType, getData, getId, getInterfaceName, getPath, getProperty, getQdata, getSetting, getSetting8021x, getSettingAdsl, getSettingBluetooth, getSettingBond, getSettingBridge, getSettingBridgePort, getSettingByName, getSettingCdma, getSettingConnection, getSettingDcb, getSettingDummy, getSettingGeneric, getSettingGsm, getSettingInfiniband, getSettingIp4Config, getSettingIp6Config, getSettingIpTunnel, getSettingMacsec, getSettingMacvlan, getSettingOlpcMesh, getSettingOvsBridge, getSettingOvsInterface, getSettingOvsPatch, getSettingOvsPort, getSettingPpp, getSettingPppoe, getSettingProxy, getSettingSerial, getSettingTcConfig, getSettingTeam, getSettingTeamPort, getSettingTun, getSettingVlan, getSettingVpn, getSettingVxlan, getSettingWimax, getSettingWired, getSettingWireless, getSettingWirelessSecurity, getSettings, getUuid, getVirtualDeviceDescription.
Setters
addSetting
Arguments
:: (HasCallStack, MonadIO m, IsConnection a, IsSetting b) | |
=> a |
|
-> b |
|
-> m () |
Adds a Setting
to the connection, replacing any previous Setting
of the
same name which has previously been added to the Connection
. The
connection takes ownership of the Setting
object and does not increase
the setting object's reference count.
clearSecrets
connectionClearSecrets Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m () |
Clears and frees any secrets that may be stored in the connection, to avoid keeping secret data in memory when not needed.
clearSecretsWithFlags
connectionClearSecretsWithFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> Maybe SettingClearSecretsWithFlagsFn |
|
-> m () |
Clears and frees secrets determined by func
.
clearSettings
connectionClearSettings Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m () |
Deletes all of connection
's settings.
compare
Arguments
:: (HasCallStack, MonadIO m, IsConnection a, IsConnection b) | |
=> a |
|
-> b |
|
-> SettingCompareFlags |
|
-> m Bool | Returns: |
Compares two Connection
objects for similarity, with comparison behavior
modified by a set of flags. See settingCompare
for a description of
each flag's behavior.
dump
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m () |
Print the connection (including secrets!) to stdout. For debugging purposes ONLY, should NOT be used for serialization of the setting, or machine-parsed in any way. The output format is not guaranteed to be stable and may change at any time.
forEachSettingValue
connectionForEachSettingValue Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> SettingValueIterFn |
|
-> m () |
Iterates over the properties of each Setting
object in the Connection
,
calling the supplied user function for each property.
getConnectionType
connectionGetConnectionType Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Text | Returns: the type from the connection's 'connection' setting |
A shortcut to return the type from the connection's SettingConnection
.
getId
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Text | Returns: the ID from the connection's 'connection' setting |
A shortcut to return the ID from the connection's SettingConnection
.
getInterfaceName
connectionGetInterfaceName Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Text | Returns: Name of the kernel interface or |
Returns the interface name as stored in NMSettingConnection:interface_name.
If the connection contains no NMSettingConnection, it will return Nothing
.
For hardware devices and software devices created outside of NetworkManager, this name is used to match the device. for software devices created by NetworkManager, this is the name of the created interface.
getPath
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Text | Returns: the D-Bus path of the connection, previously set by a call to
|
Returns the connection's D-Bus path.
getSetting
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> GType |
|
-> m Setting | Returns: the |
Gets the Setting
with the given GType
, if one has been previously added
to the Connection
.
getSetting8021x
connectionGetSetting8021x Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Setting8021x | Returns: an |
A shortcut to return any Setting8021x
the connection might contain.
getSettingAdsl
connectionGetSettingAdsl Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingAdsl | Returns: an |
A shortcut to return any SettingAdsl
the connection might contain.
getSettingBluetooth
connectionGetSettingBluetooth Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingBluetooth | Returns: an |
A shortcut to return any SettingBluetooth
the connection might contain.
getSettingBond
connectionGetSettingBond Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingBond | Returns: an |
A shortcut to return any SettingBond
the connection might contain.
getSettingBridge
connectionGetSettingBridge Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingBridge | Returns: an |
A shortcut to return any SettingBridge
the connection might contain.
getSettingBridgePort
connectionGetSettingBridgePort Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingBridgePort | Returns: an |
A shortcut to return any SettingBridgePort
the connection might contain.
getSettingByName
connectionGetSettingByName Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> Text |
|
-> m Setting | Returns: the |
Gets the Setting
with the given name, if one has been previously added
the Connection
.
getSettingCdma
connectionGetSettingCdma Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingCdma | Returns: an |
A shortcut to return any SettingCdma
the connection might contain.
getSettingConnection
connectionGetSettingConnection Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingConnection | Returns: an |
A shortcut to return any SettingConnection
the connection might contain.
getSettingDcb
connectionGetSettingDcb Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingDcb | Returns: an |
A shortcut to return any SettingDcb
the connection might contain.
getSettingDummy
connectionGetSettingDummy Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingDummy | Returns: an |
A shortcut to return any SettingDummy
the connection might contain.
Since: 1.8
getSettingGeneric
connectionGetSettingGeneric Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingGeneric | Returns: an |
A shortcut to return any SettingGeneric
the connection might contain.
getSettingGsm
connectionGetSettingGsm Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingGsm | Returns: an |
A shortcut to return any SettingGsm
the connection might contain.
getSettingInfiniband
connectionGetSettingInfiniband Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingInfiniband | Returns: an |
A shortcut to return any SettingInfiniband
the connection might contain.
getSettingIp4Config
connectionGetSettingIp4Config Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingIP4Config | Returns: an |
A shortcut to return any SettingIP4Config
the connection might contain.
Note that it returns the value as type SettingIPConfig
, since the vast
majority of IPv4-setting-related methods are on that type, not
SettingIP4Config
.
getSettingIp6Config
connectionGetSettingIp6Config Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingIP6Config | Returns: an |
A shortcut to return any SettingIP6Config
the connection might contain.
Note that it returns the value as type SettingIPConfig
, since the vast
majority of IPv6-setting-related methods are on that type, not
SettingIP6Config
.
getSettingIpTunnel
connectionGetSettingIpTunnel Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingIPTunnel | Returns: an |
A shortcut to return any SettingIPTunnel
the connection might contain.
Since: 1.2
getSettingMacsec
connectionGetSettingMacsec Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingMacsec | Returns: an |
A shortcut to return any SettingMacsec
the connection might contain.
Since: 1.6
getSettingMacvlan
connectionGetSettingMacvlan Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingMacvlan | Returns: an |
A shortcut to return any SettingMacvlan
the connection might contain.
Since: 1.2
getSettingOlpcMesh
connectionGetSettingOlpcMesh Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingOlpcMesh | Returns: an |
A shortcut to return any SettingOlpcMesh
the connection might contain.
getSettingOvsBridge
connectionGetSettingOvsBridge Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingOvsBridge | Returns: an |
A shortcut to return any SettingOvsBridge
the connection might contain.
Since: 1.14
getSettingOvsInterface
connectionGetSettingOvsInterface Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingOvsInterface | Returns: an |
A shortcut to return any SettingOvsInterface
the connection might contain.
Since: 1.14
getSettingOvsPatch
connectionGetSettingOvsPatch Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingOvsPatch | Returns: an |
A shortcut to return any SettingOvsPatch
the connection might contain.
Since: 1.14
getSettingOvsPort
connectionGetSettingOvsPort Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingOvsPort | Returns: an |
A shortcut to return any SettingOvsPort
the connection might contain.
Since: 1.14
getSettingPpp
connectionGetSettingPpp Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingPpp | Returns: an |
A shortcut to return any SettingPpp
the connection might contain.
getSettingPppoe
connectionGetSettingPppoe Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingPppoe | Returns: an |
A shortcut to return any SettingPppoe
the connection might contain.
getSettingProxy
connectionGetSettingProxy Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingProxy | Returns: an |
A shortcut to return any SettingProxy
the connection might contain.
Since: 1.6
getSettingSerial
connectionGetSettingSerial Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingSerial | Returns: an |
A shortcut to return any SettingSerial
the connection might contain.
getSettingTcConfig
connectionGetSettingTcConfig Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingTCConfig | Returns: an |
A shortcut to return any SettingTCConfig
the connection might contain.
Since: 1.12
getSettingTeam
connectionGetSettingTeam Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingTeam | Returns: an |
A shortcut to return any SettingTeam
the connection might contain.
getSettingTeamPort
connectionGetSettingTeamPort Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingTeamPort | Returns: an |
A shortcut to return any SettingTeamPort
the connection might contain.
getSettingTun
connectionGetSettingTun Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingTun | Returns: an |
A shortcut to return any SettingTun
the connection might contain.
Since: 1.14
getSettingVlan
connectionGetSettingVlan Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingVlan | Returns: an |
A shortcut to return any SettingVlan
the connection might contain.
getSettingVpn
connectionGetSettingVpn Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingVpn | Returns: an |
A shortcut to return any SettingVpn
the connection might contain.
getSettingVxlan
connectionGetSettingVxlan Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingVxlan | Returns: an |
A shortcut to return any SettingVxlan
the connection might contain.
Since: 1.2
getSettingWimax
connectionGetSettingWimax Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingWimax | Returns: an |
A shortcut to return any SettingWimax
the connection might contain.
getSettingWired
connectionGetSettingWired Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingWired | Returns: an |
A shortcut to return any SettingWired
the connection might contain.
getSettingWireless
connectionGetSettingWireless Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingWireless | Returns: an |
A shortcut to return any SettingWireless
the connection might contain.
getSettingWirelessSecurity
connectionGetSettingWirelessSecurity Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m SettingWirelessSecurity | Returns: an |
A shortcut to return any SettingWirelessSecurity
the connection might contain.
getSettings
connectionGetSettings Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m (Maybe [Setting]) | Returns: a
|
getUuid
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Text | Returns: the UUID from the connection's 'connection' setting |
A shortcut to return the UUID from the connection's SettingConnection
.
getVirtualDeviceDescription
connectionGetVirtualDeviceDescription Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Text | Returns: the name of |
Returns the name that deviceDisambiguateNames
would
return for the virtual device that would be created for connection
.
Eg, "VLAN (eth1.1)".
isType
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
A convenience function to check if the given connection
is a particular
type (ie wired, Wi-Fi, ppp, etc). Checks the SettingConnection:type
property of the connection and matches that against type
.
isVirtual
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m Bool | Returns: whether |
Checks if connection
refers to a virtual device (and thus can potentially be
activated even if the device it refers to doesn't exist).
needSecrets
connectionNeedSecrets Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m (Maybe Text, Maybe [Text]) | Returns: the setting name of the |
Returns the name of the first setting object in the connection which would need secrets to make a successful connection. The returned hints are only intended as a guide to what secrets may be required, because in some circumstances, there is no way to conclusively determine exactly which secrets are needed.
normalize
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> Maybe (Map Text (Ptr ())) |
|
-> m Bool | (Can throw |
Does some basic normalization and fixup of well known inconsistencies
and deprecated fields. If the connection was modified in any way,
the output parameter modified
is set True
.
Finally the connection will be verified and True
returns if the connection
is valid. As this function only performs some specific normalization steps
it cannot repair all connections. If the connection has errors that
cannot be normalized, the connection will not be modified.
removeSetting
connectionRemoveSetting Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> GType |
|
-> m () |
Removes the Setting
with the given GType
from the Connection
. This
operation dereferences the Setting
object.
replaceSettings
connectionReplaceSettings Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> GVariant |
|
-> m () | (Can throw |
Replaces connection
's settings with newSettings
(which must be
syntactically valid, and describe a known type of connection, but does not
need to result in a connection that passes connectionVerify
).
replaceSettingsFromConnection
connectionReplaceSettingsFromConnection Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a, IsConnection b) | |
=> a |
|
-> b |
|
-> m () |
Deep-copies the settings of newConnection
and replaces the settings of connection
with the copied settings.
setPath
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the D-Bus path of the connection. This property is not serialized, and
is only for the reference of the caller. Sets the Connection
:path
property.
toDbus
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> [ConnectionSerializationFlags] |
|
-> m GVariant | Returns: a new floating |
Converts the Connection
into a GVariant
of type
NM_VARIANT_TYPE_CONNECTION
describing the connection, suitable for
marshalling over D-Bus or otherwise serializing.
updateSecrets
connectionUpdateSecrets Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> Text |
|
-> GVariant |
|
-> m () | (Can throw |
Update the specified setting's secrets, given a dictionary of secrets
intended for that setting (deserialized from D-Bus for example). Will also
extract the given setting's secrets hash if given a connection dictionary.
If settingName
is Nothing
, expects a fully serialized Connection
as
returned by connectionToDbus
and will update all secrets from all
settings contained in secrets
.
verify
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m () | (Can throw |
Validates the connection and all its settings. Each setting's properties
have allowed values, and some values are dependent on other values. For
example, if a Wi-Fi connection is security enabled, the SettingWireless
setting object's 'security' property must contain the setting name of the
SettingWirelessSecurity
object, which must also be present in the
connection for the connection to be valid. As another example, the
SettingWired
object's 'mac-address' property must be a validly formatted
MAC address. The returned GError
contains information about which
setting and which property failed validation, and how it failed validation.
verifySecrets
connectionVerifySecrets Source #
Arguments
:: (HasCallStack, MonadIO m, IsConnection a) | |
=> a |
|
-> m () | (Can throw |
Verifies the secrets in the connection.
Since: 1.2
Signals
changed
type ConnectionChangedCallback = IO () Source #
The changed signal is emitted when any property (including secrets) of any setting of the connection is modified, or when settings are added or removed.
afterConnectionChanged :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
connection #changed callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onConnectionChanged :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
connection #changed callback
secretsCleared
type ConnectionSecretsClearedCallback = IO () Source #
The secretsCleared signal is emitted when the secrets of a connection are cleared.
afterConnectionSecretsCleared :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsClearedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the secretsCleared signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
connection #secretsCleared callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onConnectionSecretsCleared :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsClearedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the secretsCleared signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
connection #secretsCleared callback
secretsUpdated
type ConnectionSecretsUpdatedCallback Source #
The secretsUpdated signal is emitted when the secrets of a setting have been changed.
afterConnectionSecretsUpdated :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the secretsUpdated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
connection #secretsUpdated callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onConnectionSecretsUpdated :: (IsConnection a, MonadIO m) => a -> ((?self :: a) => ConnectionSecretsUpdatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the secretsUpdated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
connection #secretsUpdated callback