core, bridge: added getFeatures method:

this async method indicate which plugins are activated, and add an additional data dictionary with plugin specific data.
    The result can be general (if profile==C.PROF_KEY_NONE) or specific to profile.
This commit is contained in:
Goffi 2015-08-21 17:08:26 +02:00
commit 0bf9461416

View file

@ -293,6 +293,15 @@ class DBusBridgeFrontend(BridgeFrontend):
kwargs['error_handler'] = error_handler
return self.db_core_iface.getEntityData(jid, keys, profile, **kwargs)
def getFeatures(self, profile_key, 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.getFeatures(profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler)
def getHistory(self, from_jid, to_jid, limit, between=True, search='', profile="@NONE@", callback=None, errback=None):
if callback is None:
error_handler = None