| libnm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
#define NM_DEVICE_WIFI_HW_ADDRESS #define NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS #define NM_DEVICE_WIFI_MODE #define NM_DEVICE_WIFI_BITRATE #define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT #define NM_DEVICE_WIFI_CAPABILITIES #define NM_DEVICE_WIFI_ACCESS_POINTS struct NMDeviceWifi; NMDeviceWifiClass; const char * nm_device_wifi_get_hw_address (NMDeviceWifi *device); const char * nm_device_wifi_get_permanent_hw_address (NMDeviceWifi *device); NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *device); guint32 nm_device_wifi_get_bitrate (NMDeviceWifi *device); NMDeviceWifiCapabilities nm_device_wifi_get_capabilities (NMDeviceWifi *device); NMAccessPoint * nm_device_wifi_get_active_access_point (NMDeviceWifi *device); NMAccessPoint * nm_device_wifi_get_access_point_by_path (NMDeviceWifi *device,const char *path); const GPtrArray * nm_device_wifi_get_access_points (NMDeviceWifi *device); gboolean nm_device_wifi_request_scan (NMDeviceWifi *device,GCancellable *cancellable,GError **error); void nm_device_wifi_request_scan_async (NMDeviceWifi *device,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean nm_device_wifi_request_scan_finish (NMDeviceWifi *device,GAsyncResult *result,GError **error);
"access-points" GPtrArray* : Read "active-access-point" NMAccessPoint* : Read "bitrate" guint : Read "hw-address" gchar* : Read "mode" NM80211Mode : Read "perm-hw-address" gchar* : Read "wireless-capabilities" NMDeviceWifiCapabilities : Read
typedef struct {
NMDeviceClass parent;
/* Signals */
void (*access_point_added) (NMDeviceWifi *device, NMAccessPoint *ap);
void (*access_point_removed) (NMDeviceWifi *device, NMAccessPoint *ap);
} NMDeviceWifiClass;
const char * nm_device_wifi_get_hw_address (NMDeviceWifi *device);
Gets the actual hardware (MAC) address of the NMDeviceWifi
|
a NMDeviceWifi |
Returns : |
the actual hardware address. This is the internal string used by the device, and must not be modified. |
const char * nm_device_wifi_get_permanent_hw_address
(NMDeviceWifi *device);
Gets the permanent hardware (MAC) address of the NMDeviceWifi
|
a NMDeviceWifi |
Returns : |
the permanent hardware address. This is the internal string used by the device, and must not be modified. |
NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *device);
Gets the NMDeviceWifi mode.
|
a NMDeviceWifi |
Returns : |
the mode |
guint32 nm_device_wifi_get_bitrate (NMDeviceWifi *device);
Gets the bit rate of the NMDeviceWifi in kbit/s.
|
a NMDeviceWifi |
Returns : |
the bit rate (kbit/s) |
NMDeviceWifiCapabilities nm_device_wifi_get_capabilities
(NMDeviceWifi *device);
Gets the Wi-Fi capabilities of the NMDeviceWifi.
|
a NMDeviceWifi |
Returns : |
the capabilities |
NMAccessPoint * nm_device_wifi_get_active_access_point
(NMDeviceWifi *device);
Gets the active NMAccessPoint.
|
a NMDeviceWifi |
Returns : |
the access point or NULL if none is active. [transfer none]
|
NMAccessPoint * nm_device_wifi_get_access_point_by_path (NMDeviceWifi *device,const char *path);
Gets a NMAccessPoint by path.
|
a NMDeviceWifi |
|
the object path of the access point |
Returns : |
the access point or NULL if none is found. [transfer none]
|
const GPtrArray * nm_device_wifi_get_access_points (NMDeviceWifi *device);
Gets all the scanned access points of the NMDeviceWifi.
|
a NMDeviceWifi |
Returns : |
a GPtrArray containing all the scanned NMAccessPoints. The returned array is owned by the client and should not be modified. [element-type NMAccessPoint] |
gboolean nm_device_wifi_request_scan (NMDeviceWifi *device,GCancellable *cancellable,GError **error);
Request NM to scan for access points on device. Note that the function
returns immediately after requesting the scan, and it may take some time
after that for the scan to complete.
|
a NMDeviceWifi |
|
a GCancellable, or NULL
|
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be
set. |
void nm_device_wifi_request_scan_async (NMDeviceWifi *device,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Request NM to scan for access points on device. Note that callback will be
called immediately after requesting the scan, and it may take some time after
that for the scan to complete.
|
a NMDeviceWifi |
|
a GCancellable, or NULL
|
|
callback to be called when the scan has been requested |
|
caller-specific data passed to callback
|
gboolean nm_device_wifi_request_scan_finish (NMDeviceWifi *device,GAsyncResult *result,GError **error);
Gets the result of a call to nm_device_wifi_request_scan_async().
|
a NMDeviceWifi |
|
the result passed to the GAsyncReadyCallback |
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be
set. |
"access-points" property"access-points" GPtrArray* : Read
List of all Wi-Fi access points the device can see.
Element-type: NMAccessPoint
"active-access-point" property"active-access-point" NMAccessPoint* : Read
The active NMAccessPoint of the device.
"bitrate" property"bitrate" guint : Read
The bit rate of the device in kbit/s.
Default value: 0
"hw-address" property"hw-address" gchar* : Read
The hardware (MAC) address of the device.
Default value: NULL
"mode" property"mode" NM80211Mode : Read
The mode of the device.
Default value: NM_802_11_MODE_UNKNOWN
"perm-hw-address" property"perm-hw-address" gchar* : Read
The hardware (MAC) address of the device.
Default value: NULL
"wireless-capabilities" property"wireless-capabilities" NMDeviceWifiCapabilities : Read
The wireless capabilities of the device.
"access-point-added" signalvoid user_function (NMDeviceWifi *device,
GObject *ap,
gpointer user_data) : Run First
Notifies that a NMAccessPoint is added to the Wi-Fi device.
|
the Wi-Fi device that received the signal |
|
the new access point |
|
user data set when the signal handler was connected. |
"access-point-removed" signalvoid user_function (NMDeviceWifi *device,
GObject *ap,
gpointer user_data) : Run First
Notifies that a NMAccessPoint is removed from the Wi-Fi device.
|
the Wi-Fi device that received the signal |
|
the removed access point |
|
user data set when the signal handler was connected. |