Mercurial > libervia-backend
diff frontends/src/bridge/dbus_bridge.py @ 2534:7da86e1633a5
core: new discoFindFeatures method which return all server services/roster entities implementing a set of features.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Mar 2018 10:46:09 +0100 |
parents | 0046283a285d |
children | 27539029a662 |
line wrap: on
line diff
--- a/frontends/src/bridge/dbus_bridge.py Sat Mar 24 10:44:37 2018 +0100 +++ b/frontends/src/bridge/dbus_bridge.py Sat Mar 24 10:46:09 2018 +0100 @@ -209,6 +209,15 @@ error_handler = lambda err:errback(dbus_to_bridge_exception(err)) return self.db_core_iface.delContact(entity_jid, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) + def discoFindByFeatures(self, namespaces, service=True, roster=True, own_jid=True, profile_key=u"@DEFAULT@", callback=None, errback=None): + if callback is None: + error_handler = None + else: + if errback is None: + errback = log.error + error_handler = lambda err:errback(dbus_to_bridge_exception(err)) + return self.db_core_iface.discoFindByFeatures(namespaces, service, roster, own_jid, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) + def discoInfos(self, entity_jid, node=u'', use_cache=True, profile_key=u"@DEFAULT@", callback=None, errback=None): if callback is None: error_handler = None