From 33491bc4279481db8ae47213e34a6d695a0e8830 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 6 Jul 2014 02:16:10 +0200 Subject: Imported Upstream version 0.9.10.0 --- docs/libnm-glib/html/NMClient.html | 3181 +++++++++++++++++------------------- 1 file changed, 1495 insertions(+), 1686 deletions(-) (limited to 'docs/libnm-glib/html/NMClient.html') diff --git a/docs/libnm-glib/html/NMClient.html b/docs/libnm-glib/html/NMClient.html index 842183d9..67de2786 100644 --- a/docs/libnm-glib/html/NMClient.html +++ b/docs/libnm-glib/html/NMClient.html @@ -2,29 +2,38 @@ -libnm-glib Reference Manual: NMClient +NMClient - + - - - - - - - + + + + + + + + + +
@@ -32,2150 +41,1950 @@

NMClient

NMClient

- +
+
+

Synopsis

+
#define             NM_CLIENT_VERSION
+#define             NM_CLIENT_STATE
+#define             NM_CLIENT_STARTUP
+#define             NM_CLIENT_MANAGER_RUNNING
+#define             NM_CLIENT_NETWORKING_ENABLED
+#define             NM_CLIENT_WIRELESS_ENABLED
+#define             NM_CLIENT_WIRELESS_HARDWARE_ENABLED
+#define             NM_CLIENT_WWAN_ENABLED
+#define             NM_CLIENT_WWAN_HARDWARE_ENABLED
+#define             NM_CLIENT_WIMAX_ENABLED
+#define             NM_CLIENT_WIMAX_HARDWARE_ENABLED
+#define             NM_CLIENT_ACTIVE_CONNECTIONS
+#define             NM_CLIENT_CONNECTIVITY
+#define             NM_CLIENT_PRIMARY_CONNECTION
+#define             NM_CLIENT_ACTIVATING_CONNECTION
+#define             NM_CLIENT_DEVICES
+enum                NMClientPermission;
+enum                NMClientPermissionResult;
+enum                NMClientError;
+#define             NM_CLIENT_ERROR
+GQuark              nm_client_error_quark               (void);
+                    NMClient;
+                    NMClientClass;
+NMClient *          nm_client_new                       (void);
+void                nm_client_new_async                 (GCancellable *cancellable,
+                                                         GAsyncReadyCallback callback,
+                                                         gpointer user_data);
+NMClient *          nm_client_new_finish                (GAsyncResult *result,
+                                                         GError **error);
+const GPtrArray *   nm_client_get_devices               (NMClient *client);
+NMDevice *          nm_client_get_device_by_path        (NMClient *client,
+                                                         const char *object_path);
+NMDevice *          nm_client_get_device_by_iface       (NMClient *client,
+                                                         const char *iface);
+void                (*NMClientActivateFn)               (NMClient *client,
+                                                         NMActiveConnection *active_connection,
+                                                         GError *error,
+                                                         gpointer user_data);
+void                nm_client_activate_connection       (NMClient *client,
+                                                         NMConnection *connection,
+                                                         NMDevice *device,
+                                                         const char *specific_object,
+                                                         NMClientActivateFn callback,
+                                                         gpointer user_data);
+void                (*NMClientAddActivateFn)            (NMClient *client,
+                                                         NMActiveConnection *connection,
+                                                         const char *new_connection_path,
+                                                         GError *error,
+                                                         gpointer user_data);
+void                nm_client_add_and_activate_connection
+                                                        (NMClient *client,
+                                                         NMConnection *partial,
+                                                         NMDevice *device,
+                                                         const char *specific_object,
+                                                         NMClientAddActivateFn callback,
+                                                         gpointer user_data);
+void                nm_client_deactivate_connection     (NMClient *client,
+                                                         NMActiveConnection *active);
+gboolean            nm_client_networking_get_enabled    (NMClient *client);
+void                nm_client_networking_set_enabled    (NMClient *client,
+                                                         gboolean enabled);
+gboolean            nm_client_wireless_get_enabled      (NMClient *client);
+void                nm_client_wireless_set_enabled      (NMClient *client,
+                                                         gboolean enabled);
+gboolean            nm_client_wireless_hardware_get_enabled
+                                                        (NMClient *client);
+gboolean            nm_client_wwan_get_enabled          (NMClient *client);
+void                nm_client_wwan_set_enabled          (NMClient *client,
+                                                         gboolean enabled);
+gboolean            nm_client_wwan_hardware_get_enabled (NMClient *client);
+gboolean            nm_client_wimax_get_enabled         (NMClient *client);
+void                nm_client_wimax_set_enabled         (NMClient *client,
+                                                         gboolean enabled);
+gboolean            nm_client_wimax_hardware_get_enabled
+                                                        (NMClient *client);
+const char *        nm_client_get_version               (NMClient *client);
+NMState             nm_client_get_state                 (NMClient *client);
+gboolean            nm_client_get_startup               (NMClient *client);
+gboolean            nm_client_get_manager_running       (NMClient *client);
+const GPtrArray *   nm_client_get_active_connections    (NMClient *client);
+void                nm_client_sleep                     (NMClient *client,
+                                                         gboolean sleep_);
+NMClientPermissionResult nm_client_get_permission_result
+                                                        (NMClient *client,
+                                                         NMClientPermission permission);
+gboolean            nm_client_get_logging               (NMClient *client,
+                                                         char **level,
+                                                         char **domains,
+                                                         GError **error);
+gboolean            nm_client_set_logging               (NMClient *client,
+                                                         const char *level,
+                                                         const char *domains,
+                                                         GError **error);
+NMConnectivityState nm_client_get_connectivity          (NMClient *client);
+NMConnectivityState nm_client_check_connectivity        (NMClient *client,
+                                                         GCancellable *cancellable,
+                                                         GError **error);
+void                nm_client_check_connectivity_async  (NMClient *client,
+                                                         GCancellable *cancellable,
+                                                         GAsyncReadyCallback callback,
+                                                         gpointer user_data);
+NMConnectivityState nm_client_check_connectivity_finish (NMClient *client,
+                                                         GAsyncResult *result,
+                                                         GError **error);
+NMActiveConnection * nm_client_get_primary_connection   (NMClient *client);
+NMActiveConnection * nm_client_get_activating_connection
+                                                        (NMClient *client);
+
+
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-NMClient * - -nm_client_new () -
-void - -nm_client_new_async () -
-NMClient * - -nm_client_new_finish () -
const GPtrArray * - -nm_client_get_devices () -
-NMDevice * - -nm_client_get_device_by_path () -
-NMDevice * - -nm_client_get_device_by_iface () -
-void - -(*NMClientActivateFn) () -
-void - -nm_client_activate_connection () -
-void - -(*NMClientAddActivateFn) () -
-void - -nm_client_add_and_activate_connection () -
-void - -nm_client_deactivate_connection () -
-gboolean - -nm_client_networking_get_enabled () -
-void - -nm_client_networking_set_enabled () -
-gboolean - -nm_client_wireless_get_enabled () -
-void - -nm_client_wireless_set_enabled () -
-gboolean - -nm_client_wireless_hardware_get_enabled () -
-gboolean - -nm_client_wwan_get_enabled () -
-void - -nm_client_wwan_set_enabled () -
-gboolean - -nm_client_wwan_hardware_get_enabled () -
-gboolean - -nm_client_wimax_get_enabled () -
-void - -nm_client_wimax_set_enabled () -
-gboolean - -nm_client_wimax_hardware_get_enabled () -
const char * - -nm_client_get_version () -
-NMState - -nm_client_get_state () -
-gboolean - -nm_client_get_manager_running () -
const GPtrArray * - -nm_client_get_active_connections () -
-void - -nm_client_sleep () -
-NMClientPermissionResult - -nm_client_get_permission_result () -
-gboolean - -nm_client_get_logging () -
-gboolean - -nm_client_set_logging () -
-NMConnectivityState - -nm_client_get_connectivity () -
-NMConnectivityState - -nm_client_check_connectivity () -
-void - -nm_client_check_connectivity_async () -
-NMConnectivityState - -nm_client_check_connectivity_finish () -
-NMActiveConnection * - -nm_client_get_primary_connection () -
-NMActiveConnection * - -nm_client_get_activating_connection () -
+

