![]() |
![]() |
![]() |
libnm-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define NM_DEVICE_DEVICE_TYPE #define NM_DEVICE_UDI #define NM_DEVICE_INTERFACE #define NM_DEVICE_IP_INTERFACE #define NM_DEVICE_DRIVER #define NM_DEVICE_CAPABILITIES #define NM_DEVICE_MANAGED #define NM_DEVICE_FIRMWARE_MISSING #define NM_DEVICE_IP4_CONFIG #define NM_DEVICE_DHCP4_CONFIG #define NM_DEVICE_IP6_CONFIG #define NM_DEVICE_DHCP6_CONFIG #define NM_DEVICE_STATE #define NM_DEVICE_VENDOR #define NM_DEVICE_PRODUCT NMDevice; NMDeviceClass; GObject * nm_device_new (DBusGConnection *connection
,const char *path
); const char * nm_device_get_iface (NMDevice *device
); const char * nm_device_get_ip_iface (NMDevice *device
); NMDeviceType nm_device_get_device_type (NMDevice *device
); const char * nm_device_get_udi (NMDevice *device
); const char * nm_device_get_driver (NMDevice *device
); NMDeviceCapabilities nm_device_get_capabilities (NMDevice *device
); gboolean nm_device_get_managed (NMDevice *device
); gboolean nm_device_get_firmware_missing (NMDevice *device
); NMIP4Config * nm_device_get_ip4_config (NMDevice *device
); NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *device
); NMIP6Config * nm_device_get_ip6_config (NMDevice *device
); NMDHCP6Config * nm_device_get_dhcp6_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
); void (*NMDeviceDeactivateFn) (NMDevice *device
,GError *error
,gpointer user_data
); void nm_device_disconnect (NMDevice *device
,NMDeviceDeactivateFn callback
,gpointer user_data
); GSList * nm_device_filter_connections (NMDevice *device
,const GSList *connections
);
typedef struct { NMObjectClass parent; /* Signals */ void (*state_changed) (NMDevice *device, NMDeviceState new_state, NMDeviceState old_state, NMDeviceStateReason reason); GSList * (*filter_connections) (NMDevice *device, const GSList *connections); /* Padding for future expansion */ void (*_reserved1) (void); void (*_reserved2) (void); void (*_reserved3) (void); void (*_reserved4) (void); void (*_reserved5) (void); void (*_reserved6) (void); } NMDeviceClass;
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. [transfer full] |
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_ip_iface (NMDevice *device
);
Gets the IP interface name of the NMDevice over which IP traffic flows when the device is in the ACTIVATED state.
|
a NMDevice |
Returns : |
the IP traffic interface of the device. This is the internal string used by the device, and must not be modified. |
NMDeviceType nm_device_get_device_type (NMDevice *device
);
Returns the numeric type of the NMDevice, ie ethernet, wifi, etc.
|
a NMDevice |
Returns : |
the device type |
const char * nm_device_get_udi (NMDevice *device
);
Gets the Unique Device Identifier of the NMDevice.
|
a NMDevice |
Returns : |
the Unique Device Identifier of the device. This identifier may be used to gather more information about the device from various operating system services like udev or sysfs. |
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. |
NMDeviceCapabilities 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.
gboolean nm_device_get_firmware_missing (NMDevice *device
);
Indicates that firmware required for the device's operation is likely to be missing.
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. [transfer none]
|
NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *device
);
Gets the current NMDHCP4Config associated with the NMDevice.
NMIP6Config * nm_device_get_ip6_config (NMDevice *device
);
Gets the current NMIP6Config associated with the NMDevice.
|
a NMDevice |
Returns : |
the NMIP6Config or NULL if the device is not activated. [transfer none]
|
NMDHCP6Config * nm_device_get_dhcp6_config (NMDevice *device
);
Gets the current NMDHCP6Config 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. |
const char * nm_device_get_vendor (NMDevice *device
);
Gets the vendor string of the NMDevice.
|
a NMDevice |
Returns : |
the vendor name of the device. This is the internal string used by the device, and must not be modified. |
void (*NMDeviceDeactivateFn) (NMDevice *device
,GError *error
,gpointer user_data
);
void nm_device_disconnect (NMDevice *device
,NMDeviceDeactivateFn callback
,gpointer user_data
);
Disconnects the device if currently connected, and prevents the device from automatically connecting to networks until the next manual network connection request.
|
a NMDevice |
|
callback to be called when disconnect operation completes. [scope async] |
|
caller-specific data passed to callback
|
GSList * nm_device_filter_connections (NMDevice *device
,const GSList *connections
);
Filters a given list of connections for a given NMDevice object and return
connections which may be activated with the device. For example if device
is a WiFi device that supports only WEP encryption, the returned list will
contain any WiFi connections in connections
that allow connection to
unencrypted or WEP-enabled SSIDs. The returned list will not contain
Ethernet, Bluetooth, WiFi WPA connections, or any other connection that is
incompatible with the device.
|
an NMDevice to filter connections for |
|
a list of NMConnection objects to filter |
Returns : |
a
list of NMConnection objects that could be activated with the given device .
The elements of the list are owned by their creator and should not be freed
by the caller, but the returned list itself is owned by the caller and should
be freed with g_slist_free() when it is no longer required. [transfer container][element-type NetworkManager.Connection]
|