comparison 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
comparison
equal deleted inserted replaced
758:86224a13cc1d 759:93bd868b8fb6
376 async_callbacks=None) 376 async_callbacks=None)
377 def isConnected(self, profile_key="@DEFAULT@"): 377 def isConnected(self, profile_key="@DEFAULT@"):
378 return self._callback("isConnected", unicode(profile_key)) 378 return self._callback("isConnected", unicode(profile_key))
379 379
380 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 380 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
381 in_signature='sa{ss}s', out_signature='s', 381 in_signature='sa{ss}s', out_signature='a{ss}',
382 async_callbacks=None) 382 async_callbacks=('callback', 'errback'))
383 def launchAction(self, action_type, data, profile_key="@DEFAULT@"): 383 def launchAction(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None):
384 return self._callback("launchAction", unicode(action_type), data, unicode(profile_key)) 384 return self._callback("launchAction", unicode(callback_id), data, unicode(profile_key), callback=callback, errback=errback)
385 385
386 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 386 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
387 in_signature='ssssi', out_signature='s', 387 in_signature='ssssi', out_signature='s',
388 async_callbacks=None) 388 async_callbacks=None)
389 def registerNewAccount(self, login, password, email, host, port=5222): 389 def registerNewAccount(self, login, password, email, host, port=5222):