Object Hierarchy

+
+  GObject
+   +----NMObject
+         +----NMClient
+
+
+
+

Implemented Interfaces

+

+NMClient implements + GInitable and GAsyncInitable.

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-NMActiveConnection *activating-connectionRead
-NMObjectArray *active-connectionsRead
guintconnectivityRead
gbooleanmanager-runningRead
gbooleannetworking-enabledRead / Write
-NMActiveConnection *primary-connectionRead
guintstateRead
-gchar *versionRead
gbooleanwimax-enabledRead / Write
gbooleanwimax-hardware-enabledRead
gbooleanwireless-enabledRead / Write
gbooleanwireless-hardware-enabledRead
gbooleanwwan-enabledRead / Write
gbooleanwwan-hardware-enabledRead
+
+  "activating-connection"    NMActiveConnection*   : Read
+  "active-connections"       NMObjectArray*        : Read
+  "connectivity"             guint                 : Read
+  "devices"                  NMObjectArray*        : Read
+  "manager-running"          gboolean              : Read
+  "networking-enabled"       gboolean              : Read / Write
+  "primary-connection"       NMActiveConnection*   : Read
+  "startup"                  gboolean              : Read
+  "state"                    guint                 : Read
+  "version"                  gchar*                : Read
+  "wimax-enabled"            gboolean              : Read / Write
+  "wimax-hardware-enabled"   gboolean              : Read
+  "wireless-enabled"         gboolean              : Read / Write
+  "wireless-hardware-enabled" gboolean              : Read
+  "wwan-enabled"             gboolean              : Read / Write
+  "wwan-hardware-enabled"    gboolean              : Read
+
-

Types and Values

- +

Description

+

+

-

Object Hierarchy

-
    GObject
-    ╰── NMObject
-        ╰── NMClient
+

Details

+
+

NM_CLIENT_VERSION

+
#define NM_CLIENT_VERSION "version"
 
+

+

-
-

Description

+
+
+

NM_CLIENT_STATE

+
#define NM_CLIENT_STATE "state"
+
+

+

+
+
+
+

NM_CLIENT_STARTUP

+
#define NM_CLIENT_STARTUP "startup"
+
+

+

+
+
+
+

NM_CLIENT_MANAGER_RUNNING

+
#define NM_CLIENT_MANAGER_RUNNING "manager-running"
+
+

+

+
+
+
+

NM_CLIENT_NETWORKING_ENABLED

+
#define NM_CLIENT_NETWORKING_ENABLED "networking-enabled"
+
+

+

+
+
+
+

NM_CLIENT_WIRELESS_ENABLED

+
#define NM_CLIENT_WIRELESS_ENABLED "wireless-enabled"
+
+

+

+
+
+
+

NM_CLIENT_WIRELESS_HARDWARE_ENABLED

+
#define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled"
+
+

+

+
+
+
+

NM_CLIENT_WWAN_ENABLED

+
#define NM_CLIENT_WWAN_ENABLED "wwan-enabled"
+
+

+

+
+
+
+

NM_CLIENT_WWAN_HARDWARE_ENABLED

+
#define NM_CLIENT_WWAN_HARDWARE_ENABLED "wwan-hardware-enabled"
+
+

+

+
+
+
+

NM_CLIENT_WIMAX_ENABLED

+
#define NM_CLIENT_WIMAX_ENABLED "wimax-enabled"
+

-
-

Functions

-
-

nm_client_new ()

-
NMClient *
-nm_client_new (void);
-

Creates a new NMClient.

-

Note that this will do blocking D-Bus calls to initialize the -client. You can use nm_client_new_async() if you want to avoid -that.

-

NOTE: NMClient provides information about devices and a mechanism to -control them. To access and modify network configuration data, use the -NMRemoteSettings object.

-
-

Returns

-

a new NMClient

-

-
-

-

nm_client_new_async ()

-
void
-nm_client_new_async (GCancellable *cancellable,
-                     GAsyncReadyCallback callback,
-                     gpointer user_data);
-

Creates a new NMClient and begins asynchronously initializing it. -callback - will be called when it is done; use -nm_client_new_finish() to get the result.

-

NOTE: NMClient provides information about devices and a mechanism to -control them. To access and modify network configuration data, use the -NMRemoteSettings object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cancellable

a GCancellable, or NULL

 

callback

callback to call when the client is created

 

user_data

data for callback -

 
-
+

NM_CLIENT_WIMAX_HARDWARE_ENABLED

+
#define NM_CLIENT_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled"
+
+

+


-

nm_client_new_finish ()

-
NMClient *
-nm_client_new_finish (GAsyncResult *result,
-                      GError **error);
-

Gets the result of an nm_client_new_async() call.

-
-

Parameters

-
----- - - - - - - - - - - - - -

result

a GAsyncResult

 

error

location for a GError, or NULL

 
-
-
-

Returns

-

a new NMClient, or NULL on error

-

-
+

NM_CLIENT_ACTIVE_CONNECTIONS

+
#define NM_CLIENT_ACTIVE_CONNECTIONS "active-connections"
+
+

+


-

nm_client_get_devices ()

-
const GPtrArray *
-nm_client_get_devices (NMClient *client);
-

Gets all the known network devices. Use nm_device_get_type() or the -NM_IS_DEVICE_XXXX() 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().

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

a GPtrArray -containing all the NMDevices. The returned array is owned by the -NMClient object and should not be modified.

-

[transfer none][element-type NMClient.Device]

-
+

NM_CLIENT_CONNECTIVITY

+
#define NM_CLIENT_CONNECTIVITY "connectivity"
+
+

