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
|
|
@ -378,10 +378,10 @@ class DbusObject(dbus.service.Object):
|
|||
return self._callback("isConnected", unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='sa{ss}s', out_signature='s',
|
||||
async_callbacks=None)
|
||||
def launchAction(self, action_type, data, profile_key="@DEFAULT@"):
|
||||
return self._callback("launchAction", unicode(action_type), data, unicode(profile_key))
|
||||
in_signature='sa{ss}s', out_signature='a{ss}',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def launchAction(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("launchAction", unicode(callback_id), data, unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ssssi', out_signature='s',
|
||||
|
|
|
|||
Loading…
Reference in a new issue