Mercurial > libervia-backend
comparison frontends/src/bridge/DBus.py @ 1314:bb9c32249778 frontends_multi_profiles
core: added getEntitiesData which get cache data for several entities at once
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 09 Feb 2015 21:39:51 +0100 |
parents | faa1129559b8 |
children | 069ad98b360d |
comparison
equal
deleted
inserted
replaced
1313:a8d7500090f6 | 1314:bb9c32249778 |
---|---|
263 kwargs['timeout'] = const_TIMEOUT | 263 kwargs['timeout'] = const_TIMEOUT |
264 kwargs['reply_handler'] = callback | 264 kwargs['reply_handler'] = callback |
265 kwargs['error_handler'] = error_handler | 265 kwargs['error_handler'] = error_handler |
266 return self.db_core_iface.getContactsFromGroup(group, profile_key, **kwargs) | 266 return self.db_core_iface.getContactsFromGroup(group, profile_key, **kwargs) |
267 | 267 |
268 def getEntitiesData(self, jids, keys, profile, callback=None, errback=None): | |
269 if callback is None: | |
270 error_handler = None | |
271 else: | |
272 if errback is None: | |
273 errback = log.error | |
274 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | |
275 kwargs={} | |
276 if callback is not None: | |
277 kwargs['timeout'] = const_TIMEOUT | |
278 kwargs['reply_handler'] = callback | |
279 kwargs['error_handler'] = error_handler | |
280 return self.db_core_iface.getEntitiesData(jids, keys, profile, **kwargs) | |
281 | |
268 def getEntityData(self, jid, keys, profile, callback=None, errback=None): | 282 def getEntityData(self, jid, keys, profile, callback=None, errback=None): |
269 if callback is None: | 283 if callback is None: |
270 error_handler = None | 284 error_handler = None |
271 else: | 285 else: |
272 if errback is None: | 286 if errback is None: |