Mercurial > libervia-backend
comparison frontends/src/bridge/dbus_bridge.py @ 2342:f047d5410040
core (memory/disco): added use_cache parameter to discoInfos/discoItems (set to False to ignore cache)
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 22 Aug 2017 22:12:57 +0200 |
parents | 255830fdb80b |
children | 8b37a62336c3 |
comparison
equal
deleted
inserted
replaced
2341:f9580b4a105a | 2342:f047d5410040 |
---|---|
207 if errback is None: | 207 if errback is None: |
208 errback = log.error | 208 errback = log.error |
209 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | 209 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) |
210 return self.db_core_iface.delContact(entity_jid, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) | 210 return self.db_core_iface.delContact(entity_jid, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) |
211 | 211 |
212 def discoInfos(self, entity_jid, node=u'', profile_key=u"@DEFAULT@", callback=None, errback=None): | 212 def discoInfos(self, entity_jid, node=u'', use_cache=True, profile_key=u"@DEFAULT@", callback=None, errback=None): |
213 if callback is None: | 213 if callback is None: |
214 error_handler = None | 214 error_handler = None |
215 else: | 215 else: |
216 if errback is None: | 216 if errback is None: |
217 errback = log.error | 217 errback = log.error |
218 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | 218 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) |
219 return self.db_core_iface.discoInfos(entity_jid, node, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) | 219 return self.db_core_iface.discoInfos(entity_jid, node, use_cache, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) |
220 | 220 |
221 def discoItems(self, entity_jid, node=u'', profile_key=u"@DEFAULT@", callback=None, errback=None): | 221 def discoItems(self, entity_jid, node=u'', use_cache=True, profile_key=u"@DEFAULT@", callback=None, errback=None): |
222 if callback is None: | 222 if callback is None: |
223 error_handler = None | 223 error_handler = None |
224 else: | 224 else: |
225 if errback is None: | 225 if errback is None: |
226 errback = log.error | 226 errback = log.error |
227 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | 227 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) |
228 return self.db_core_iface.discoItems(entity_jid, node, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) | 228 return self.db_core_iface.discoItems(entity_jid, node, use_cache, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) |
229 | 229 |
230 def disconnect(self, profile_key="@DEFAULT@", callback=None, errback=None): | 230 def disconnect(self, profile_key="@DEFAULT@", callback=None, errback=None): |
231 if callback is None: | 231 if callback is None: |
232 error_handler = None | 232 error_handler = None |
233 else: | 233 else: |