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:
parent
621221c16e
commit
0bf9461416
1 changed files with 74 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue