mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:12:48 +01:00
auto-t: add connect API for the hidden networks
In addition, add dbus exception for the service set overlap
This commit is contained in:
parent
395a70d652
commit
e9fef6ba52
@ -52,6 +52,7 @@ class NoAgentEx(dbus.DBusException): pass
|
||||
class NotConnectedEx(dbus.DBusException): pass
|
||||
class NotConfiguredEx(dbus.DBusException): pass
|
||||
class NotImplementedEx(dbus.DBusException): pass
|
||||
class ServiceSetOverlapEx(dbus.DBusException): pass
|
||||
class CanceledEx(dbus.DBusException):
|
||||
_dbus_error_name = 'net.connman.iwd.Error.Canceled'
|
||||
|
||||
@ -70,6 +71,7 @@ _dbus_ex_to_py = {
|
||||
'NotConnected' : NotConnectedEx,
|
||||
'NotConfigured' : NotConfiguredEx,
|
||||
'NotImplemented' : NotImplementedEx,
|
||||
'ServiceSetOverlap' : ServiceSetOverlapEx,
|
||||
}
|
||||
|
||||
|
||||
@ -366,6 +368,22 @@ class Device(IWDDBusAbstract):
|
||||
error_handler=self._failure)
|
||||
self._wait_for_async_op()
|
||||
|
||||
def connect_hidden_network(self, name):
|
||||
'''Connect to a hidden network
|
||||
Possible exception: BusyEx
|
||||
FailedEx
|
||||
InvalidArgsEx
|
||||
NotConfiguredEx
|
||||
NotConnectedEx
|
||||
NotFoundEx
|
||||
ServiceSetOverlapEx
|
||||
'''
|
||||
self._iface.ConnectHiddenNetwork(name, dbus_interface=self._iface_name,
|
||||
reply_handler=self._success,
|
||||
error_handler=self._failure)
|
||||
|
||||
self._wait_for_async_op()
|
||||
|
||||
def __str__(self, prefix = ''):
|
||||
return prefix + 'Device: ' + self.device_path + '\n'\
|
||||
+ prefix + '\tName:\t\t' + self.name + '\n'\
|
||||
|
Loading…
Reference in New Issue
Block a user