gi-nm-1.0.1: NM bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.NM.Objects.Client

Contents

Description

NMClient contains a cache of the objects of NetworkManager's D-Bus API. It uses MainContext and DBusConnection for that and registers to D-Bus signals. That means, when iterating the associated MainContext, D-Bus signals gets processed and the Client instance updates and emits Object signals.

Synopsis

Exported types

newtype Client Source #

Memory-managed wrapper type.

Constructors

Client (ManagedPtr Client) 

Instances

Instances details
Eq Client Source # 
Instance details

Defined in GI.NM.Objects.Client

Methods

(==) :: Client -> Client -> Bool #

(/=) :: Client -> Client -> Bool #

GObject Client Source # 
Instance details

Defined in GI.NM.Objects.Client

ManagedPtrNewtype Client Source # 
Instance details

Defined in GI.NM.Objects.Client

TypedObject Client Source # 
Instance details

Defined in GI.NM.Objects.Client

Methods

glibType :: IO GType #

HasParentTypes Client Source # 
Instance details

Defined in GI.NM.Objects.Client

IsGValue (Maybe Client) Source #

Convert Client to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.NM.Objects.Client

type ParentTypes Client Source # 
Instance details

Defined in GI.NM.Objects.Client

class (GObject o, IsDescendantOf Client o) => IsClient o Source #

Type class for types which can be safely cast to Client, for instance with toClient.

Instances

Instances details
(GObject o, IsDescendantOf Client o) => IsClient o Source # 
Instance details

Defined in GI.NM.Objects.Client

toClient :: (MonadIO m, IsClient o) => o -> m Client Source #

Cast to Client, 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

Expand

Methods

activateConnectionAsync, activateConnectionFinish, addAndActivateConnection2, addAndActivateConnection2Finish, addAndActivateConnectionAsync, addAndActivateConnectionFinish, addConnection2, addConnection2Finish, addConnectionAsync, addConnectionFinish, bindProperty, bindPropertyFull, checkConnectivity, checkConnectivityAsync, checkConnectivityFinish, checkpointAdjustRollbackTimeout, checkpointAdjustRollbackTimeoutFinish, checkpointCreate, checkpointCreateFinish, checkpointDestroy, checkpointDestroyFinish, checkpointRollback, checkpointRollbackFinish, connectivityCheckGetAvailable, connectivityCheckGetEnabled, connectivityCheckGetUri, connectivityCheckSetEnabled, dbusCall, dbusCallFinish, dbusSetProperty, dbusSetPropertyFinish, deactivateConnection, deactivateConnectionAsync, deactivateConnectionFinish, forceFloating, freezeNotify, getv, init, initAsync, initFinish, isFloating, loadConnections, loadConnectionsAsync, loadConnectionsFinish, networkingGetEnabled, networkingSetEnabled, notify, notifyByPspec, ref, refSink, reload, reloadConnections, reloadConnectionsAsync, reloadConnectionsFinish, reloadFinish, runDispose, saveHostname, saveHostnameAsync, saveHostnameFinish, stealData, stealQdata, thawNotify, unref, waitShutdown, watchClosure, wimaxGetEnabled, wimaxHardwareGetEnabled, wimaxSetEnabled, wirelessGetEnabled, wirelessHardwareGetEnabled, wirelessSetEnabled, wwanGetEnabled, wwanHardwareGetEnabled, wwanSetEnabled.

Getters

getActivatingConnection, getActiveConnections, getAllDevices, getCapabilities, getCheckpoints, getConnectionById, getConnectionByPath, getConnectionByUuid, getConnections, getConnectivity, getContextBusyWatcher, getData, getDbusConnection, getDbusNameOwner, getDeviceByIface, getDeviceByPath, getDevices, getDnsConfiguration, getDnsMode, getDnsRcManager, getInstanceFlags, getLogging, getMainContext, getMetered, getNmRunning, getObjectByPath, getPermissionResult, getPermissionsState, getPrimaryConnection, getProperty, getQdata, getRadioFlags, getStartup, getState, getVersion, getVersionInfo.

Setters

setData, setDataFull, setLogging, setProperty.

activateConnectionAsync

clientActivateConnectionAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsConnection b, IsDevice c, IsCancellable d) 
=> a

client: a Client

-> Maybe b

connection: an Connection

-> Maybe c

device: the Device

-> Maybe Text

specificObject: the object path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of Nothing should be used (ie, no specific object). For Wi-Fi or WiMAX connections, pass the object path of a AccessPoint or WimaxNsp owned by device, which you can get using objectGetPath, and which will be used to complete the details of the newly added connection.

-> Maybe d

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the activation has started

-> m () 

Asynchronously starts a connection to a particular network using the configuration settings from connection and the network device device. Certain connection types also take a "specific object" which is the object path of a connection- specific object, like an AccessPoint for Wi-Fi connections, or an WimaxNsp for WiMAX connections, to which you wish to connect. If the specific object is not given, NetworkManager can, in some cases, automatically determine which network to connect to given the settings in connection.

If connection is not given for a device-based activation, NetworkManager picks the best available connection for the device and activates it.

Note that the callback is invoked when NetworkManager has started activating the new connection, not when it finishes. You can use the returned ActiveConnection object (in particular, ActiveConnection:state) to track the activation to its completion.

activateConnectionFinish

clientActivateConnectionFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ActiveConnection

Returns: the new ActiveConnection on success, Nothing on failure, in which case error will be set. (Can throw GError)

Gets the result of a call to clientActivateConnectionAsync.

addAndActivateConnection2

clientAddAndActivateConnection2 Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsConnection b, IsDevice c, IsCancellable d) 
=> a

client: a Client

-> Maybe b

partial: an Connection to add; the connection may be partially filled (or even Nothing) and will be completed by NetworkManager using the given device and specificObject before being added

-> Maybe c

device: the Device

-> Maybe Text

specificObject: the object path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of Nothing should be used (i.e., no specific object). For Wi-Fi or WiMAX connections, pass the object path of a AccessPoint or WimaxNsp owned by device, which you can get using objectGetPath, and which will be used to complete the details of the newly added connection.

-> GVariant

options: a GVariant containing a dictionary with options, or Nothing

-> Maybe d

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the activation has started

-> m () 

Adds a new connection using the given details (if any) as a template, automatically filling in missing settings with the capabilities of the given device and specific object. The new connection is then asynchronously activated as with clientActivateConnectionAsync. Cannot be used for VPN connections at this time.

Note that the callback is invoked when NetworkManager has started activating the new connection, not when it finishes. You can used the returned ActiveConnection object (in particular, ActiveConnection:state) to track the activation to its completion.

