comparison frontends/src/bridge/dbus_bridge.py @ 2150:91347fe95384

core(memory.disco), bridge: discoInfos and discoItems now handle node
author Goffi <goffi@goffi.org>
date Sun, 12 Feb 2017 21:17:56 +0100
parents 1bb9bf1b4150
children 4b78b4c7f805
comparison
equal deleted inserted replaced
2149:a0e6f7951bd7 2150:91347fe95384
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, profile_key, callback=None, errback=None): 212 def discoInfos(self, entity_jid, node=u'', 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, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) 219 return self.db_core_iface.discoInfos(entity_jid, node, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler)
220 220
221 def discoItems(self, entity_jid, profile_key, callback=None, errback=None): 221 def discoItems(self, entity_jid, node=u'', 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, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) 228 return self.db_core_iface.discoItems(entity_jid, node, 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: