diff frontends/src/bridge/DBus.py @ 963:723f28cd15c7

core (disco): added discoInfos and discoItems bridge methods
author Goffi <goffi@goffi.org>
date Tue, 01 Apr 2014 21:14:57 +0200
parents 71926ec2114d
children 301b342c697a
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py	Mon Mar 31 20:19:34 2014 +0200
+++ b/frontends/src/bridge/DBus.py	Tue Apr 01 21:14:57 2014 +0200
@@ -119,6 +119,12 @@
     def delContact(self, entity_jid, profile_key="@DEFAULT@"):
         return self.db_core_iface.delContact(entity_jid, profile_key)
 
+    def discoInfos(self, entity_jid, profile_key, callback=None, errback=None):
+        return self.db_core_iface.discoInfos(entity_jid, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
+
+    def discoItems(self, entity_jid, profile_key, callback=None, errback=None):
+        return self.db_core_iface.discoItems(entity_jid, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
+
     def disconnect(self, profile_key="@DEFAULT@"):
         return self.db_core_iface.disconnect(profile_key)