This is identical to clientAddAndActivateConnectionAsync but takes a further options parameter. Currently, the following options are supported by the daemon: * "persist": A string describing how the connection should be stored. The default is "disk", but it can be modified to "memory" (until the daemon quits) or "volatile" (will be deleted on disconnect). * "bind-activation": Bind the connection lifetime to something. The default is "none", meaning an explicit disconnect is needed. The value "dbus-client" means the connection will automatically be deactivated when the calling D-Bus client disappears from the system bus.

Since: 1.16

addAndActivateConnection2Finish

clientAddAndActivateConnection2Finish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m (ActiveConnection, Maybe GVariant)

Returns: the new ActiveConnection on success, Nothing on failure, in which case error will be set. (Can throw GError)

Gets the result of a call to clientAddAndActivateConnection2.

You can call activeConnectionGetConnection on the returned ActiveConnection to find the path of the created Connection.

Since: 1.16

addAndActivateConnectionAsync

clientAddAndActivateConnectionAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsConnection b, IsDevice c, IsCancellable d) 
=> a

client: a Client

-> Maybe b

partial: an Connection to add; the connection may be partially filled (or even Nothing) and will be completed by NetworkManager using the given device and specificObject before being added

-> Maybe c

device: the Device

-> Maybe Text

specificObject: the object path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of Nothing should be used (ie, no specific object). For Wi-Fi or WiMAX connections, pass the object path of a AccessPoint or WimaxNsp owned by device, which you can get using objectGetPath, and which will be used to complete the details of the newly added connection. If the variant is floating, it will be consumed.

-> Maybe d

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the activation has started

-> m () 

Adds a new connection using the given details (if any) as a template, automatically filling in missing settings with the capabilities of the given device and specific object. The new connection is then asynchronously activated as with clientActivateConnectionAsync. Cannot be used for VPN connections at this time.

Note that the callback is invoked when NetworkManager has started activating the new connection, not when it finishes. You can used the returned ActiveConnection object (in particular, ActiveConnection:state) to track the activation to its completion.

addAndActivateConnectionFinish

clientAddAndActivateConnectionFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ActiveConnection

Returns: the new ActiveConnection on success, Nothing on failure, in which case error will be set. (Can throw GError)

Gets the result of a call to clientAddAndActivateConnectionAsync.

You can call activeConnectionGetConnection on the returned ActiveConnection to find the path of the created Connection.

addConnection2

clientAddConnection2 Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> GVariant

settings: the "a{sa{sv}}" GVariant with the content of the setting.

-> [SettingsAddConnection2Flags]

flags: the NMSettingsAddConnection2Flags argument.

-> Maybe GVariant

args: the "a{sv}" GVariant with extra argument or Nothing for no extra arguments.

-> Bool

ignoreOutResult: this function wraps AddConnection2(), which has an additional result "a{sv}" output parameter. By setting this to True, you signal that you are not interested in that output parameter. This allows the function to fall back to AddConnection() and AddConnectionUnsaved(), which is interesting if you run against an older server version that does not yet provide AddConnection2(). By setting this to False, the function under the hood always calls AddConnection2().

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Call AddConnection2() D-Bus API asynchronously.

Since: 1.20

addConnection2Finish

clientAddConnection2Finish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the Client

-> b

result: the AsyncResult

-> m (RemoteConnection, Maybe GVariant)

Returns: on success, a pointer to the added RemoteConnection. (Can throw GError)

No description available in the introspection data.

Since: 1.20

addConnectionAsync

clientAddConnectionAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsConnection b, IsCancellable c) 
=> a

client: the NMClient

-> b

connection: the connection to add. Note that this object's settings will be added, not the object itself

-> Bool

saveToDisk: whether to immediately save the connection to disk

-> Maybe c

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Requests that the remote settings service add the given settings to a new connection. If saveToDisk is True, the connection is immediately written to disk; otherwise it is initially only stored in memory, but may be saved later by calling the connection's remoteConnectionCommitChanges method.

connection is untouched by this function and only serves as a template of the settings to add. The RemoteConnection object that represents what NetworkManager actually added is returned to callback when the addition operation is complete.

Note that the RemoteConnection returned in callback may not contain identical settings to connection as NetworkManager may perform automatic completion and/or normalization of connection properties.

addConnectionFinish

clientAddConnectionFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m RemoteConnection

Returns: the new RemoteConnection on success, Nothing on failure, in which case error will be set. (Can throw GError)

Gets the result of a call to clientAddConnectionAsync.

checkConnectivity

clientCheckConnectivity Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: an Client

-> Maybe b

cancellable: a Cancellable

-> m ConnectivityState

Returns: the (new) current connectivity state (Can throw GError)

Deprecated: (Since version 1.22)Use clientCheckConnectivityAsync or GDBusConnection.

Updates the network connectivity state and returns the (new) current state. Contrast clientGetConnectivity, which returns the most recent known state without re-checking.

This is a blocking call; use clientCheckConnectivityAsync if you do not want to block.

checkConnectivityAsync

clientCheckConnectivityAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: an Client

-> Maybe b

cancellable: a Cancellable

-> Maybe AsyncReadyCallback

callback: callback to call with the result

-> m () 

Asynchronously updates the network connectivity state and invokes callback when complete. Contrast clientGetConnectivity, which (immediately) returns the most recent known state without re-checking, and clientCheckConnectivity, which blocks.

checkConnectivityFinish

clientCheckConnectivityFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the AsyncResult

-> m ConnectivityState

Returns: the (new) current connectivity state (Can throw GError)

Retrieves the result of an clientCheckConnectivityAsync call.

checkpointAdjustRollbackTimeout

clientCheckpointAdjustRollbackTimeout Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> Text

checkpointPath: a D-Bus path to a checkpoint

-> Word32

addTimeout: the timeout in seconds counting from now. Set to zero, to disable the timeout.

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Resets the timeout for the checkpoint with path checkpointPath to timeoutAdd.

Since: 1.12

checkpointAdjustRollbackTimeoutFinish

clientCheckpointAdjustRollbackTimeoutFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to clientCheckpointAdjustRollbackTimeout.

Since: 1.12

checkpointCreate

clientCheckpointCreate Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> [Device]

devices: a list of devices for which a checkpoint should be created.

-> Word32

rollbackTimeout: the rollback timeout in seconds

-> [CheckpointCreateFlags]

flags: creation flags

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Creates a checkpoint of the current networking configuration for given interfaces. An empty devices argument means all devices. If rollbackTimeout is not zero, a rollback is automatically performed after the given timeout.

