NM.DeviceWifi¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r |
|||
r |
|||
r |
|||
|
r |
||
r |
|||
r |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Notifies that a |
|
Notifies that a |
Fields¶
- Inherited:
Class Details¶
- class NM.DeviceWifi(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- get_access_point_by_path(path)¶
- Parameters:
path (
str
) – the object path of the access point- Returns:
the access point or
None
if none is found.- Return type:
Gets a
NM.AccessPoint
by path.
- get_access_points()¶
- Returns:
a
GLib.PtrArray
containing all the scannedNM.AccessPoints
. The returned array is owned by the client and should not be modified.- Return type:
Gets all the scanned access points of the
NM.DeviceWifi
.
- get_active_access_point()¶
- Returns:
the access point or
None
if none is active- Return type:
Gets the active
NM.AccessPoint
.
- get_bitrate()¶
- Returns:
the bit rate (kbit/s)
- Return type:
Gets the bit rate of the
NM.DeviceWifi
in kbit/s.
- get_capabilities()¶
- Returns:
the capabilities
- Return type:
Gets the Wi-Fi capabilities of the
NM.DeviceWifi
.
- get_last_scan()¶
- Returns:
the last scan time in milliseconds (in clock_gettime(CLOCK_BOOTTIME) scale).
- Return type:
Returns the timestamp (in CLOCK_BOOTTIME milliseconds) for the last finished network scan. A value of -1 means the device never scanned for access points.
Use
NM.utils_get_timestamp_msec
() to obtain current time value suitable for comparing to this value.New in version 1.12.
- get_mode()¶
- Returns:
the mode
- Return type:
NM.80211Mode
Gets the
NM.DeviceWifi
mode.
- get_permanent_hw_address()¶
- Returns:
the permanent hardware address. This is the internal string used by the device, and must not be modified.
- Return type:
Gets the permanent hardware (MAC) address of the
NM.DeviceWifi
- request_scan(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
True
on success,False
on error, in which case error will be set.- Return type:
Request NM to scan for access points on self. Note that the function returns immediately after requesting the scan, and it may take some time after that for the scan to complete.
Deprecated since version 1.22: Use
NM.DeviceWifi.request_scan_async
() orGio.DBusConnection
.
- request_scan_async(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to be called when the scan has been requesteduser_data (
object
orNone
) – caller-specific data passed to callback
Request NM to scan for access points on self. Note that callback will be called immediately after requesting the scan, and it may take some time after that for the scan to complete.
- request_scan_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – the result passed to theGio.AsyncReadyCallback
- Raises:
- Returns:
True
on success,False
on error, in which case error will be set.- Return type:
Gets the result of a call to
NM.DeviceWifi.request_scan_async
() andNM.DeviceWifi.request_scan_options_async
().
- request_scan_options(options, cancellable)¶
- Parameters:
options (
GLib.Variant
) – dictionary with options for RequestScan(), orNone
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
True
on success,False
on error, in which case error will be set.- Return type:
Request NM to scan for access points on self. Note that the function returns immediately after requesting the scan, and it may take some time after that for the scan to complete. This is the same as nm_device_wifi_request_scan except it accepts options for the scanning. The argument is the dictionary passed to RequestScan() D-Bus call. Valid options inside the dictionary are: ‘ssids’ => array of SSIDs (saay)
New in version 1.2.
Deprecated since version 1.22: Use
NM.DeviceWifi.request_scan_options_async
() orGio.DBusConnection
.
- request_scan_options_async(options, cancellable, callback, *user_data)¶
- Parameters:
options (
GLib.Variant
) – dictionary with options for RequestScan(), orNone
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to be called when the scan has been requesteduser_data (
object
orNone
) – caller-specific data passed to callback
Request NM to scan for access points on self. Note that callback will be called immediately after requesting the scan, and it may take some time after that for the scan to complete. This is the same as nm_device_wifi_request_scan_async except it accepts options for the scanning. The argument is the dictionary passed to RequestScan() D-Bus call. Valid options inside the dictionary are: ‘ssids’ => array of SSIDs (saay)
To complete the request call
NM.DeviceWifi.request_scan_finish
().New in version 1.2.
Signal Details¶
- NM.DeviceWifi.signals.access_point_added(device_wifi, ap)¶
- Signal Name:
access-point-added
- Flags:
- Parameters:
device_wifi (
NM.DeviceWifi
) – The object which received the signalap (
GObject.Object
) – the new access point
Notifies that a
NM.AccessPoint
is added to the Wi-Fi device.
- NM.DeviceWifi.signals.access_point_removed(device_wifi, ap)¶
- Signal Name:
access-point-removed
- Flags:
- Parameters:
device_wifi (
NM.DeviceWifi
) – The object which received the signalap (
GObject.Object
) – the removed access point
Notifies that a
NM.AccessPoint
is removed from the Wi-Fi device.
Property Details¶
- NM.DeviceWifi.props.access_points¶
- Name:
access-points
- Type:
- Default Value:
- Flags:
List of all Wi-Fi access points the device can see.
- NM.DeviceWifi.props.active_access_point¶
- Name:
active-access-point
- Type:
- Default Value:
- Flags:
The active
NM.AccessPoint
of the device.
- NM.DeviceWifi.props.bitrate¶
-
The bit rate of the device in kbit/s.
- NM.DeviceWifi.props.last_scan¶
-
The timestamp (in CLOCK_BOOTTIME seconds) for the last finished network scan. A value of -1 means the device never scanned for access points.
New in version 1.12.
- NM.DeviceWifi.props.mode¶
- Name:
mode
- Type:
NM.80211Mode
- Default Value:
NM.80211Mode.UNKNOWN
- Flags:
The mode of the device.
- NM.DeviceWifi.props.perm_hw_address¶
-
The hardware (MAC) address of the device.
- NM.DeviceWifi.props.wireless_capabilities¶
- Name:
wireless-capabilities
- Type:
- Default Value:
- Flags:
The wireless capabilities of the device.