wifi: expose the LastScan property

This is the time when the last Wi-Fi scan finished. It will help clients
decide whether the AP list is fresh enough.
This commit is contained in:
Lubomir Rintel
2018-02-25 14:53:44 +01:00
parent c2932dd7db
commit c00e17578f
10 changed files with 90 additions and 0 deletions

View File

@@ -908,6 +908,7 @@ PRP_WIFI_BITRATE = "Bitrate"
PRP_WIFI_ACCESS_POINTS = "AccessPoints"
PRP_WIFI_ACTIVE_ACCESS_POINT = "ActiveAccessPoint"
PRP_WIFI_WIRELESS_CAPABILITIES = "WirelessCapabilities"
PRP_WIFI_LAST_SCAN = "LastScan"
class WifiDevice(Device):
def __init__(self, iface, mac = None, ident = None):
@@ -926,6 +927,7 @@ class WifiDevice(Device):
PRP_WIFI_WIRELESS_CAPABILITIES: dbus.UInt32(0xFF),
PRP_WIFI_ACCESS_POINTS: ExportedObj.to_path_array(self.aps),
PRP_WIFI_ACTIVE_ACCESS_POINT: ExportedObj.to_path(None),
PRP_WIFI_LAST_SCAN: dbus.Int32(0x70000000),
}
self.dbus_interface_add(IFACE_WIFI, props, WifiDevice.PropertiesChanged)