backend, frontends: callbacks refactoring:
- launchAction is now async, and return a dictionary for its result
- no more action_id, actionResult* are deprecated
- callback system is about to be unified
This commit is contained in:
parent
aa8ca0772c
commit
069a250b04
1 changed files with 151 additions and 78 deletions
|
|
@ -190,8 +190,8 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
def isConnected(self, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.isConnected(profile_key)
|
||||
|
||||
def launchAction(self, action_type, data, profile_key="@DEFAULT@"):
|
||||
return unicode(self.db_core_iface.launchAction(action_type, data, profile_key))
|
||||
def launchAction(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self.db_core_iface.launchAction(callback_id, data, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
|
||||
|
||||
def registerNewAccount(self, login, password, email, host, port=5222):
|
||||
return unicode(self.db_core_iface.registerNewAccount(login, password, email, host, port))
|
||||
|
|
|
|||
Loading…
Reference in a new issue