Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
1481:621b045cd284 | 1482:80cd55dd5b04 |
---|---|
291 kwargs['timeout'] = const_TIMEOUT | 291 kwargs['timeout'] = const_TIMEOUT |
292 kwargs['reply_handler'] = callback | 292 kwargs['reply_handler'] = callback |
293 kwargs['error_handler'] = error_handler | 293 kwargs['error_handler'] = error_handler |
294 return self.db_core_iface.getEntityData(jid, keys, profile, **kwargs) | 294 return self.db_core_iface.getEntityData(jid, keys, profile, **kwargs) |
295 | 295 |
296 def getFeatures(self, profile_key, callback=None, errback=None): | |
297 if callback is None: | |
298 error_handler = None | |
299 else: | |
300 if errback is None: | |
301 errback = log.error | |
302 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | |
303 return self.db_core_iface.getFeatures(profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) | |
304 | |
296 def getHistory(self, from_jid, to_jid, limit, between=True, search='', profile="@NONE@", callback=None, errback=None): | 305 def getHistory(self, from_jid, to_jid, limit, between=True, search='', profile="@NONE@", callback=None, errback=None): |
297 if callback is None: | 306 if callback is None: |
298 error_handler = None | 307 error_handler = None |
299 else: | 308 else: |
300 if errback is None: | 309 if errback is None: |