+


-

nm_client_get_device_by_path ()

-
NMDevice *
-nm_client_get_device_by_path (NMClient *client,
-                              const char *object_path);
-

Gets a NMDevice from a NMClient.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a NMClient

 

object_path

the object path to search for

 
-
-
-

Returns

-

the NMDevice for the given object_path -or NULL if none is found.

-

[transfer none]

-
+

NM_CLIENT_PRIMARY_CONNECTION

+
#define NM_CLIENT_PRIMARY_CONNECTION "primary-connection"
+
+

+


-

nm_client_get_device_by_iface ()

-
NMDevice *
-nm_client_get_device_by_iface (NMClient *client,
-                               const char *iface);
-

Gets a NMDevice from a NMClient.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a NMClient

 

iface

the interface name to search for

 
-
-
-

Returns

-

the NMDevice for the given iface -or NULL if none is found.

-

[transfer none]

-
+

NM_CLIENT_ACTIVATING_CONNECTION

+
#define NM_CLIENT_ACTIVATING_CONNECTION "activating-connection"
+
+

+


-

NMClientActivateFn ()

-
void
-(*NMClientActivateFn) (NMClient *client,
-                       NMActiveConnection *active_connection,
-                       GError *error,
-                       gpointer user_data);
+

NM_CLIENT_DEVICES

+
#define NM_CLIENT_DEVICES "devices"
+


-

nm_client_activate_connection ()

-
void
-nm_client_activate_connection (NMClient *client,
-                               NMConnection *connection,
-                               NMDevice *device,
-                               const char *specific_object,
-                               NMClientActivateFn callback,
-                               gpointer user_data);
-

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 NMAccessPoint for WiFi connections, or an -NMWimaxNsp 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 -.

-
-

Parameters

-
+

enum NMClientPermission

+
typedef enum {
+	NM_CLIENT_PERMISSION_NONE = 0,
+	NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK = 1,
+	NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI = 2,
+	NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN = 3,
+	NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX = 4,
+	NM_CLIENT_PERMISSION_SLEEP_WAKE = 5,
+	NM_CLIENT_PERMISSION_NETWORK_CONTROL = 6,
+	NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED = 7,
+	NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN = 8,
+	NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM = 9,
+	NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN = 10,
+	NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME = 11,
+
+	NM_CLIENT_PERMISSION_LAST = NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME
+} NMClientPermission;
+
+

+NMClientPermission values indicate various permissions that NetworkManager +clients can obtain to perform certain tasks on behalf of the current user. +

+
---++ - - - + + + + + + - - - + + - - - + + - - - + + - - - + + - - - + + - -

client

a NMClient

 

NM_CLIENT_PERMISSION_NONE

unknown or no permission +

NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK

controls whether networking + can be globally enabled or disabled +

connection

an NMConnection

 

NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI

controls whether Wi-Fi can be + globally enabled or disabled +

device

the NMDevice.

[allow-none]

NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN

controls whether WWAN (3G) can be + globally enabled or disabled +

specific_object

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 NULL should be used -(ie, no specific object). For WiFi or WiMAX connections, pass the object -path of a NMAccessPoint or NMWimaxNsp owned by device -, which you can -get using nm_object_get_path(), and which will be used to complete the -details of the newly added connection.

[allow-none]

NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX

controls whether WiMAX can be + globally enabled or disabled +

callback

the function to call when the call is done.

[scope async][allow-none]

NM_CLIENT_PERMISSION_SLEEP_WAKE

controls whether the client can ask + NetworkManager to sleep and wake +

user_data

user data to pass to the callback function.

[closure]

NM_CLIENT_PERMISSION_NETWORK_CONTROL

controls whether networking connections + can be started, stopped, and changed +
-
-
-
-
-

NMClientAddActivateFn ()

-
void
-(*NMClientAddActivateFn) (NMClient *client,
-                          NMActiveConnection *connection,
-                          const char *new_connection_path,
-                          GError *error,
-                          gpointer user_data);
-

-

-
-
-
-

nm_client_add_and_activate_connection ()

-
void
-nm_client_add_and_activate_connection (NMClient *client,
-                                       NMConnection *partial,
-                                       NMDevice *device,
-                                       const char *specific_object,
-                                       NMClientAddActivateFn callback,
-                                       gpointer user_data);
-

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 activated. -Cannot be used for VPN connections at this time.

-
-

Parameters

-
----- - - - - + + - - - + + - - - + + - - - + + - - - + + - - - + +

client

a NMClient

 

NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED

controls whether a password + protected Wi-Fi hotspot can be created +

partial

an NMConnection to add; the connection may be -partially filled (or even NULL) and will be completed by NetworkManager -using the given device -and specific_object -before being added.

[allow-none]

NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN

controls whether an open Wi-Fi hotspot + can be created +

device

the NMDevice

 

NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM

controls whether connections + that are available to all users can be modified +

specific_object

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 NULL should be used -(ie, no specific object). For WiFi or WiMAX connections, pass the object -path of a NMAccessPoint or NMWimaxNsp owned by device -, which you can -get using nm_object_get_path(), and which will be used to complete the -details of the newly added connection.

[allow-none]

NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN

controls whether connections + owned by the current user can be modified +

callback

the function to call when the call is done.

[scope async][allow-none]

NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME

controls whether the + persistent hostname can be changed +

user_data

user data to pass to the callback function.

[closure]

NM_CLIENT_PERMISSION_LAST

a reserved boundary value +
-

-

nm_client_deactivate_connection ()

-
void
-nm_client_deactivate_connection (NMClient *client,
-                                 NMActiveConnection *active);
-

Deactivates an active NMActiveConnection.

-
-

Parameters

-
+

enum NMClientPermissionResult

+
typedef enum {
+	NM_CLIENT_PERMISSION_RESULT_UNKNOWN = 0,
+	NM_CLIENT_PERMISSION_RESULT_YES,
+	NM_CLIENT_PERMISSION_RESULT_AUTH,
+	NM_CLIENT_PERMISSION_RESULT_NO
+} NMClientPermissionResult;
+
+

+NMClientPermissionResult values indicate what authorizations and permissions +the user requires to obtain a given NMClientPermission +

+
---++ - - - + + - - - + + - -

client

a NMClient

 

NM_CLIENT_PERMISSION_RESULT_UNKNOWN

unknown or no authorization +

active

the NMActiveConnection to deactivate

 

NM_CLIENT_PERMISSION_RESULT_YES

the permission is available +
-
-
-
-
-

nm_client_networking_get_enabled ()

-
gboolean
-nm_client_networking_get_enabled (NMClient *client);
-

Whether networking is enabled or disabled.

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

TRUE if networking is enabled, FALSE if networking is disabled

-

-
-
-
-
-

nm_client_networking_set_enabled ()

-
void
-nm_client_networking_set_enabled (NMClient *client,
-                                  gboolean enabled);
-

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.

-
-

Parameters

-
----- - - - - + + - - - + +

client

a NMClient

 

NM_CLIENT_PERMISSION_RESULT_AUTH

authorization is necessary before the + permission is available +

enabled

TRUE to set networking enabled, FALSE to set networking disabled

 

NM_CLIENT_PERMISSION_RESULT_NO

permission to perform the operation is + denied by system policy +
-
-
-
-

nm_client_wireless_get_enabled ()

-
gboolean
-nm_client_wireless_get_enabled (NMClient *client);
-

Determines whether the wireless is enabled.

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

TRUE if wireless is enabled

-

-
-

-

nm_client_wireless_set_enabled ()

-
void
-nm_client_wireless_set_enabled (NMClient *client,
-                                gboolean enabled);
-

Enables or disables wireless devices.

-
-

Parameters

-
+

enum NMClientError

+
typedef enum {
+	NM_CLIENT_ERROR_UNKNOWN = 0,            /*< nick=UnknownError >*/
+	NM_CLIENT_ERROR_MANAGER_NOT_RUNNING,    /*< nick=ManagerNotRunning >*/
+} NMClientError;
+
+

+Describes errors that may result from operations involving a NMClient. +

+
---++ - - - + + - - - + +

client

a NMClient

 

NM_CLIENT_ERROR_UNKNOWN

unknown or unclassified error +

enabled

TRUE to enable wireless

 

NM_CLIENT_ERROR_MANAGER_NOT_RUNNING

an operation that requires NetworkManager + failed because NetworkManager is not running +
-

-

nm_client_wireless_hardware_get_enabled ()

-
gboolean
-nm_client_wireless_hardware_get_enabled
-                               (NMClient *client);
-

Determines whether the wireless hardware is enabled.

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

TRUE if the wireless hardware is enabled

-

-
+

NM_CLIENT_ERROR

+
#define NM_CLIENT_ERROR nm_client_error_quark ()
+
+

+


-

nm_client_wwan_get_enabled ()

-
gboolean
-nm_client_wwan_get_enabled (NMClient *client);
-

Determines whether WWAN is enabled.

-
-

Parameters

-
+

nm_client_error_quark ()

+
GQuark              nm_client_error_quark               (void);
+

+Registers an error quark for NMClient if necessary. +

+
---++ - - - + +

client

a NMClient

 

Returns :

the error quark used for NMClient errors.
-
-
-

Returns

-

TRUE if WWAN is enabled

-

-
+

Since 0.9.10


-

nm_client_wwan_set_enabled ()

-
void
-nm_client_wwan_set_enabled (NMClient *client,
-                            gboolean enabled);
-

Enables or disables WWAN devices.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a NMClient

 

enabled

TRUE to enable WWAN

 
-
+

NMClient

+
typedef struct _NMClient NMClient;
+

+


-

nm_client_wwan_hardware_get_enabled ()

-
gboolean
-nm_client_wwan_hardware_get_enabled (NMClient *client);
-

Determines whether the WWAN hardware is enabled.

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

TRUE if the WWAN hardware is enabled

-

-
+

NMClientClass

+
typedef struct {
+	NMObjectClass parent;
+
+	/* Signals */
+	void (*device_added) (NMClient *client, NMDevice *device);
+	void (*device_removed) (NMClient *client, NMDevice *device);
+	void (*permission_changed) (NMClient *client,
+	                            NMClientPermission permission,
+	                            NMClientPermissionResult result);
+
+	/* Padding for future expansion */
+	void (*_reserved1) (void);
+	void (*_reserved2) (void);
+	void (*_reserved3) (void);
+	void (*_reserved4) (void);
+	void (*_reserved5) (void);
+	void (*_reserved6) (void);
+} NMClientClass;
+
+

+


-

nm_client_wimax_get_enabled ()

-
gboolean
-nm_client_wimax_get_enabled (NMClient *client);
-

Determines whether WiMAX is enabled.

-
-

Parameters

-
+

nm_client_new ()

+
NMClient *          nm_client_new                       (void);
+

+Creates a new NMClient. +

+

+Note that this will do blocking D-Bus calls to initialize the +client. You can use nm_client_new_async() if you want to avoid +that. +

+

+NOTE: NMClient provides information about devices and a mechanism to +control them. To access and modify network configuration data, use the +NMRemoteSettings object. +

+
---++ - - - + +

client

a NMClient

 

Returns :

a new NMClient or NULL on an error
-
-

Returns

-

TRUE if WiMAX is enabled

-

-
-

-

nm_client_wimax_set_enabled ()

-
void
-nm_client_wimax_set_enabled (NMClient *client,
-                             gboolean enabled);
-

Enables or disables WiMAX devices.

-
-

Parameters

-
+

nm_client_new_async ()

+
void                nm_client_new_async                 (GCancellable *cancellable,
+                                                         GAsyncReadyCallback callback,
+                                                         gpointer user_data);
+

+Creates a new NMClient and begins asynchronously initializing it. +callback will be called when it is done; use +nm_client_new_finish() to get the result. Note that on an error, +the callback can be invoked with two first parameters as NULL. +

+

+NOTE: NMClient provides information about devices and a mechanism to +control them. To access and modify network configuration data, use the +NMRemoteSettings object. +

+
---++ - - - + + - - - + + - -

client

a NMClient

 

cancellable :

a GCancellable, or NULL +

enabled

TRUE to enable WiMAX

 

callback :

callback to call when the client is created
-
-
-
-
-

nm_client_wimax_hardware_get_enabled ()

-
gboolean
-nm_client_wimax_hardware_get_enabled (NMClient *client);
-

Determines whether the WiMAX hardware is enabled.

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

TRUE if the WiMAX hardware is enabled

-

-
-
-
-
-

nm_client_get_version ()

-
const char *
-nm_client_get_version (NMClient *client);
-

Gets NetworkManager version.

-
-

Parameters

-
----- - - - - - -

client

a NMClient

 
-
-
-

Returns

-

string with the version

-

-
-
-
-
-

nm_client_get_state ()

-
NMState
-nm_client_get_state (NMClient *client);
-

Gets the current daemon state.

-
-

Parameters

-
----- - - - - - + + + + +

client

a NMClient

 

user_data :

data for callback +
-
-

Returns

-

the current NMState

-

-
-

-

nm_client_get_manager_running ()

-
gboolean
-nm_client_get_manager_running (NMClient *client);
-

Determines whether the daemon is running.

-
-

Parameters

-
+

nm_client_new_finish ()

+
NMClient *          nm_client_new_finish                (GAsyncResult *result,
+                                                         GError **error);
+

+Gets the result of an nm_client_new_async() call. +

+
---++ - - - - - + + + + + + + + + + + + + +

client

a NMClient

 

result :

a GAsyncResult +

error :

location for a GError, or NULL +

Returns :

a new NMClient, or NULL on error
-
-

Returns

-

TRUE if the daemon is running

-

-
-

-

nm_client_get_active_connections ()

-
const GPtrArray *
-nm_client_get_active_connections (NMClient *client);
-

Gets the active connections.

-
-

Parameters

-
+

nm_client_get_devices ()

+
const GPtrArray *   nm_client_get_devices               (NMClient *client);
+

+Gets all the known network devices. Use nm_device_get_type() or the +NM_IS_DEVICE_XXXX() 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(). +

+
---++ - - - - - + + + + + + + + + +

client

a NMClient

 

client :

a NMClient +

Returns :

a GPtrArray +containing all the NMDevices. The returned array is owned by the +NMClient object and should not be modified. [transfer none][element-type NMClient.Device] +
-
-

Returns

-

a GPtrArray -containing all the active NMActiveConnections. -The returned array is owned by the client and should not be modified.

-

[transfer none][element-type NMClient.ActiveConnection]

-
-

-

nm_client_sleep ()

-
void
-nm_client_sleep (NMClient *client,
-                 gboolean sleep_);
-

Deprecated; use nm_client_networking_set_enabled() instead.

-
-

Parameters

-
+

nm_client_get_device_by_path ()

+
NMDevice *          nm_client_get_device_by_path        (NMClient *client,
+                                                         const char *object_path);
+

+Gets a NMDevice from a NMClient. +

+
---++ - - - + + + + + + - - - + +

client

a NMClient

 

client :

a NMClient +

object_path :

the object path to search for

sleep_

TRUE to put the daemon to sleep

 

Returns :

the NMDevice for the given object_path or NULL if none is found. [transfer none] +
-

-

nm_client_get_permission_result ()

-
NMClientPermissionResult
-nm_client_get_permission_result (NMClient *client,
-                                 NMClientPermission permission);
-

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

-
-

Parameters

-
+

nm_client_get_device_by_iface ()

+
NMDevice *          nm_client_get_device_by_iface       (NMClient *client,
+                                                         const char *iface);
+

+Gets a NMDevice from a NMClient. +

+
---++ - - - + + + + + + - - - + +

client

a NMClient

 

client :

a NMClient +

iface :

the interface name to search for

permission

the permission for which to return the result, one of NMClientPermission

 

Returns :

the NMDevice for the given iface or NULL if none is found. [transfer none] +
-
-

Returns

-

the permission's result, one of NMClientPermissionResult

-

-
+
+
+

NMClientActivateFn ()

+
void                (*NMClientActivateFn)               (NMClient *client,
+                                                         NMActiveConnection *active_connection,
+                                                         GError *error,
+                                                         gpointer user_data);
+

+


-

nm_client_get_logging ()

-
gboolean
-nm_client_get_logging (NMClient *client,
-                       char **level,
-                       char **domains,
-                       GError **error);
-

Gets NetworkManager current logging level and domains.

-
-

Parameters

-
+

nm_client_activate_connection ()

+
void                nm_client_activate_connection       (NMClient *client,
+                                                         NMConnection *connection,
+                                                         NMDevice *device,
+                                                         const char *specific_object,
+                                                         NMClientActivateFn callback,
+                                                         gpointer user_data);
+

+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 NMAccessPoint for Wi-Fi connections, or an +NMWimaxNsp 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. +

+
---++ - - - + + + + + + + + + + - - - + + - - - + + - - - + +

client

a NMClient

 

client :

a NMClient +

connection :

an NMConnection. [allow-none] +

device :

the NMDevice. [allow-none] +

level

return location for logging level string.

[allow-none]

specific_object :

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 NULL should be used +(ie, no specific object). For Wi-Fi or WiMAX connections, pass the object +path of a NMAccessPoint or NMWimaxNsp owned by device, which you can +get using nm_object_get_path(), and which will be used to complete the +details of the newly added connection. [allow-none] +

domains

return location for log domains string. The string is -a list of domains separated by ",".

[allow-none]

callback :

the function to call when the call is done. [scope async][allow-none] +

error

return location for a GError, or NULL.

[allow-none]

user_data :

user data to pass to the callback function. [closure] +
-
-

Returns

-

TRUE on success, FALSE otherwise

-

-
-

Since 0.9.8

+
+
+

NMClientAddActivateFn ()

+
void                (*NMClientAddActivateFn)            (NMClient *client,
+                                                         NMActiveConnection *connection,
+                                                         const char *new_connection_path,
+                                                         GError *error,
+                                                         gpointer user_data);
+

+


-

nm_client_set_logging ()

-
gboolean
-nm_client_set_logging (NMClient *client,
-                       const char *level,
-                       const char *domains,
-                       GError **error);
-

Sets NetworkManager logging level and/or domains.

-
-

Parameters

-
+

nm_client_add_and_activate_connection ()

+
void                nm_client_add_and_activate_connection
+                                                        (NMClient *client,
+                                                         NMConnection *partial,
+                                                         NMDevice *device,
+                                                         const char *specific_object,
+                                                         NMClientAddActivateFn callback,
+                                                         gpointer user_data);
+

+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 activated. +Cannot be used for VPN connections at this time. +

+
---++ - - - + + + + + + + + + + - - - + + - - - + + - - - + +

client

a NMClient

 

client :

a NMClient +

partial :

an NMConnection to add; the connection may be +partially filled (or even NULL) and will be completed by NetworkManager +using the given device and specific_object before being added. [allow-none] +

device :

the NMDevice +

level

logging level to set (NULL or an empty string for no change).

[allow-none]

specific_object :

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 NULL should be used +(ie, no specific object). For Wi-Fi or WiMAX connections, pass the object +path of a NMAccessPoint or NMWimaxNsp owned by device, which you can +get using nm_object_get_path(), and which will be used to complete the +details of the newly added connection. [allow-none] +

domains

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

[allow-none]

callback :

the function to call when the call is done. [scope async][allow-none] +

error

return location for a GError, or NULL.

[allow-none]

user_data :

user data to pass to the callback function. [closure] +
-
-

Returns

-

TRUE on success, FALSE otherwise

-

-
-

Since 0.9.8

-

-

nm_client_get_connectivity ()

-
NMConnectivityState
-nm_client_get_connectivity (NMClient *client);
-

Gets the current network connectivity state. Contrast -nm_client_check_connectivity() and -nm_client_check_connectivity_async(), which re-check the -connectivity state first before returning any information.

-
-

Parameters

-
+

nm_client_deactivate_connection ()

+
void                nm_client_deactivate_connection     (NMClient *client,
+                                                         NMActiveConnection *active);
+

+Deactivates an active NMActiveConnection. +

+
---++ - - - - - + + + + + + + + + +

client

an NMClient

 

client :

a NMClient +

active :

the NMActiveConnection to deactivate
-
-

Returns

-

the current connectivity state

-

-
-

Since 0.9.8.4

-

-

nm_client_check_connectivity ()

-
NMConnectivityState
-nm_client_check_connectivity (NMClient *client,
-                              GCancellable *cancellable,
-                              GError **error);
-

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

