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
This commit is contained in:
parent
49437fd9c3
commit
fa38394401
2 changed files with 570 additions and 400 deletions
|
|
@ -105,18 +105,18 @@ class DbusObject(dbus.service.Object):
|
|||
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 @@ class DbusObject(dbus.service.Object):
|
|||
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 @@ class DbusObject(dbus.service.Object):
|
|||
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 @@ class DbusObject(dbus.service.Object):
|
|||
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 @@ class DBusBridge(Bridge):
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -106,18 +106,19 @@ doc_param_1=%(doc_profile)s
|
|||
[askConfirmation]
|
||||
type=signal
|
||||
category=core
|
||||
sig_in=ssa{ss}
|
||||
sig_in=ssa{ss}s
|
||||
doc=A confirmation is needed for an action
|
||||
doc_param_0=conf_type: Type of the confirmation, can be:
|
||||
- YES/NO: A question which need a yes or no answer
|
||||
- FILE_TRANSFER: A confirmation is needed before transfering a file
|
||||
doc_param_1=id: Id of the confirmation query
|
||||
doc_param_2=data: conf_type dependent data
|
||||
doc_param_3=%(doc_profile)s
|
||||
|
||||
[actionResult]
|
||||
type=signal
|
||||
category=core
|
||||
sig_in=ssa{ss}
|
||||
sig_in=ssa{ss}s
|
||||
doc=Requested result of an action
|
||||
doc_param_0=answer_type: Type of the answer, can be:
|
||||
- SUPPRESS: The action is managed, the id MUST be removed from queue
|
||||
|
|
@ -126,16 +127,18 @@ doc_param_0=answer_type: Type of the answer, can be:
|
|||
- RESULT: General result, interpretation depend of the action
|
||||
doc_param_1=id: Id of the action
|
||||
doc_param_2=data: answer_type specific data
|
||||
doc_param_3=%(doc_profile)s
|
||||
|
||||
[actionResultExt]
|
||||
type=signal
|
||||
category=core
|
||||
sig_in=ssa{sa{ss}}
|
||||
sig_in=ssa{sa{ss}}s
|
||||
doc=Requested result of an action (Extended)
|
||||
doc_param_0=answer_type: Same as for [actionResult] but with the following additional one:
|
||||
- DICT_DICT: As RESULT, but returned as a dictionary of dictionary
|
||||
doc_param_1=id: Id of the action
|
||||
doc_param_2=data: answer_type specific data
|
||||
doc_param_3=%(doc_profile)s
|
||||
|
||||
[entityDataUpdated]
|
||||
type=signal
|
||||
|
|
@ -462,14 +465,16 @@ doc_return=list of categories
|
|||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=ssib
|
||||
sig_in=ssibs
|
||||
sig_out=a(dssss)
|
||||
param_3_default=True
|
||||
param_4_default="@NONE@"
|
||||
doc=Get history of a communication between two entities
|
||||
doc_param_0=from_jid: source JID (bare jid for catch all, full jid else)
|
||||
doc_param_1=to_jid: dest JID (bare jid for catch all, full jid else)
|
||||
doc_param_2=limit: max number of history elements to get (0 for the whole history)
|
||||
doc_param_3=between: True if we want history between the two jids (in both direction), False if we only want messages from from_jid to to_jid
|
||||
doc_param_4=%(doc_profile)s
|
||||
doc_return=Ordered list (by timestamp) of tuples (timestamp, full from_jid, full to_jid, message, type)
|
||||
|
||||
[addContact]
|
||||
|
|
@ -519,20 +524,22 @@ doc_param_2=%(doc_profile_key)s
|
|||
[confirmationAnswer]
|
||||
type=method
|
||||
category=core
|
||||
sig_in=sba{ss}
|
||||
sig_in=sba{ss}s
|
||||
sig_out=
|
||||
doc=Give answer to a confirmation request
|
||||
doc_param_0=id: id of the confirmation request
|
||||
doc_param_1=accepted: True if the action is confirmed
|
||||
doc_param_2=data: action specific data
|
||||
doc_param_3=%(doc_profile)s
|
||||
|
||||
[getProgress]
|
||||
type=method
|
||||
category=core
|
||||
sig_in=s
|
||||
sig_in=ss
|
||||
sig_out=a{ss}
|
||||
doc=Get progress information for an action
|
||||
doc_param_0=id: id of the progression status
|
||||
doc_param_1=%(doc_profile)s
|
||||
doc_return=dict with progress information:
|
||||
- position: current position
|
||||
- size: end position
|
||||
|
|
|
|||
Loading…
Reference in a new issue