![]() |
![]() |
![]() |
libnm-glib Reference Manual | ![]() |
---|---|---|---|---|
#define NM_DEVICE_UDI #define NM_DEVICE_INTERFACE #define NM_DEVICE_DRIVER #define NM_DEVICE_CAPABILITIES #define NM_DEVICE_MANAGED #define NM_DEVICE_IP4_CONFIG #define NM_DEVICE_DHCP4_CONFIG #define NM_DEVICE_STATE #define NM_DEVICE_VENDOR #define NM_DEVICE_PRODUCT NMDevice; GObject* nm_device_new (DBusGConnection *connection, const char *path); const char* nm_device_get_iface (NMDevice *device); const char* nm_device_get_udi (NMDevice *device); const char* nm_device_get_driver (NMDevice *device); guint32 nm_device_get_capabilities (NMDevice *device); gboolean nm_device_get_managed (NMDevice *device); NMIP4Config* nm_device_get_ip4_config (NMDevice *device); NMDHCP4Config* nm_device_get_dhcp4_config (NMDevice *device); NMDeviceState nm_device_get_state (NMDevice *device); const char* nm_device_get_product (NMDevice *device); const char* nm_device_get_vendor (NMDevice *device);
GObject +----NMObject +----NMDevice +----NMDeviceEthernet +----NMDeviceWifi +----NMSerialDevice
"capabilities" guint : Read "dhcp4-config" NMDHCP4Config : Read "driver" gchararray : Read "interface" gchararray : Read "ip4-config" NMIP4Config : Read "managed" gboolean : Read "product" gchararray : Read "state" guint : Read "udi" gchararray : Read "vendor" gchararray : Read
GObject* nm_device_new (DBusGConnection *connection, const char *path);
Creates a new NMDevice.
|
the DBusGConnection |
|
the DBus object path of the device |
Returns : |
a new device |
const char* nm_device_get_iface (NMDevice *device);
Gets the interface name of the NMDevice.
|
a NMDevice |
Returns : |
the interface of the device. This is the internal string used by the device, and must not be modified. |
const char* nm_device_get_udi (NMDevice *device);
Gets the HAL UDI of the NMDevice.
|
a NMDevice |
Returns : |
the HAL UDI of the device. This is the internal string used by the device, and must not be modified. |
const char* nm_device_get_driver (NMDevice *device);
Gets the driver of the NMDevice.
|
a NMDevice |
Returns : |
the driver of the device. This is the internal string used by the device, and must not be modified. |
guint32 nm_device_get_capabilities (NMDevice *device);
Gets the device' capabilities.
|
a NMDevice |
Returns : |
the capabilities |
gboolean nm_device_get_managed (NMDevice *device);
Whether the NMDevice is managed by NetworkManager.
NMIP4Config* nm_device_get_ip4_config (NMDevice *device);
Gets the current NMIP4Config associated with the NMDevice.
|
a NMDevice |
Returns : |
the NMIP4Config or NULL if the device is not activated.
|
NMDHCP4Config* nm_device_get_dhcp4_config (NMDevice *device);
Gets the current NMDHCP4Config associated with the NMDevice.
NMDeviceState nm_device_get_state (NMDevice *device);
Gets the current NMDevice state.
|
a NMDevice |
Returns : |
the current device state |
const char* nm_device_get_product (NMDevice *device);
Gets the product string of the NMDevice.
|
a NMDevice |
Returns : |
the product name of the device. This is the internal string used by the device, and must not be modified. |
"capabilities"
property"capabilities" guint : Read
The capabilities of the device.
Default value: 0
"interface"
property"interface" gchararray : Read
The interface of the device.
Default value: NULL
"managed"
property"managed" gboolean : Read
Whether the device is managed by NetworkManager.
Default value: FALSE
"product"
property"product" gchararray : Read
The product string of the device.
Default value: NULL
"vendor"
property"vendor" gchararray : Read
The vendor string of the device.
Default value: NULL
"state-changed"
signalvoid user_function (NMDevice *device, guint state, guint arg2, guint arg3, gpointer user_data) : Run First
Notifies the state change of a NMDevice.
|
the client that received the signal |
|
the new state of the device |
|
user data set when the signal handler was connected. |