Since: 1.12

checkpointCreateFinish

clientCheckpointCreateFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the Client

-> b

result: the result passed to the AsyncReadyCallback

-> m Checkpoint

Returns: the new Checkpoint on success, Nothing on failure, in which case error will be set. (Can throw GError)

Gets the result of a call to clientCheckpointCreate.

Since: 1.12

checkpointDestroy

clientCheckpointDestroy Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> Text

checkpointPath: the D-Bus path for the checkpoint

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Destroys an existing checkpoint without performing a rollback.

Since: 1.12

checkpointDestroyFinish

clientCheckpointDestroyFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to clientCheckpointDestroy.

Since: 1.12

checkpointRollback

clientCheckpointRollback Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> Text

checkpointPath: the D-Bus path to the checkpoint

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Performs the rollback of a checkpoint before the timeout is reached.

Since: 1.12

connectivityCheckGetAvailable

clientConnectivityCheckGetAvailable Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if connectivity checking is available.

Determine whether connectivity checking is available. This requires that the URI of a connectivity service has been set in the configuration file.

Since: 1.10

connectivityCheckGetEnabled

clientConnectivityCheckGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if connectivity checking is enabled.

Determine whether connectivity checking is enabled.

Since: 1.10

connectivityCheckGetUri

clientConnectivityCheckGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Text

Returns: the connectivity URI in use

Get the URI that will be queried to determine if there is internet connectivity.

Since: 1.20

connectivityCheckSetEnabled

clientConnectivityCheckSetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Bool

enabled: True to enable connectivity checking

-> m () 

Deprecated: (Since version 1.22)Use the async command clientDbusSetProperty on DBUS_PATH,DBUS_INTERFACE to set "ConnectivityCheckEnabled" property to a "(b)" value.

Enable or disable connectivity checking. Note that if a connectivity checking URI has not been configured, this will not have any effect.

Since: 1.10

dbusCall

clientDbusCall Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the Client

-> Text

objectPath: path of remote object

-> Text

interfaceName: D-Bus interface to invoke method on

-> Text

methodName: the name of the method to invoke

-> Maybe GVariant

parameters: a GVariant tuple with parameters for the method or Nothing if not passing parameters

-> Maybe VariantType

replyType: the expected type of the reply (which will be a tuple), or Nothing

-> Int32

timeoutMsec: the timeout in milliseconds, -1 to use the default timeout or G_MAXINT for no timeout

-> Maybe b

cancellable: a Cancellable or Nothing

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied or Nothing if you don't care about the result of the method invocation

-> m () 

Call dBusConnectionCall on the current name owner with the specified arguments. Most importantly, this invokes dBusConnectionCall with the client's MainContext, so that the response is always in order with other events D-Bus events. Of course, the call uses Task and will invoke the callback on the current mainContextGetThreadDefault.

This API is merely a convenient wrapper for dBusConnectionCall. You can also use dBusConnectionCall directly, with the same effect.

Since: 1.24

dbusCallFinish

clientDbusCallFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the Client instance

-> b

result: the result passed to the AsyncReadyCallback

-> m GVariant

Returns: the result GVariant or Nothing on error. (Can throw GError)

Gets the result of a call to clientDbusCall.

Since: 1.24

dbusSetProperty

clientDbusSetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the Client

-> Text

objectPath: path of remote object

-> Text

interfaceName: D-Bus interface for the property to set.

-> Text

propertyName: the name of the property to set

-> GVariant

value: a GVariant with the value to set.

-> Int32

timeoutMsec: the timeout in milliseconds, -1 to use the default timeout or G_MAXINT for no timeout

-> Maybe b

cancellable: a Cancellable or Nothing

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied or Nothing if you don't care about the result of the method invocation

-> m () 

Like clientDbusCall but calls "Set" on the standard "org.freedesktop.DBus.Properties" D-Bus interface.

Since: 1.24

dbusSetPropertyFinish

clientDbusSetPropertyFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the Client instance

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to clientDbusSetProperty.

Since: 1.24

deactivateConnection

clientDeactivateConnection Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsActiveConnection b, IsCancellable c) 
=> a

client: a Client

-> b

active: the ActiveConnection to deactivate

-> Maybe c

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use clientDeactivateConnectionAsync or GDBusConnection.

Deactivates an active ActiveConnection.

deactivateConnectionAsync

clientDeactivateConnectionAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsActiveConnection b, IsCancellable c) 
=> a

client: a Client

-> b

active: the ActiveConnection to deactivate

-> Maybe c

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the deactivation has completed

-> m () 

Asynchronously deactivates an active ActiveConnection.

deactivateConnectionFinish

clientDeactivateConnectionFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: a Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to clientDeactivateConnectionAsync.

getActivatingConnection

clientGetActivatingConnection Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: an Client

-> m ActiveConnection

Returns: the appropriate ActiveConnection, if any.

Gets the ActiveConnection corresponding to a currently-activating connection that is expected to become the new Client:primaryConnection upon successful activation.

getActiveConnections

clientGetActiveConnections Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m [ActiveConnection]

Returns: a PtrArray containing all the active NMActiveConnections. The returned array is owned by the client and should not be modified.

Gets the active connections.

getAllDevices

clientGetAllDevices Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m [Device]

Returns: a PtrArray containing all the NMDevices. The returned array is owned by the Client object and should not be modified.

Gets both real devices and device placeholders (eg, software devices which do not currently exist, but could be created automatically by NetworkManager if one of their NMDeviceActivatableConnections was activated). Use deviceIsReal to determine whether each device is a real device or a placeholder.

Use nm_device_get_type() or the NM_IS_DEVICE_XXXX() functions to determine what kind of device each member of the returned array is, and then you may use device-specific methods such as nm_device_ethernet_get_hw_address().

Since: 1.2

getCapabilities

clientGetCapabilities Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the Client instance

-> m [Word32]

Returns: the list of capabilities reported by the server or Nothing if the capabilities are unknown. The numeric values correspond to Capability enum. The array is terminated by a numeric zero sentinel at position length.

No description available in the introspection data.

Since: 1.24

getCheckpoints

clientGetCheckpoints Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m [Checkpoint]

Returns: a PtrArray containing all the Checkpoint. The returned array is owned by the Client object and should not be modified.

Gets all the active checkpoints.

Since: 1.12

getConnectionById

clientGetConnectionById Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the NMClient

-> Text

id: the id of the remote connection

-> m RemoteConnection

Returns: the remote connection object on success, or Nothing if no matching object was found.

The connection is as received from D-Bus and might not validate according to connectionVerify.

