Client
Object Hierarchy:
Description:
[ CCode ( type_id = "nm_client_get_type ()" ) ]
public class Client : Object, AsyncInitable, Initable
public class Client : Object, AsyncInitable, Initable
Namespace: NM
Package: libnm-glib
Content:
Constants:
- public const string ACTIVATING_CONNECTION
- public const string ACTIVE_CONNECTIONS
- public const string ALL_DEVICES
- public const string CONNECTIVITY
- public const string DEVICES
- public const string MANAGER_RUNNING
- public const string NETWORKING_ENABLED
- public const string PRIMARY_CONNECTION
- public const string STARTUP
- public const string STATE
- public const string VERSION
- public const string WIMAX_ENABLED
- public const string WIMAX_HARDWARE_ENABLED
- public const string WIRELESS_ENABLED
- public const string WIRELESS_HARDWARE_ENABLED
- public const string WWAN_ENABLED
- public const string WWAN_HARDWARE_ENABLED
Properties:
- public ActiveConnection activating_connection { get; }
The ActiveConnection of the activating connection that is likely to become the new primary_connection.
- public GenericArray<void*> active_connections { get; }
The active connections.
- public ObjectArray all_devices { get; }
List of both real devices and device placeholders.
- public uint connectivity { get; }
The network connectivity state.
- public ObjectArray devices { get; }
List of real network devices.
- public bool manager_running { get; }
Whether the daemon is running.
- public bool networking_enabled { get; set; }
Whether networking is enabled.
- public ActiveConnection primary_connection { get; }
The ActiveConnection of the device with the default route; see get_primary_connection for more details.
- public bool startup { get; }
Whether the daemon is still starting up.
- public uint state { get; }
The current daemon state.
- public string version { get; }
The NetworkManager version.
- public bool wimax_enabled { get; set; }
Whether WiMAX functionality is enabled.
- public bool wimax_hardware_enabled { get; }
Whether the WiMAX hardware is enabled.
- public bool wireless_enabled { get; set; }
Whether wireless is enabled.
- public bool wireless_hardware_enabled { get; }
Whether the wireless hardware is enabled.
- public bool wwan_enabled { get; set; }
Whether WWAN functionality is enabled.
- public bool wwan_hardware_enabled { get; }
Whether the WWAN hardware is enabled.
Static methods:
- public static async Client new_async (Cancellable? cancellable) throws Error
Creates a new Client and begins asynchronously initializing it.
Creation methods:
- public Client ()
Creates a new Client.
Methods:
- public void activate_connection (Connection? connection, Device? device, string? specific_object, ClientActivateFn? callback)
Starts a connection to a particular network using the configuration settings from
connection
and the network devicedevice
. - public void add_and_activate_connection (Connection? @partial, Device device, string? specific_object, ClientAddActivateFn? callback)
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.
- public ConnectivityState check_connectivity (Cancellable? cancellable = null) throws Error
Updates the network connectivity state and returns the (new) current state.
- public async ConnectivityState check_connectivity_async (Cancellable? cancellable) throws Error
Asynchronously updates the network connectivity state and invokes
callback
when complete. - public void deactivate_connection (ActiveConnection active)
Deactivates an active ActiveConnection.
- public unowned ActiveConnection get_activating_connection ()
Gets the ActiveConnection corresponding to a currently-activating connection that is expected to become the new primary_connection upon successful activation.
- public unowned GenericArray<ActiveConnection> get_active_connections ()
Gets the active connections.
- public unowned GenericArray<Device> get_all_devices ()
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 NMDevice::ActivatableConnections was activated).
- public ConnectivityState get_connectivity ()
Gets the current network connectivity state.
- public unowned Device get_device_by_iface (string iface)
Gets a Device from a Client.
- public unowned Device get_device_by_path (string object_path)
Gets a Device from a Client.
- public unowned GenericArray<Device> get_devices ()
Gets all the known network devices.
- public bool get_logging (string? level, string? domains) throws Error
Gets NetworkManager current logging level and domains.
- public bool get_manager_running ()
Determines whether the daemon is running.
- public ClientPermissionResult get_permission_result (ClientPermission permission)
Requests the result of a specific permission, which indicates whether the client can or cannot perform the action the permission represents
- public unowned ActiveConnection get_primary_connection ()
Gets the ActiveConnection corresponding to the primary active network device.
- public bool get_startup ()
Tests whether the daemon is still in the process of activating connections at startup.
- public State get_state ()
Gets the current daemon state.
- public unowned string get_version ()
Gets NetworkManager version.
- public bool networking_get_enabled ()
Whether networking is enabled or disabled.
- public void networking_set_enabled (bool enabled)
Enables or disables networking.
- public bool set_logging (string? level, string? domains) throws Error
Sets NetworkManager logging level and/or domains.
- public void sleep (bool sleep_)
Deprecated; use networking_set_enabled instead.
- public bool wimax_get_enabled ()
Determines whether WiMAX is enabled.
- public bool wimax_hardware_get_enabled ()
Determines whether the WiMAX hardware is enabled.
- public void wimax_set_enabled (bool enabled)
Enables or disables WiMAX devices.
- public bool wireless_get_enabled ()
Determines whether the wireless is enabled.
- public bool wireless_hardware_get_enabled ()
Determines whether the wireless hardware is enabled.
- public void wireless_set_enabled (bool enabled)
Enables or disables wireless devices.
- public bool wwan_get_enabled ()
Determines whether WWAN is enabled.
- public bool wwan_hardware_get_enabled ()
Determines whether the WWAN hardware is enabled.
- public void wwan_set_enabled (bool enabled)
Enables or disables WWAN devices.
Signals:
- public signal void any_device_added (Device device)
Notifies that a Device is added.
- public signal void any_device_removed (Device device)
Notifies that a Device is removed.
- public virtual signal void device_added (Device device)
Notifies that a Device is added.
- public virtual signal void device_removed (Device device)
Notifies that a Device is removed.
- public virtual signal void permission_changed (uint permission, uint result)
Notifies that a permission has changed
Inherited Members:
All known members inherited from class NM.Object
All known members inherited from class GLib.Object
All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.Initable