diff src/bridge/DBus.py @ 759:93bd868b8fb6

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
author Goffi <goffi@goffi.org>
date Tue, 24 Dec 2013 15:19:08 +0100
parents e3ad48a2aab2
children eac23b1aad90
line wrap: on
line diff
--- a/src/bridge/DBus.py	Tue Dec 24 15:19:08 2013 +0100
+++ b/src/bridge/DBus.py	Tue Dec 24 15:19:08 2013 +0100
@@ -378,10 +378,10 @@
         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',