Returns the first matching NMRemoteConnection matching a given id.

getConnectionByPath

clientGetConnectionByPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the NMClient

-> Text

path: the D-Bus object path of the remote connection

-> m RemoteConnection

Returns: the remote connection object on success, or Nothing if the object was not known

The connection is as received from D-Bus and might not validate according to connectionVerify.

Returns the NMRemoteConnection representing the connection at path.

getConnectionByUuid

clientGetConnectionByUuid Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the NMClient

-> Text

uuid: the UUID of the remote connection

-> m RemoteConnection

Returns: the remote connection object on success, or Nothing if the object was not known

The connection is as received from D-Bus and might not validate according to connectionVerify.

Returns the NMRemoteConnection identified by uuid.

getConnections

clientGetConnections Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the NMClient

-> m [RemoteConnection]

Returns: an array containing all connections provided by the remote settings service. The returned array is owned by the Client object and should not be modified.

The connections are as received from D-Bus and might not validate according to connectionVerify.

No description available in the introspection data.

getConnectivity

clientGetConnectivity Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: an Client

-> m ConnectivityState

Returns: the current connectivity state

Gets the current network connectivity state. Contrast clientCheckConnectivity and clientCheckConnectivityAsync, which re-check the connectivity state first before returning any information.

getContextBusyWatcher

clientGetContextBusyWatcher Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

self: the NMClient instance.

-> m Object

Returns: a GObject that stays alive as long as there are pending D-Bus operations.

NMClient will schedule asynchronous D-Bus requests which will complete on the GMainContext associated with the instance. When destroying the NMClient instance, those requests are cancelled right away, however their pending requests are still outstanding and queued in the GMainContext. These outstanding callbacks keep the GMainContext alive. In order to fully release all resources, the user must keep iterating the main context until all these callbacks are handled. Of course, at this point no more actual callbacks will be invoked for the user, those are all cancelled internally.

This just leaves one problem: how long does the user need to keep the GMainContext running to ensure everything is cleaned up? The answer is this GObject. Subscribe a weak reference to the returned object and keep iterating the main context until the object got unreferenced.

Note that after the NMClient instance gets destroyed, all outstanding operations will be cancelled right away. That means, the user needs to iterate the MainContext a bit longer, but it is guaranteed that the cleanup happens soon after.

The way of using the context-busy-watch, is by registering a weak pointer to see when it gets destroyed. That means, user code should not take additional references on this object to not keep it alive longer.

If you plan to exit the program after releasing the NMClient instance you may not need to worry about these "leaks". Also, if you anyway plan to continue iterating the MainContext afterwards, then you don't need to care when exactly NMClient is gone completely.

No description available in the introspection data.

Since: 1.22

getDbusConnection

clientGetDbusConnection Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m DBusConnection

Returns: the D-Bus connection of the client, or Nothing if none is set.

Gets the GDBusConnection of the instance. This can be either passed when constructing the instance (as "dbus-connection" property), or it will be automatically initialized during async/sync init.

Since: 1.22

getDbusNameOwner

clientGetDbusNameOwner Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Text

Returns: the current name owner of the D-Bus service of NetworkManager.

No description available in the introspection data.

Since: 1.22

getDeviceByIface

clientGetDeviceByIface Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Text

iface: the interface name to search for

-> m Device

Returns: the Device for the given iface or Nothing if none is found.

Gets a Device from a Client.

getDeviceByPath

clientGetDeviceByPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Text

objectPath: the object path to search for

-> m Device

Returns: the Device for the given objectPath or Nothing if none is found.

Gets a Device from a Client.

getDevices

clientGetDevices Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m [Device]

Returns: a PtrArray containing all the NMDevices. The returned array is owned by the Client object and should not be modified.

Gets all the known network devices. Use nm_device_get_type() or the <literal>NM_IS_DEVICE_XXXX</literal> functions to determine what kind of device member of the returned array is, and then you may use device-specific methods such as nm_device_ethernet_get_hw_address().

getDnsConfiguration

clientGetDnsConfiguration Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m [DnsEntry]

Returns: a PtrArray containing DnsEntry elements or Nothing in case the value is not available. The returned array is owned by the Client object and should not be modified.

Gets the current DNS configuration

Since: 1.6

getDnsMode

clientGetDnsMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the Client

-> m Text

Returns: the DNS processing mode, or Nothing in case the value is not available.

Gets the current DNS processing mode.

Since: 1.6

getDnsRcManager

clientGetDnsRcManager Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the Client

-> m Text

Returns: the resolv.conf manager or Nothing in case the value is not available.

Gets the current DNS resolv.conf manager.

Since: 1.6

getInstanceFlags

clientGetInstanceFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

self: the Client instance.

-> m [ClientInstanceFlags]

Returns: the ClientInstanceFlags flags.

No description available in the introspection data.

Since: 1.24

getLogging

clientGetLogging Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m (Maybe Text, Maybe Text)

(Can throw GError)

Deprecated: (Since version 1.22)Use the async command clientDbusCall on DBUS_PATH,DBUS_INTERFACE to call "GetLogging" with no arguments to get "(ss)" for leveland domains.

Gets NetworkManager current logging level and domains.

getMainContext

clientGetMainContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

self: the Client instance

-> m MainContext

Returns: the MainContext of the client.

The Client instance is permanently associated with the current thread default MainContext, referenced the time when the instance was created. To receive events, the user must iterate this context and can use it to synchronize access to the client.

Note that even after Client instance got destroyed, there might still be pending sources registered in the context. That means, to fully clean up, the user must continue iterating the context as long as the clientGetContextBusyWatcher object is alive.

Since: 1.22

getMetered

clientGetMetered Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Metered

Returns: whether the default route is metered.

No description available in the introspection data.

Since: 1.22

getNmRunning

clientGetNmRunning Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if the daemon is running

Determines whether the daemon is running.

getObjectByPath

clientGetObjectByPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the Client instance

-> Text

dbusPath: the D-Bus path of the object to look up

-> m Object

Returns: the Object instance that is cached under dbusPath, or Nothing if no such object exists.

No description available in the introspection data.

Since: 1.24

getPermissionResult

clientGetPermissionResult Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> ClientPermission

permission: the permission for which to return the result, one of ClientPermission

-> m ClientPermissionResult

Returns: the permission's result, one of ClientPermissionResult

Requests the result of a specific permission, which indicates whether the client can or cannot perform the action the permission represents

getPermissionsState

clientGetPermissionsState Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

self: the Client instance

-> m Ternary

