mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-08 21:54:05 +01:00
auto-t: Convert RSSI agent test to the new API
This commit is contained in:
parent
df448dde6f
commit
0912a6afb8
@ -33,6 +33,7 @@ IWD_WSC_INTERFACE = 'net.connman.iwd.WiFiSimpleConfiguration'
|
|||||||
IWD_SIGNAL_AGENT_INTERFACE = 'net.connman.iwd.SignalLevelAgent'
|
IWD_SIGNAL_AGENT_INTERFACE = 'net.connman.iwd.SignalLevelAgent'
|
||||||
IWD_AP_INTERFACE = 'net.connman.iwd.AccessPoint'
|
IWD_AP_INTERFACE = 'net.connman.iwd.AccessPoint'
|
||||||
IWD_ADHOC_INTERFACE = 'net.connman.iwd.AdHoc'
|
IWD_ADHOC_INTERFACE = 'net.connman.iwd.AdHoc'
|
||||||
|
IWD_STATION_INTERFACE = 'net.connman.iwd.Station'
|
||||||
|
|
||||||
IWD_AGENT_MANAGER_PATH = '/'
|
IWD_AGENT_MANAGER_PATH = '/'
|
||||||
IWD_TOP_LEVEL_PATH = '/'
|
IWD_TOP_LEVEL_PATH = '/'
|
||||||
@ -213,6 +214,7 @@ class Device(IWDDBusAbstract):
|
|||||||
'''
|
'''
|
||||||
_iface_name = IWD_DEVICE_INTERFACE
|
_iface_name = IWD_DEVICE_INTERFACE
|
||||||
_wps_manager_if = None
|
_wps_manager_if = None
|
||||||
|
_station_if = None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _wps_manager(self):
|
def _wps_manager(self):
|
||||||
@ -223,6 +225,14 @@ class Device(IWDDBusAbstract):
|
|||||||
IWD_WSC_INTERFACE)
|
IWD_WSC_INTERFACE)
|
||||||
return _wps_manager_if
|
return _wps_manager_if
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _station(self):
|
||||||
|
if self._station_if is None:
|
||||||
|
_station_if = dbus.Interface(self._bus.get_object(IWD_SERVICE,
|
||||||
|
self.device_path),
|
||||||
|
IWD_STATION_INTERFACE)
|
||||||
|
return _station_if
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_path(self):
|
def device_path(self):
|
||||||
'''
|
'''
|
||||||
@ -347,18 +357,18 @@ class Device(IWDDBusAbstract):
|
|||||||
self._wait_for_async_op()
|
self._wait_for_async_op()
|
||||||
|
|
||||||
def register_signal_agent(self, signal_agent, levels):
|
def register_signal_agent(self, signal_agent, levels):
|
||||||
self._iface.RegisterSignalLevelAgent(signal_agent.path,
|
self._station.RegisterSignalLevelAgent(signal_agent.path,
|
||||||
dbus.Array(levels, 'n'),
|
dbus.Array(levels, 'n'),
|
||||||
dbus_interface=self._iface_name,
|
dbus_interface=IWD_STATION_INTERFACE,
|
||||||
reply_handler=self._success,
|
reply_handler=self._success,
|
||||||
error_handler=self._failure)
|
error_handler=self._failure)
|
||||||
self._wait_for_async_op()
|
self._wait_for_async_op()
|
||||||
|
|
||||||
def unregister_signal_agent(self, signal_agent):
|
def unregister_signal_agent(self, signal_agent):
|
||||||
self._iface.UnregisterSignalLevelAgent(signal_agent.path,
|
self._station.UnregisterSignalLevelAgent(signal_agent.path,
|
||||||
dbus_interface=self._iface_name,
|
dbus_interface=IWD_STATION_INTERFACE,
|
||||||
reply_handler=self._success,
|
reply_handler=self._success,
|
||||||
error_handler=self._failure)
|
error_handler=self._failure)
|
||||||
self._wait_for_async_op()
|
self._wait_for_async_op()
|
||||||
|
|
||||||
def start_ap(self, ssid, psk):
|
def start_ap(self, ssid, psk):
|
||||||
|
Loading…
Reference in New Issue
Block a user