core, bridge: waiting confirmation management (new getWaitingConf method)
This commit is contained in:
parent
5327fecca3
commit
75bb00a0d4
2 changed files with 37 additions and 9 deletions
|
|
@ -116,7 +116,7 @@ class DbusObject(dbus.service.Object):
|
|||
|
||||
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
signature='ssa{ss}s')
|
||||
def askConfirmation(self, conf_type, id, data, profile):
|
||||
def askConfirmation(self, id, conf_type, data, profile):
|
||||
pass
|
||||
|
||||
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
|
|
@ -351,6 +351,12 @@ class DbusObject(dbus.service.Object):
|
|||
def getVersion(self, ):
|
||||
return self._callback("getVersion", )
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='a(ssa{ss})',
|
||||
async_callbacks=None)
|
||||
def getWaitingConf(self, profile_key):
|
||||
return self._callback("getWaitingConf", unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='a{ss}',
|
||||
async_callbacks=None)
|
||||
|
|
@ -509,8 +515,8 @@ class DBusBridge(Bridge):
|
|||
def actionResultExt(self, answer_type, id, data, profile):
|
||||
self.dbus_bridge.actionResultExt(answer_type, id, data, profile)
|
||||
|
||||
def askConfirmation(self, conf_type, id, data, profile):
|
||||
self.dbus_bridge.askConfirmation(conf_type, id, data, profile)
|
||||
def askConfirmation(self, id, conf_type, data, profile):
|
||||
self.dbus_bridge.askConfirmation(id, conf_type, data, profile)
|
||||
|
||||
def connected(self, profile):
|
||||
self.dbus_bridge.connected(profile)
|
||||
|
|
|
|||
|
|
@ -108,10 +108,10 @@ type=signal
|
|||
category=core
|
||||
sig_in=ssa{ss}s
|
||||
doc=A confirmation is needed for an action
|
||||
doc_param_0=conf_type: Type of the confirmation, can be:
|
||||
doc_param_0=id: Id of the confirmation query
|
||||
doc_param_1=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
|
||||
|
||||
|
|
@ -331,6 +331,16 @@ doc=Get subscription requests in queue
|
|||
doc_param_0=%(doc_profile_key)s
|
||||
doc_return=Dict where contact JID is the key, and value is the subscription type
|
||||
|
||||
[getWaitingConf]
|
||||
type=method
|
||||
category=core
|
||||
sig_in=s
|
||||
sig_out=a(ssa{ss})
|
||||
doc=Get confirmations requests in queue
|
||||
doc_param_0=%(doc_profile_key)s
|
||||
doc_return=List of confirmation request data, same as for [askConfirmation]
|
||||
|
||||
|
||||
[sendMessage]
|
||||
type=method
|
||||
category=core
|
||||
|
|
|
|||
Loading…
Reference in a new issue