Returns: the state of the cached permissions. TernaryDefault means that no permissions result was yet received. All permissions are unknown. TernaryTrue means that the permissions got received and are cached. %TernaryFalse means that permissions are cached, but they are invalided as "CheckPermissions" signal was received in the meantime.

No description available in the introspection data.

Since: 1.24

getPrimaryConnection

clientGetPrimaryConnection Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: an Client

-> m ActiveConnection

Returns: the appropriate ActiveConnection, if any

Gets the ActiveConnection corresponding to the primary active network device.

In particular, when there is no VPN active, or the VPN does not have the default route, this returns the active connection that has the default route. If there is a VPN active with the default route, then this function returns the active connection that contains the route to the VPN endpoint.

If there is no default route, or the default route is over a non-NetworkManager-recognized device, this will return Nothing.

getRadioFlags

clientGetRadioFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m [RadioFlags]

Returns: the RadioFlags.

Get radio flags.

Since: 1.38

getStartup

clientGetStartup Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: whether the daemon is still starting up

Tests whether the daemon is still in the process of activating connections at startup.

getState

clientGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m State

Returns: the current NMState

Gets the current daemon state.

getVersion

clientGetVersion Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Text

Returns: string with the version (or Nothing if NetworkManager is not running)

Gets NetworkManager version.

getVersionInfo

clientGetVersionInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: the Client instance

-> m [Word32]

Returns: the list of capabilities reported by the server or Nothing if the capabilities are unknown.

If available, the first element in the array is NM_VERSION which encodes the daemon version as "(major << 16 | minor << 8 | micro)". The following elements are a bitfield of NMVersionInfoCapabilities that indicate that the daemon supports a certain capability.

Since: 1.42

loadConnections

clientLoadConnections Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> [Text]

filenames: Nothing-terminated array of filenames to load

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m Text

(Can throw GError)

Deprecated: (Since version 1.22)Use clientLoadConnectionsAsync or GDBusConnection.

Requests that the remote settings service load or reload the given files, adding or updating the connections described within.

The changes to the indicated files will not yet be reflected in client's connections array when the function returns.

If all of the indicated files were successfully loaded, the function will return True, and failures will be set to Nothing. If NetworkManager tried to load the files, but some (or all) failed, then failures will be set to a Nothing-terminated array of the filenames that failed to load.

loadConnectionsAsync

clientLoadConnectionsAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> [Text]

filenames: Nothing-terminated array of filenames to load

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the operation completes

-> m () 

Requests that the remote settings service asynchronously load or reload the given files, adding or updating the connections described within.

See clientLoadConnections for more details.

loadConnectionsFinish

clientLoadConnectionsFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the NMClient

-> b

result: the result passed to the AsyncReadyCallback

-> m [Text]

(Can throw GError)

Gets the result of an clientLoadConnectionsAsync call.

See clientLoadConnections for more details.

networkingGetEnabled

clientNetworkingGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if networking is enabled, False if networking is disabled

Whether networking is enabled or disabled.

networkingSetEnabled

clientNetworkingSetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Bool

enabled: True to set networking enabled, False to set networking disabled

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use the async command clientDbusCall on DBUS_PATH,DBUS_INTERFACE to call "Enable" with "(b)" arguments and no return value.

Enables or disables networking. When networking is disabled, all controlled interfaces are disconnected and deactivated. When networking is enabled, all controlled interfaces are available for activation.

new

clientNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe a

cancellable: a Cancellable, or Nothing

-> m Client

Returns: a new Client or NULL on an error (Can throw GError)

Creates a new Client synchronously.

Note that this will block until a NMClient instance is fully initialized. This does nothing beside calling g_initable_new(). You are free to call g_initable_new() or g_object_new()/initableInit directly for more control, to set GObject properties or get access to the NMClient instance while it is still initializing.

Using the synchronous initialization creates an Client instance that uses an internal MainContext. This context is invisible to the user. This introduces an additional overhead that is payed not only during object initialization, but for the entire lifetime of this object. Also, due to this internal MainContext, the events are no longer in sync with other messages from DBusConnection (but all events of the NMClient will themselves still be ordered). For a serious program, you should therefore avoid these problems by using asyncInitableInitAsync or clientNewAsync instead. The sync initialization is still useful for simple scripts or interactive testing for example via pygobject.

Creating an Client instance can only fail for two reasons. First, if you didn't provide a CLIENT_DBUS_CONNECTION and the call to busGet fails. You can avoid that by using g_initable_new() directly and set a D-Bus connection. Second, if you cancelled the creation. If you do that, then note that after the failure there might still be idle actions pending which keep clientGetMainContext alive. That means, in that case you must continue iterating the context to avoid leaks. See clientGetContextBusyWatcher.

Creating an Client instance when NetworkManager is not running does not cause a failure.

newAsync

clientNewAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe a

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to call when the client is created

-> m () 

Creates a new Client asynchronously. callback will be called when it is done. Use clientNewFinish to get the result.

This does nothing beside calling g_async_initable_new_async(). You are free to call g_async_initable_new_async() or g_object_new()/asyncInitableInitAsync directly for more control, to set GObject properties or get access to the NMClient instance while it is still initializing.

Creating an Client instance can only fail for two reasons. First, if you didn't provide a CLIENT_DBUS_CONNECTION and the call to busGet fails. You can avoid that by using g_async_initable_new_async() directly and set a D-Bus connection. Second, if you cancelled the creation. If you do that, then note that after the failure there might still be idle actions pending which keep clientGetMainContext alive. That means, in that case you must continue iterating the context to avoid leaks. See clientGetContextBusyWatcher.

Creating an Client instance when NetworkManager is not running does not cause a failure.

newFinish

clientNewFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsAsyncResult a) 
=> a

result: a AsyncResult

-> m Client

Returns: a new Client, or Nothing on error (Can throw GError)

Gets the result of an clientNewAsync call.

reload

clientReload Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> [ManagerReloadFlags]

flags: flags indicating what to reload.

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the add operation completes

-> m () 

Reload NetworkManager's configuration and perform certain updates, like flushing caches or rewriting external state to disk. This is similar to sending SIGHUP to NetworkManager but it allows for more fine-grained control over what to reload (see flags). It also allows non-root access via PolicyKit and contrary to signals it is synchronous.

Since: 1.22

reloadConnections

clientReloadConnections Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the Client

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use clientReloadConnectionsAsync or GDBusConnection.

Requests that the remote settings service reload all connection files from disk, adding, updating, and removing connections until the in-memory state matches the on-disk state.

reloadConnectionsAsync

clientReloadConnectionsAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the Client

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the reload operation completes

-> m () 

