core: added bare_jid and identities arguments to discoGetByFeatures:
- bare_jid indicate if we are looking for server implementation (True) of devices (False)
- identities is an optional filter, only entities with this identities set will be kept
This commit is contained in:
parent
afb4dcd6bb
commit
a9105242d0
2 changed files with 45 additions and 26 deletions
|
|
@ -738,18 +738,22 @@ doc_return=array of tuple (entity, node identifier, name)
|
|||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=asbbbs
|
||||
sig_in=asa(ss)bbbbs
|
||||
sig_out=(a{sa(sss)}a{sa(sss)}a{sa(sss)})
|
||||
param_1_default=True
|
||||
param_2_default=True
|
||||
param_2_default=False
|
||||
param_3_default=True
|
||||
param_4_default=u"@DEFAULT@"
|
||||
param_4_default=True
|
||||
param_5_default=True
|
||||
param_6_default=u"@DEFAULT@"
|
||||
doc=Discover items of an entity
|
||||
doc_param_0=namespaces: namespaces of the features to check
|
||||
doc_param_1=service: True to check server's services
|
||||
doc_param_2=roster: True to check connected devices from people in roster
|
||||
doc_param_3=own_jid: True to check profile's jid
|
||||
doc_param_4=%(doc_profile_key)s
|
||||
doc_param_1=identities: identities to filter
|
||||
doc_param_2=bare_jid: if True only retrieve bare jids
|
||||
if False, retrieve full jids of connected resources
|
||||
doc_param_3=service: True to check server's services
|
||||
doc_param_4=roster: True to check connected devices from people in roster
|
||||
doc_param_5=own_jid: True to check profile's jid
|
||||
doc_param_6=%(doc_profile_key)s
|
||||
doc_return=tuple of maps of found entities full jids to their identities. Maps are in this order:
|
||||
- services entities
|
||||
- own entities (i.e. entities linked to profile's jid)
|
||||
|
|
|
|||
|
|
@ -234,10 +234,10 @@ 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='asbbbs', out_signature='(a{sa(sss)}a{sa(sss)}a{sa(sss)})',
|
||||
in_signature='asa(ss)bbbbs', out_signature='(a{sa(sss)}a{sa(sss)}a{sa(sss)})',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def discoFindByFeatures(self, namespaces, service=True, roster=True, own_jid=True, profile_key=u"@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("discoFindByFeatures", namespaces, service, roster, own_jid, unicode(profile_key), callback=callback, errback=errback)
|
||||
def discoFindByFeatures(self, namespaces, identities, bare_jid=False, service=True, roster=True, own_jid=True, profile_key=u"@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("discoFindByFeatures", namespaces, identities, bare_jid, service, roster, own_jid, unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ssbs', out_signature='(asa(sss)a{sa(a{ss}as)})',
|
||||
|
|
|
|||
Loading…
Reference in a new issue