core, bridge, jp: management of service discovery extensions (XEP-0128)

This commit is contained in:
Goffi 2015-04-17 22:59:35 +02:00
commit 35108bc5ba
2 changed files with 69 additions and 22 deletions

View file

@ -235,7 +235,7 @@ class DbusObject(dbus.service.Object):
return self._callback("delContact", unicode(entity_jid), unicode(profile_key), callback=callback, errback=errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='ss', out_signature='(asa(sss))',
in_signature='ss', out_signature='(asa(sss)a{sa(a{ss}as)})',
async_callbacks=('callback', 'errback'))
def discoInfos(self, entity_jid, profile_key, callback=None, errback=None):
return self._callback("discoInfos", unicode(entity_jid), unicode(profile_key), callback=callback, errback=errback)

View file

@ -614,11 +614,20 @@ async=
type=method
category=core
sig_in=ss
sig_out=(asa(sss))
sig_out=(asa(sss)a{sa(a{ss}as)})
doc=Discover infos on an entity
doc_param_0=entity_jid: JID to discover
doc_param_1=%(doc_profile_key)s
doc_return=discovery data
doc_return=discovery data:
- list of features
- list of identities (category, type, name)
- dictionary of extensions (FORM_TYPE as key), with value of:
- list of field which are:
- dictionary key/value where key can be:
* var
* label
* type
- list of values
[discoItems]
async=