-

This is a blocking call; use nm_client_check_connectivity_async() -if you do not want to block.

-
-

Parameters

-
+

nm_client_networking_get_enabled ()

+
gboolean            nm_client_networking_get_enabled    (NMClient *client);
+

+Whether networking is enabled or disabled. +

+
---++ - - - - - - - - + + - - - + +

client

an NMClient

 

cancellable

a GCancellable

 

client :

a NMClient +

error

return location for a GError

 

Returns :

+TRUE if networking is enabled, FALSE if networking is disabled
-
-

Returns

-

the (new) current connectivity state

-

-
-

Since 0.9.8.4

-

-

nm_client_check_connectivity_async ()

-
void
-nm_client_check_connectivity_async (NMClient *client,
-                                    GCancellable *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer user_data);
-

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

-
-

Parameters

-
+

nm_client_networking_set_enabled ()

+
void                nm_client_networking_set_enabled    (NMClient *client,
+                                                         gboolean enabled);
+

+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. +

+
---++ - - - - - - - - - - - - - + + - - - + +

client

an NMClient

 

cancellable

a GCancellable

 

callback

callback to call with the result

 

client :

a NMClient +

user_data

data for callback -.

 

enabled :

+TRUE to set networking enabled, FALSE to set networking disabled
-

Since 0.9.8.4

-

-

nm_client_check_connectivity_finish ()

-
NMConnectivityState
-nm_client_check_connectivity_finish (NMClient *client,
-                                     GAsyncResult *result,
-                                     GError **error);
-

Retrieves the result of an nm_client_check_connectivity_async() -call.

-
-

Parameters

-
+

nm_client_wireless_get_enabled ()

+
gboolean            nm_client_wireless_get_enabled      (NMClient *client);
+

+Determines whether the wireless is enabled. +

+
---++ - - - - - - - - + + - - - + +

client

an NMClient

 

result

the GAsyncResult

 

client :

a NMClient +

error

return location for a GError

 

Returns :

+TRUE if wireless is enabled
-
-

Returns

-

the (new) current connectivity state

-

-
-

Since 0.9.8.4

-

-

nm_client_get_primary_connection ()

-
NMActiveConnection *
-nm_client_get_primary_connection (NMClient *client);
-

Gets the NMActiveConnection 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 NULL.

-
-

Parameters

-
+

nm_client_wireless_set_enabled ()

+
void                nm_client_wireless_set_enabled      (NMClient *client,
+                                                         gboolean enabled);
+

+Enables or disables wireless devices. +

+
---++ - - - - - + + + + + + + + + +

client

an NMClient

 

client :

a NMClient +

enabled :

+TRUE to enable wireless
-
-

Returns

-

the appropriate NMActiveConnection, if -any.

-

[transfer none]

-
-

Since 0.9.8.4

-

-

nm_client_get_activating_connection ()

-
NMActiveConnection *
-nm_client_get_activating_connection (NMClient *client);
-

Gets the NMActiveConnection corresponding to a -currently-activating connection that is expected to become the new -“primary-connection” upon successful activation.

-
-

Parameters

-
+

nm_client_wireless_hardware_get_enabled ()

+
gboolean            nm_client_wireless_hardware_get_enabled
+                                                        (NMClient *client);
+

+Determines whether the wireless hardware is enabled. +

+
---++ - - - - - + + + + + + + + + +

client

an NMClient

 

client :

a NMClient +

Returns :

+TRUE if the wireless hardware is enabled
-
-

Returns

-

the appropriate NMActiveConnection, if -any.

-

[transfer none]

-
-

Since 0.9.8.4

-
-
-
-

Types and Values

+
-

NM_CLIENT_VERSION

-
#define NM_CLIENT_VERSION "version"
-
+

nm_client_wwan_get_enabled ()

+
gboolean            nm_client_wwan_get_enabled          (NMClient *client);

+Determines whether WWAN is enabled.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

+TRUE if WWAN is enabled

-

NM_CLIENT_STATE

-
#define NM_CLIENT_STATE "state"
-
+

nm_client_wwan_set_enabled ()

+
void                nm_client_wwan_set_enabled          (NMClient *client,
+                                                         gboolean enabled);

+Enables or disables WWAN devices.

+
++++ + + + + + + + + + + +

client :

a NMClient +

enabled :

+TRUE to enable WWAN

-

NM_CLIENT_MANAGER_RUNNING

-
#define NM_CLIENT_MANAGER_RUNNING "manager-running"
-
+

nm_client_wwan_hardware_get_enabled ()

+
gboolean            nm_client_wwan_hardware_get_enabled (NMClient *client);

+Determines whether the WWAN hardware is enabled.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

+TRUE if the WWAN hardware is enabled

-

NM_CLIENT_NETWORKING_ENABLED

-
#define NM_CLIENT_NETWORKING_ENABLED "networking-enabled"
-
+

nm_client_wimax_get_enabled ()

+
gboolean            nm_client_wimax_get_enabled         (NMClient *client);

+Determines whether WiMAX is enabled.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

+TRUE if WiMAX is enabled

-

NM_CLIENT_WIRELESS_ENABLED

-
#define NM_CLIENT_WIRELESS_ENABLED "wireless-enabled"
-
+

nm_client_wimax_set_enabled ()

+
void                nm_client_wimax_set_enabled         (NMClient *client,
+                                                         gboolean enabled);

+Enables or disables WiMAX devices.

+
++++ + + + + + + + + + + +

client :

a NMClient +

enabled :

+TRUE to enable WiMAX

-

NM_CLIENT_WIRELESS_HARDWARE_ENABLED

-
#define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled"
-
+

nm_client_wimax_hardware_get_enabled ()

+
gboolean            nm_client_wimax_hardware_get_enabled
+                                                        (NMClient *client);

+Determines whether the WiMAX hardware is enabled.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

+TRUE if the WiMAX hardware is enabled

-

NM_CLIENT_WWAN_ENABLED

-
#define NM_CLIENT_WWAN_ENABLED "wwan-enabled"
-
+

nm_client_get_version ()

+
const char *        nm_client_get_version               (NMClient *client);

+Gets NetworkManager version.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

string with the version

-

NM_CLIENT_WWAN_HARDWARE_ENABLED

-
#define NM_CLIENT_WWAN_HARDWARE_ENABLED "wwan-hardware-enabled"
-
+

nm_client_get_state ()

+
NMState             nm_client_get_state                 (NMClient *client);

+Gets the current daemon state.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

the current NMState +

-

NM_CLIENT_WIMAX_ENABLED

-
#define NM_CLIENT_WIMAX_ENABLED "wimax-enabled"
-
+

nm_client_get_startup ()

+
gboolean            nm_client_get_startup               (NMClient *client);

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

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

whether the daemon is still starting up
+

Since 0.9.10


-

NM_CLIENT_WIMAX_HARDWARE_ENABLED

-
#define NM_CLIENT_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled"
-
+

nm_client_get_manager_running ()

+
gboolean            nm_client_get_manager_running       (NMClient *client);

+Determines whether the daemon is running.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

+TRUE if the daemon is running

-

NM_CLIENT_ACTIVE_CONNECTIONS

-
#define NM_CLIENT_ACTIVE_CONNECTIONS "active-connections"
-
+

nm_client_get_active_connections ()

+
const GPtrArray *   nm_client_get_active_connections    (NMClient *client);

+Gets the active connections.

+
++++ + + + + + + + + + + +

client :

a NMClient +

Returns :

a GPtrArray +containing all the active NMActiveConnections. +The returned array is owned by the client and should not be modified. [transfer none][element-type NMClient.ActiveConnection] +

-

NM_CLIENT_CONNECTIVITY

-
#define NM_CLIENT_CONNECTIVITY "connectivity"
-
+

nm_client_sleep ()

+
void                nm_client_sleep                     (NMClient *client,
+                                                         gboolean sleep_);

+Deprecated; use nm_client_networking_set_enabled() instead.

+
++++ + + + + + + + + + + +

client :

a NMClient +

sleep_ :

+TRUE to put the daemon to sleep

-

NM_CLIENT_PRIMARY_CONNECTION

-
#define NM_CLIENT_PRIMARY_CONNECTION "primary-connection"
-
+

nm_client_get_permission_result ()

+
NMClientPermissionResult nm_client_get_permission_result
+                                                        (NMClient *client,
+                                                         NMClientPermission permission);

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

+
++++ + + + + + + + + + + + + + + +

client :

a NMClient +

permission :

the permission for which to return the result, one of NMClientPermission +

Returns :

the permission's result, one of NMClientPermissionResult +

-

NM_CLIENT_ACTIVATING_CONNECTION

-
#define NM_CLIENT_ACTIVATING_CONNECTION "activating-connection"
-
+

nm_client_get_logging ()

+
gboolean            nm_client_get_logging               (NMClient *client,
+                                                         char **level,
+                                                         char **domains,
+                                                         GError **error);

+Gets NetworkManager current logging level and domains.

+
++++ + + + + + + + + + + + + + + + + + + + + + + +

client :

a NMClient +

level :

return location for logging level string. [allow-none] +

domains :

return location for log domains string. The string is +a list of domains separated by ",". [allow-none] +

error :

return location for a GError, or NULL. [allow-none] +

Returns :

+TRUE on success, FALSE otherwise
+

Since 0.9.8


-

enum NMClientPermission

-

NMClientPermission values indicate various permissions that NetworkManager -clients can obtain to perform certain tasks on behalf of the current user.

-
-

Members

-
+

nm_client_set_logging ()

+
gboolean            nm_client_set_logging               (NMClient *client,
+                                                         const char *level,
+                                                         const char *domains,
+                                                         GError **error);
+

+Sets NetworkManager logging level and/or domains. +

+
---++ - - + - - - + - - - + - - - + - - - + + + +

NM_CLIENT_PERMISSION_NONE

-

unknown or no permission

+

client :

a NMClient  

NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK

-

controls whether networking - can be globally enabled or disabled

+

level :

logging level to set (NULL or an empty string for no change). [allow-none]  

NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI

-

controls whether WiFi can be - globally enabled or disabled

+

domains :

logging domains to set. The string should be a list of log +domains separated by ",". (NULL or an empty string for no change). [allow-none]  

NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN

-

controls whether WWAN (3G) can be - globally enabled or disabled

+

error :

return location for a GError, or NULL. [allow-none]  

NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX

-

controls whether WiMAX can be - globally enabled or disabled

+

Returns :

+TRUE on success, FALSE otherwise
+

Since 0.9.8

+
+
+
+

nm_client_get_connectivity ()

+
NMConnectivityState nm_client_get_connectivity          (NMClient *client);
+

+Gets the current network connectivity state. Contrast +nm_client_check_connectivity() and +nm_client_check_connectivity_async(), which re-check the +connectivity state first before returning any information. +

+
++++ + + + + - - - + + + +

client :

an NMClient  

NM_CLIENT_PERMISSION_SLEEP_WAKE

-

controls whether the client can ask - NetworkManager to sleep and wake

+

Returns :

the current connectivity state
+

Since 0.9.8.6

+
+
+
+

nm_client_check_connectivity ()

+
NMConnectivityState nm_client_check_connectivity        (NMClient *client,
+                                                         GCancellable *cancellable,
+                                                         GError **error);
+

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

+

+This is a blocking call; use nm_client_check_connectivity_async() +if you do not want to block. +

+
++++ + + + + - - - + - - - + - - - + + + +

client :

an NMClient  

NM_CLIENT_PERMISSION_NETWORK_CONTROL

-

controls whether networking connections - can be started, stopped, and changed

+

cancellable :

a GCancellable  

NM_CLIENT_PERMISSION_WIFI_SHARE_PROTECTED

-

controls whether a password - protected WiFi hotspot can be created

+

error :

return location for a GError  

NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN

-

controls whether an open WiFi hotspot - can be created

+

Returns :

the (new) current connectivity state
+

Since 0.9.8.6

+
+
+
+

nm_client_check_connectivity_async ()

+
void                nm_client_check_connectivity_async  (NMClient *client,
+                                                         GCancellable *cancellable,
+                                                         GAsyncReadyCallback callback,
+                                                         gpointer user_data);
+

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

+
++++ + + + + - - - + - - - + + + + + + + +

client :

an NMClient  

NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM

-

controls whether connections - that are available to all users can be modified

+

cancellable :

a GCancellable  

NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN

-

controls whether connections - owned by the current user can be modified

+

callback :

callback to call with the result

user_data :

data for callback.
+

Since 0.9.8.6

+
+
+
+

nm_client_check_connectivity_finish ()

+
NMConnectivityState nm_client_check_connectivity_finish (NMClient *client,
+                                                         GAsyncResult *result,
+                                                         GError **error);
+

+Retrieves the result of an nm_client_check_connectivity_async() +call. +

+
++++ + + + + - - - + - - - + - + + + +

client :

an NMClient  

NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME

-

controls whether the - persistent hostname can be changed

+

result :

the GAsyncResult  

NM_CLIENT_PERMISSION_LAST

-

a reserved boundary value

+

error :

return location for a GError  

Returns :

the (new) current connectivity state
-
+

Since 0.9.8.6


-

enum NMClientPermissionResult

-

NMClientPermissionResult values indicate what authorizations and permissions -the user requires to obtain a given NMClientPermission

-
-

Members

-
+

nm_client_get_primary_connection ()

+
NMActiveConnection * nm_client_get_primary_connection   (NMClient *client);
+

+Gets the NMActiveConnection 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 NULL. +

+
---++ - - + - - - + - + +

NM_CLIENT_PERMISSION_RESULT_UNKNOWN

-

unknown or no authorization