Requests that the remote settings service begin reloading all connection files from disk, adding, updating, and removing connections until the in-memory state matches the on-disk state.

reloadConnectionsFinish

clientReloadConnectionsFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of an clientReloadConnectionsAsync call.

reloadFinish

clientReloadFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: an Client

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to clientReload.

Since: 1.22

saveHostname

clientSaveHostname Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> Maybe Text

hostname: the new persistent hostname to set, or Nothing to clear any existing persistent hostname

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use clientSaveHostnameAsync or GDBusConnection.

Requests that the machine's persistent hostname be set to the specified value or cleared.

saveHostnameAsync

clientSaveHostnameAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the NMClient

-> Maybe Text

hostname: the new persistent hostname to set, or Nothing to clear any existing persistent hostname

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the operation completes

-> m () 

Requests that the machine's persistent hostname be set to the specified value or cleared.

saveHostnameFinish

clientSaveHostnameFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsAsyncResult b) 
=> a

client: the NMClient

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of an clientSaveHostnameAsync call.

setLogging

clientSetLogging Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Maybe Text

level: logging level to set (Nothing or an empty string for no change)

-> Maybe Text

domains: logging domains to set. The string should be a list of log domains separated by ",". (Nothing or an empty string for no change)

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use the async command clientDbusCall on DBUS_PATH,DBUS_INTERFACE to call "SetLogging" with "(ss)" arguments for level and domains.

Sets NetworkManager logging level and/or domains.

waitShutdown

clientWaitShutdown Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a, IsCancellable b) 
=> a

client: the Client to shutdown.

-> Bool

integrateMaincontext: whether to hook the client's maincontext in the current thread default. Otherwise, you must ensure that the client's maincontext gets iterated so that it can complete. By integrating the maincontext in the current thread default, you may instead only iterate the latter.

-> Maybe b

cancellable: the Cancellable to abort the shutdown.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied or Nothing if you don't care about the result of the method invocation.

-> m () 

The way to stop Client is by unrefing it. That will cancel all internally pending async operations. However, as async operations in NMClient use GTask, hence they cannot complete right away. Instead, their (internal) result callback still needs to be dispatched by iterating the client's main context.

You thus cannot stop iterating the client's main context until everything is wrapped up. clientGetContextBusyWatcher helps to watch how long that will be.

This function automates that waiting. Like all glib async operations this honors the current mainContextGetThreadDefault.

In any case, to complete the shutdown, clientGetMainContext must be iterated. If the current mainContextGetThreadDefault is the same as clientGetMainContext, then integrateMaincontext is ignored. In that case, the caller is required to iterate the context for shutdown to complete. Otherwise, if mainContextGetThreadDefault differs from clientGetMainContext and integrateMaincontext is False, the caller must make sure that both contexts are iterated until completion. Otherwise, if integrateMaincontext is True, then clientGetMainContext will be integrated in mainContextGetThreadDefault. This means, the caller gives clientGetMainContext up until the waiting completes, the function will acquire the context and hook it into mainContextGetThreadDefault. It is a bug to request integrateMaincontext while having clientGetMainContext acquired or iterated otherwise because a context can only be acquired once at a time.

Shutdown can only complete after all references to client were released.

It is possible to call this function multiple times for the same client. But note that with integrateMaincontext the client's context is acquired, which can only be done once at a time.

It is permissible to start waiting before the objects is fully initialized.

The function really allows two separate things. To get a notification (callback) when shutdown is complete, and to integrate the client's context in another context. The latter case is useful if the client has a separate context and you hand it over to another GMainContext to wrap up.

The main use is to have a NMClient and a separate GMainContext on a worker thread. When being done, you can hand over the cleanup of the context to mainContextDefault, assuming that the main thread iterates the default context. In that case, you don't need to care about passing a callback to know when shutdown completed.

Since: 1.42

waitShutdownFinish

clientWaitShutdownFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsAsyncResult a) 
=> a

result: a AsyncResult obtained from the AsyncReadyCallback passed to clientWaitShutdown

-> m ()

(Can throw GError)

No description available in the introspection data.

Since: 1.42

wimaxGetEnabled

clientWimaxGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if WiMAX is enabled

Deprecated: (Since version 1.22)This function always returns FALSE because WiMax is no longer supported.

Determines whether WiMAX is enabled.

wimaxHardwareGetEnabled

clientWimaxHardwareGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if the WiMAX hardware is enabled

Deprecated: (Since version 1.22)This function always returns FALSE because WiMax is no longer supported.

Determines whether the WiMAX hardware is enabled.

wimaxSetEnabled

clientWimaxSetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Bool

enabled: True to enable WiMAX

-> m () 

Deprecated: (Since version 1.22)This function does nothing because WiMax is no longer supported.

Enables or disables WiMAX devices.

wirelessGetEnabled

clientWirelessGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if wireless is enabled

Determines whether the wireless is enabled.

wirelessHardwareGetEnabled

clientWirelessHardwareGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if the wireless hardware is enabled

Determines whether the wireless hardware is enabled.

wirelessSetEnabled

clientWirelessSetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Bool

enabled: True to enable wireless

-> m () 

Deprecated: (Since version 1.22)Use the async command clientDbusSetProperty on DBUS_PATH,DBUS_INTERFACE to set "WirelessEnabled" property to a "(b)" value.

Enables or disables wireless devices.

wwanGetEnabled

clientWwanGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if WWAN is enabled

Determines whether WWAN is enabled.

wwanHardwareGetEnabled

clientWwanHardwareGetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> m Bool

Returns: True if the WWAN hardware is enabled

Determines whether the WWAN hardware is enabled.

wwanSetEnabled

clientWwanSetEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsClient a) 
=> a

client: a Client

-> Bool

enabled: True to enable WWAN

-> m () 

Deprecated: (Since version 1.22)Use the async command clientDbusSetProperty on DBUS_PATH,DBUS_INTERFACE to set "WwanEnabled" property to a "(b)" value.

Enables or disables WWAN devices.

Properties

activatingConnection

The ActiveConnection of the activating connection that is likely to become the new Client:primaryConnection.

getClientActivatingConnection :: (MonadIO m, IsClient o) => o -> m ActiveConnection Source #

Get the value of the “activating-connection” property. When overloading is enabled, this is equivalent to

get client #activatingConnection

activeConnections

allDevices

canModify

If True, adding and modifying connections is supported.

getClientCanModify :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “can-modify” property. When overloading is enabled, this is equivalent to

get client #canModify

capabilities

checkpoints

connections

connectivity

The network connectivity state.

getClientConnectivity :: (MonadIO m, IsClient o) => o -> m ConnectivityState Source #

