diff frontends/src/bridge/DBus.py @ 1482:80cd55dd5b04

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.
author Goffi <goffi@goffi.org>
date Fri, 21 Aug 2015 17:08:26 +0200
parents 069ad98b360d
children 7d7e57a84792
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py	Thu Aug 20 18:44:39 2015 +0200
+++ b/frontends/src/bridge/DBus.py	Fri Aug 21 17:08:26 2015 +0200
@@ -293,6 +293,15 @@
             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