+

client :

an NMClient  

NM_CLIENT_PERMISSION_RESULT_YES

-

the permission is available

+

Returns :

the appropriate NMActiveConnection, if +any. [transfer none]  
+

Since 0.9.8.6

+
+
+
+

nm_client_get_activating_connection ()

+
NMActiveConnection * nm_client_get_activating_connection
+                                                        (NMClient *client);
+

+Gets the NMActiveConnection corresponding to a +currently-activating connection that is expected to become the new +"primary-connection" upon successful activation. +

+
++++ + - - + - - - + -

NM_CLIENT_PERMISSION_RESULT_AUTH

-

authorization is necessary before the - permission is available

+

client :

an NMClient  

NM_CLIENT_PERMISSION_RESULT_NO

-

permission to perform the operation is - denied by system policy

+

Returns :

the appropriate NMActiveConnection, if +any. [transfer none]  
-
+

Since 0.9.8.6

Property Details

-

The “activating-connection” property

-
  “activating-connection”    NMActiveConnection *
-

Activating connection.

-

Flags: Read

-

Since 0.9.8.4

+

The "activating-connection" property

+
  "activating-connection"    NMActiveConnection*   : Read
+

+The NMActiveConnection of the activating connection that is +likely to become the new "primary-connection". +

+

Since 0.9.8.6


-

The “active-connections” property

-
  “active-connections”       NMObjectArray *
+

The "active-connections" property

+
  "active-connections"       NMObjectArray*        : Read

Active connections.

-

Flags: Read


-

The “connectivity” property

-
  “connectivity”             guint
-

Connectivity state.

-

Flags: Read

+

The "connectivity" property

+
  "connectivity"             guint                 : Read
+

+The network connectivity state. +

Allowed values: <= 4

Default value: 0

-

Since 0.9.8.4

+

Since 0.9.8.6

+
+
+
+

The "devices" property

+
  "devices"                  NMObjectArray*        : Read
+

+List of known network devices. +

+

Since 0.9.10


-

The “manager-running” property

-
  “manager-running”          gboolean
+

The "manager-running" property

+
  "manager-running"          gboolean              : Read

Whether NetworkManager is running.

-

Flags: Read

Default value: FALSE


-

The “networking-enabled” property

-
  “networking-enabled”       gboolean
+

The "networking-enabled" property

+
  "networking-enabled"       gboolean              : Read / Write

Is networking enabled.

-

Flags: Read / Write

Default value: TRUE


-

The “primary-connection” property

-
  “primary-connection”       NMActiveConnection *
-

Primary connection.

-

Flags: Read

-

Since 0.9.8.4

+

The "primary-connection" property

+
  "primary-connection"       NMActiveConnection*   : Read
+

+The NMActiveConnection of the device with the default route; +see nm_client_get_primary_connection() for more details. +

+

Since 0.9.8.6

+
+
+
+

The "startup" property

+
  "startup"                  gboolean              : Read
+

+Whether the daemon is still starting up. +

+

Default value: FALSE

+

Since 0.9.10


-

The “state” property

-
  “state”                    guint
-

NetworkManager state.

-

Flags: Read

+

The "state" property

+
  "state"                    guint                 : Read
+

+The current daemon state. +

Allowed values: <= 70

Default value: 0


-

The “version” property

-
  “version”                  gchar *
-

NetworkManager version.

-

Flags: Read

+

The "version" property

+
  "version"                  gchar*                : Read
+

+The NetworkManager version. +

Default value: NULL


-

The “wimax-enabled” property

-
  “wimax-enabled”            gboolean
+

The "wimax-enabled" property

+
  "wimax-enabled"            gboolean              : Read / Write

Is WiMAX enabled.

-

Flags: Read / Write

Default value: FALSE


-

The “wimax-hardware-enabled” property

-
  “wimax-hardware-enabled”   gboolean
+

The "wimax-hardware-enabled" property

+
  "wimax-hardware-enabled"   gboolean              : Read

Is WiMAX hardware enabled.

-

Flags: Read

Default value: FALSE


-

The “wireless-enabled” property

-
  “wireless-enabled”         gboolean
+

The "wireless-enabled" property

+
  "wireless-enabled"         gboolean              : Read / Write

Is wireless enabled.

-

Flags: Read / Write

Default value: FALSE


-

The “wireless-hardware-enabled” property

-
  “wireless-hardware-enabled” gboolean
+

The "wireless-hardware-enabled" property

+
  "wireless-hardware-enabled" gboolean              : Read

Is wireless hardware enabled.

-

Flags: Read

Default value: TRUE


-

The “wwan-enabled” property

-
  “wwan-enabled”             gboolean
+

The "wwan-enabled" property

+
  "wwan-enabled"             gboolean              : Read / Write

Is WWAN enabled.

-

Flags: Read / Write

Default value: FALSE


-

The “wwan-hardware-enabled” property

-
  “wwan-hardware-enabled”    gboolean
+

The "wwan-hardware-enabled" property

+
  "wwan-hardware-enabled"    gboolean              : Read

Is WWAN hardware enabled.

-

Flags: Read

Default value: FALSE

Signal Details

-

The “device-added” signal

-
void
-user_function (NMClient *client,
-               GObject  *device,
-               gpointer  user_data)
-

Flags: Run First

+

The "device-added" signal

+
void                user_function                      (NMClient *client,
+                                                        GObject  *device,
+                                                        gpointer  user_data)      : Run First
+

+Notifies that a NMDevice is added. +

+
++++ + + + + + + + + + + + + + + +

client :

the client that received the signal

device :

the new device. [type NMClient.Device] +

user_data :

user data set when the signal handler was connected.

-

The “device-removed” signal

-
void
-user_function (NMClient *client,
-               GObject  *device,
-               gpointer  user_data)
-

Flags: Run First

+

The "device-removed" signal

+
void                user_function                      (NMClient *client,
+                                                        GObject  *device,
+                                                        gpointer  user_data)      : Run First
+

+Notifies that a NMDevice is removed. +

+
++++ + + + + + + + + + + + + + + +

client :

the client that received the signal

device :

the removed device. [type NMClient.Device] +

user_data :

user data set when the signal handler was connected.

-

The “permission-changed” signal

-
void
-user_function (NMClient *client,
-               guint     permission,
-               guint     result,
-               gpointer  user_data)
-

Flags: Run First

+

The "permission-changed" signal

+
void                user_function                      (NMClient *client,
+                                                        guint     permission,
+                                                        guint     result,
+                                                        gpointer  user_data)       : Run First
+

+Notifies that a permission has changed +

+
++++ + + + + + + + + + + + + + + + + + + +

client :

the client that received the signal

permission :

a permission from NMClientPermission +

result :

the permission's result, one of NMClientPermissionResult +

user_data :

user data set when the signal handler was connected.
+ Generated by GTK-Doc V1.19
\ No newline at end of file -- cgit 1.3.0-6-gf8a5