Get the value of the “connectivity” property. When overloading is enabled, this is equivalent to

get client #connectivity

connectivityCheckAvailable

No description available in the introspection data.

getClientConnectivityCheckAvailable :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “connectivity-check-available” property. When overloading is enabled, this is equivalent to

get client #connectivityCheckAvailable

connectivityCheckEnabled

No description available in the introspection data.

constructClientConnectivityCheckEnabled :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “connectivity-check-enabled” property. This is rarely needed directly, but it is used by new.

getClientConnectivityCheckEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “connectivity-check-enabled” property. When overloading is enabled, this is equivalent to

get client #connectivityCheckEnabled

setClientConnectivityCheckEnabled :: (MonadIO m, IsClient o) => o -> Bool -> m () Source #

Set the value of the “connectivity-check-enabled” property. When overloading is enabled, this is equivalent to

set client [ #connectivityCheckEnabled := value ]

connectivityCheckUri

The used URI for connectivity checking.

Since: 1.22

getClientConnectivityCheckUri :: (MonadIO m, IsClient o) => o -> m (Maybe Text) Source #

Get the value of the “connectivity-check-uri” property. When overloading is enabled, this is equivalent to

get client #connectivityCheckUri

dbusConnection

The DBusConnection to use.

If this is not set during object construction, the D-Bus connection will automatically be chosen during async/sync initalization via busGet.

Since: 1.22

constructClientDbusConnection :: (IsClient o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “dbus-connection” property. This is rarely needed directly, but it is used by new.

getClientDbusConnection :: (MonadIO m, IsClient o) => o -> m DBusConnection Source #

Get the value of the “dbus-connection” property. When overloading is enabled, this is equivalent to

get client #dbusConnection

dbusNameOwner

The name owner of the NetworkManager D-Bus service.

Since: 1.22

getClientDbusNameOwner :: (MonadIO m, IsClient o) => o -> m Text Source #

Get the value of the “dbus-name-owner” property. When overloading is enabled, this is equivalent to

get client #dbusNameOwner

devices

dnsConfiguration

dnsMode

The current DNS processing mode.

Since: 1.6

getClientDnsMode :: (MonadIO m, IsClient o) => o -> m Text Source #

Get the value of the “dns-mode” property. When overloading is enabled, this is equivalent to

get client #dnsMode

dnsRcManager

The current resolv.conf management mode.

Since: 1.6

getClientDnsRcManager :: (MonadIO m, IsClient o) => o -> m Text Source #

Get the value of the “dns-rc-manager” property. When overloading is enabled, this is equivalent to

get client #dnsRcManager

hostname

The machine hostname stored in persistent configuration. This can be modified by calling clientSaveHostname.

getClientHostname :: (MonadIO m, IsClient o) => o -> m (Maybe Text) Source #

Get the value of the “hostname” property. When overloading is enabled, this is equivalent to

get client #hostname

instanceFlags

ClientInstanceFlags for the instance. These affect behavior of Client. This is a construct property and you may only set most flags only during construction.

The flag ClientInstanceFlagsNoAutoFetchPermissions can be toggled any time, even after constructing the instance. Note that you may want to watch NMClient:permissions-state property to know whether permissions are ready. Note that permissions are only fetched when NMClient has a D-Bus name owner.

The flags ClientInstanceFlagsInitializedGood and ClientInstanceFlagsInitializedBad cannot be set, however they will be returned by the getter after initialization completes.

Since: 1.24

constructClientInstanceFlags :: (IsClient o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “instance-flags” property. This is rarely needed directly, but it is used by new.

getClientInstanceFlags :: (MonadIO m, IsClient o) => o -> m Word32 Source #

Get the value of the “instance-flags” property. When overloading is enabled, this is equivalent to

get client #instanceFlags

setClientInstanceFlags :: (MonadIO m, IsClient o) => o -> Word32 -> m () Source #

Set the value of the “instance-flags” property. When overloading is enabled, this is equivalent to

set client [ #instanceFlags := value ]

metered

Whether the connectivity is metered.

Since: 1.2

getClientMetered :: (MonadIO m, IsClient o) => o -> m Word32 Source #

Get the value of the “metered” property. When overloading is enabled, this is equivalent to

get client #metered

networkingEnabled

Whether networking is enabled.

The property setter is a synchronous D-Bus call. This is deprecated since 1.22.

constructClientNetworkingEnabled :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “networking-enabled” property. This is rarely needed directly, but it is used by new.

getClientNetworkingEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “networking-enabled” property. When overloading is enabled, this is equivalent to

get client #networkingEnabled

setClientNetworkingEnabled :: (MonadIO m, IsClient o) => o -> Bool -> m () Source #

Set the value of the “networking-enabled” property. When overloading is enabled, this is equivalent to

set client [ #networkingEnabled := value ]

nmRunning

Whether the daemon is running.

getClientNmRunning :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “nm-running” property. When overloading is enabled, this is equivalent to

get client #nmRunning

permissionsState

The state of the cached permissions. The value TernaryDefault means that no permissions are yet received (or not yet requested). TernaryTrue means that permissions are received, cached and up to date. TernaryFalse means that permissions were received and are cached, but in the meantime a "CheckPermissions" signal was received that invalidated the cached permissions. Note that NMClient will always emit a notifypermissionsState signal when a "CheckPermissions" signal got received or after new permissions got received (that is regardless whether the value of the permission state actually changed). With this you can watch the permissions-state property to know whether the permissions are ready. Note that while NMClient has no D-Bus name owner, no permissions are fetched (and this property won't change).

Since: 1.24

getClientPermissionsState :: (MonadIO m, IsClient o) => o -> m Ternary Source #

Get the value of the “permissions-state” property. When overloading is enabled, this is equivalent to

get client #permissionsState

primaryConnection

The ActiveConnection of the device with the default route; see clientGetPrimaryConnection for more details.

getClientPrimaryConnection :: (MonadIO m, IsClient o) => o -> m ActiveConnection Source #

Get the value of the “primary-connection” property. When overloading is enabled, this is equivalent to

get client #primaryConnection

radioFlags

Flags for radio interfaces. See RadioFlags.

Since: 1.38

getClientRadioFlags :: (MonadIO m, IsClient o) => o -> m Word32 Source #

Get the value of the “radio-flags” property. When overloading is enabled, this is equivalent to

get client #radioFlags

startup

Whether the daemon is still starting up.

getClientStartup :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “startup” property. When overloading is enabled, this is equivalent to

get client #startup

state

The current daemon state.

getClientState :: (MonadIO m, IsClient o) => o -> m State Source #

Get the value of the “state” property. When overloading is enabled, this is equivalent to

get client #state

version

The NetworkManager version.

getClientVersion :: (MonadIO m, IsClient o) => o -> m Text Source #

Get the value of the “version” property. When overloading is enabled, this is equivalent to

get client #version

versionInfo

wimaxEnabled

Whether WiMAX functionality is enabled.

constructClientWimaxEnabled :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “wimax-enabled” property. This is rarely needed directly, but it is used by new.

getClientWimaxEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “wimax-enabled” property. When overloading is enabled, this is equivalent to

get client #wimaxEnabled

setClientWimaxEnabled :: (MonadIO m, IsClient o) => o -> Bool -> m () Source #

Set the value of the “wimax-enabled” property. When overloading is enabled, this is equivalent to

set client [ #wimaxEnabled := value ]

wimaxHardwareEnabled

Whether the WiMAX hardware is enabled.

getClientWimaxHardwareEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “wimax-hardware-enabled” property. When overloading is enabled, this is equivalent to

get client #wimaxHardwareEnabled

wirelessEnabled

Whether wireless is enabled.

The property setter is a synchronous D-Bus call. This is deprecated since 1.22.

constructClientWirelessEnabled :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “wireless-enabled” property. This is rarely needed directly, but it is used by new.

getClientWirelessEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “wireless-enabled” property. When overloading is enabled, this is equivalent to

get client #wirelessEnabled

setClientWirelessEnabled :: (MonadIO m, IsClient o) => o -> Bool -> m () Source #

Set the value of the “wireless-enabled” property. When overloading is enabled, this is equivalent to

set client [ #wirelessEnabled := value ]

wirelessHardwareEnabled

Whether the wireless hardware is enabled.

getClientWirelessHardwareEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “wireless-hardware-enabled” property. When overloading is enabled, this is equivalent to

get client #wirelessHardwareEnabled

wwanEnabled

Whether WWAN functionality is enabled.

The property setter is a synchronous D-Bus call. This is deprecated since 1.22.

constructClientWwanEnabled :: (IsClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “wwan-enabled” property. This is rarely needed directly, but it is used by new.

getClientWwanEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “wwan-enabled” property. When overloading is enabled, this is equivalent to

get client #wwanEnabled

setClientWwanEnabled :: (MonadIO m, IsClient o) => o -> Bool -> m () Source #

Set the value of the “wwan-enabled” property. When overloading is enabled, this is equivalent to

set client [ #wwanEnabled := value ]

wwanHardwareEnabled

Whether the WWAN hardware is enabled.

getClientWwanHardwareEnabled :: (MonadIO m, IsClient o) => o -> m Bool Source #

Get the value of the “wwan-hardware-enabled” property. When overloading is enabled, this is equivalent to

get client #wwanHardwareEnabled

Signals

activeConnectionAdded

type ClientActiveConnectionAddedCallback Source #

Arguments

 = ActiveConnection

activeConnection: the new active connection

-> IO () 

Notifies that a ActiveConnection has been added.

afterClientActiveConnectionAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientActiveConnectionAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activeConnectionAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #activeConnectionAdded 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.

onClientActiveConnectionAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientActiveConnectionAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activeConnectionAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #activeConnectionAdded callback

activeConnectionRemoved

type ClientActiveConnectionRemovedCallback Source #

Arguments

 = ActiveConnection

activeConnection: the removed active connection

-> IO () 

Notifies that a ActiveConnection has been removed.

afterClientActiveConnectionRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientActiveConnectionRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activeConnectionRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #activeConnectionRemoved 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.

onClientActiveConnectionRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientActiveConnectionRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activeConnectionRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #activeConnectionRemoved callback

anyDeviceAdded

type ClientAnyDeviceAddedCallback Source #

Arguments

 = Device

device: the new device

-> IO () 

Notifies that a Device is added. This signal is emitted for both regular devices and placeholder devices.

afterClientAnyDeviceAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientAnyDeviceAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the anyDeviceAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #anyDeviceAdded 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.

onClientAnyDeviceAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientAnyDeviceAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the anyDeviceAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #anyDeviceAdded callback

anyDeviceRemoved

type ClientAnyDeviceRemovedCallback Source #

Arguments

 = Device

device: the removed device

-> IO () 

Notifies that a Device is removed. This signal is emitted for both regular devices and placeholder devices.

afterClientAnyDeviceRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientAnyDeviceRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the anyDeviceRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #anyDeviceRemoved 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.

onClientAnyDeviceRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientAnyDeviceRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the anyDeviceRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #anyDeviceRemoved callback

connectionAdded

type ClientConnectionAddedCallback Source #

Arguments

 = RemoteConnection

connection: the new connection

-> IO () 

Notifies that a Connection has been added.

afterClientConnectionAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientConnectionAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the connectionAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #connectionAdded 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.

onClientConnectionAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientConnectionAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the connectionAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #connectionAdded callback

connectionRemoved

type ClientConnectionRemovedCallback Source #

Arguments

 = RemoteConnection

connection: the removed connection

-> IO () 

Notifies that a Connection has been removed.

afterClientConnectionRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientConnectionRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the connectionRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #connectionRemoved 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.

onClientConnectionRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientConnectionRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the connectionRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #connectionRemoved callback

deviceAdded

type ClientDeviceAddedCallback Source #

Arguments

 = Device

device: the new device

-> IO () 

Notifies that a Device is added. This signal is not emitted for placeholder devices.

afterClientDeviceAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientDeviceAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deviceAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #deviceAdded 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.

onClientDeviceAdded :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientDeviceAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deviceAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #deviceAdded callback

deviceRemoved

type ClientDeviceRemovedCallback Source #

Arguments

 = Device

device: the removed device

-> IO () 

Notifies that a Device is removed. This signal is not emitted for placeholder devices.

afterClientDeviceRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientDeviceRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deviceRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #deviceRemoved 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.

onClientDeviceRemoved :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientDeviceRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deviceRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #deviceRemoved callback

permissionChanged

type ClientPermissionChangedCallback Source #

Arguments

 = Word32

permission: a permission from ClientPermission

-> Word32

result: the permission's result, one of ClientPermissionResult

-> IO () 

Notifies that a permission has changed

afterClientPermissionChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientPermissionChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the permissionChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after client #permissionChanged 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.

onClientPermissionChanged :: (IsClient a, MonadIO m) => a -> ((?self :: a) => ClientPermissionChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the permissionChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on client #permissionChanged callback