Mercurial > libervia-backend
diff src/bridge/DBus.py @ 538:2c4016921403
core, frontends, bridgen plugins: fixed methods which were unproperly managing multi-profiles
- added profile argument to askConfirmation, actionResult, actionResultExt, entityDataUpdated, confirmationAnswer, getProgress
- core, frontends: fixed calls/signals according to new bridge API
- user of proper profile namespace for progression indicators and dialogs
- memory: getParam* now return bool when param type is bool
- memory: added getStringParam* to return string instead of typed value
- core, memory, storage, quick_frontend: getHistory now manage properly multi-profiles
- plugins XEP-0047, XEP-0054, XEP-0065, XEP-0077, XEP-0096; multi-profiles proper handling
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 10 Nov 2012 16:38:16 +0100 |
parents | 8ee9113d307b |
children | 8b116fa42a31 |
line wrap: on
line diff
--- a/src/bridge/DBus.py Sun Nov 04 23:53:26 2012 +0100 +++ b/src/bridge/DBus.py Sat Nov 10 16:38:16 2012 +0100 @@ -105,18 +105,18 @@ pass @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, - signature='ssa{ss}') - def actionResult(self, answer_type, id, data): + signature='ssa{ss}s') + def actionResult(self, answer_type, id, data, profile): pass @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, - signature='ssa{sa{ss}}') - def actionResultExt(self, answer_type, id, data): + signature='ssa{sa{ss}}s') + def actionResultExt(self, answer_type, id, data, profile): pass @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, - signature='ssa{ss}') - def askConfirmation(self, conf_type, id, data): + signature='ssa{ss}s') + def askConfirmation(self, conf_type, id, data, profile): pass @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, @@ -208,10 +208,10 @@ return self._callback("callMenu", unicode(category), unicode(name), unicode(menu_type), unicode(profile_key)) @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, - in_signature='sba{ss}', out_signature='', + in_signature='sba{ss}s', out_signature='', async_callbacks=None) - def confirmationAnswer(self, id, accepted, data): - return self._callback("confirmationAnswer", unicode(id), accepted, data) + def confirmationAnswer(self, id, accepted, data, profile): + return self._callback("confirmationAnswer", unicode(id), accepted, data, unicode(profile)) @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, in_signature='s', out_signature='', @@ -268,10 +268,10 @@ return self._callback("getEntityData", unicode(jid), keys, unicode(profile)) @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, - in_signature='ssib', out_signature='a(dssss)', + in_signature='ssibs', out_signature='a(dssss)', async_callbacks=('callback', 'errback')) - def getHistory(self, from_jid, to_jid, limit, between=True, callback=None, errback=None): - return self._callback("getHistory", unicode(from_jid), unicode(to_jid), limit, between, callback=callback, errback=errback) + def getHistory(self, from_jid, to_jid, limit, between=True, profile="@NONE@", callback=None, errback=None): + return self._callback("getHistory", unicode(from_jid), unicode(to_jid), limit, between, unicode(profile), callback=callback, errback=errback) @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, in_signature='ss', out_signature='s', @@ -340,10 +340,10 @@ return self._callback("getProfilesList", ) @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, - in_signature='s', out_signature='a{ss}', + in_signature='ss', out_signature='a{ss}', async_callbacks=None) - def getProgress(self, id): - return self._callback("getProgress", unicode(id)) + def getProgress(self, id, profile): + return self._callback("getProgress", unicode(id), unicode(profile)) @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, in_signature='', out_signature='s', @@ -503,14 +503,14 @@ self.dbus_name = dbus.service.BusName(const_INT_PREFIX, self.session_bus) self.dbus_bridge = DbusObject(self.session_bus, const_OBJ_PATH) - def actionResult(self, answer_type, id, data): - self.dbus_bridge.actionResult(answer_type, id, data) + def actionResult(self, answer_type, id, data, profile): + self.dbus_bridge.actionResult(answer_type, id, data, profile) - def actionResultExt(self, answer_type, id, data): - self.dbus_bridge.actionResultExt(answer_type, id, data) + def actionResultExt(self, answer_type, id, data, profile): + self.dbus_bridge.actionResultExt(answer_type, id, data, profile) - def askConfirmation(self, conf_type, id, data): - self.dbus_bridge.askConfirmation(conf_type, id, data) + def askConfirmation(self, conf_type, id, data, profile): + self.dbus_bridge.askConfirmation(conf_type, id, data, profile) def connected(self, profile): self.dbus_bridge.connected(profile)