![]() |
![]() |
![]() |
libnm-glib Reference Manual | ![]() |
---|---|---|---|---|
#define NM_CLIENT_STATE #define NM_CLIENT_MANAGER_RUNNING #define NM_CLIENT_WIRELESS_ENABLED #define NM_CLIENT_WIRELESS_HARDWARE_ENABLED #define NM_CLIENT_ACTIVE_CONNECTIONS NMClient; NMClient* nm_client_new (void); const GPtrArray* nm_client_get_devices (NMClient *client); NMDevice* nm_client_get_device_by_path (NMClient *client, const char *object_path); void (*NMClientActivateDeviceFn) (gpointer user_data, const char *object_path, GError *error); void nm_client_activate_connection (NMClient *client, const char *service_name, const char *connection_path, NMDevice *device, const char *specific_object, NMClientActivateDeviceFn callback, gpointer user_data); void nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active); 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); NMState nm_client_get_state (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);
"active-connections" nm-object-array : Read "manager-running" gboolean : Read "state" guint : Read "wireless-enabled" gboolean : Read / Write "wireless-hardware-enabled" gboolean : Read
#define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled"
const GPtrArray* nm_client_get_devices (NMClient *client);
Gets all the detected devices.
NMDevice* nm_client_get_device_by_path (NMClient *client, const char *object_path);
Gets a NMDevice from a NMClient.
void (*NMClientActivateDeviceFn) (gpointer user_data, const char *object_path, GError *error);
|
|
|
|
|
void nm_client_activate_connection (NMClient *client, const char *service_name, const char *connection_path, NMDevice *device, const char *specific_object, NMClientActivateDeviceFn callback, gpointer user_data);
Activates a connection with the given NMDevice.
|
a NMClient |
|
the connection's service name |
|
the connection's DBus path |
|
the NMDevice |
|
the device specific object (currently used only for activating wireless devices and should be the NMAccessPoint's path. |
|
the function to call when the call is done |
|
user data to pass to the callback function |
void nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active);
Deactivates an active NMActiveConnection.
|
a NMClient |
|
the NMActiveConnection to deactivate |
gboolean nm_client_wireless_get_enabled (NMClient *client);
Determines whether the wireless is enabled.
void nm_client_wireless_set_enabled (NMClient *client, gboolean enabled);
Enables or disables wireless devices.
gboolean nm_client_wireless_hardware_get_enabled (NMClient *client);
Determines whether the wireless hardware is enabled.
NMState nm_client_get_state (NMClient *client);
Gets the current daemon state.
|
a NMClient |
Returns : |
the current NMState
|
gboolean nm_client_get_manager_running (NMClient *client);
Determines whether the daemon is running.
const GPtrArray* nm_client_get_active_connections (NMClient *client);
Gets the active connections.
|
a NMClient |
Returns : |
a GPtrArray containing all the active NMActiveConnections. The returned array is owned by the client and should not be modified. |
"manager-running"
property"manager-running" gboolean : Read
Whether NetworkManager is running.
Default value: FALSE
"state"
property"state" guint : Read
The current daemon state.
Allowed values: <= 4
Default value: 0
"wireless-enabled"
property"wireless-enabled" gboolean : Read / Write
Is wireless enabled.
Default value: TRUE
"wireless-hardware-enabled"
property"wireless-hardware-enabled" gboolean : Read
Is wireless hardware enabled.
Default value: TRUE