diff src/bridge/DBus.py @ 1367:f71a0fc26886

merged branch frontends_multi_profiles
author Goffi <goffi@goffi.org>
date Wed, 18 Mar 2015 10:52:28 +0100
parents ba87b940f07a
children 069ad98b360d
line wrap: on
line diff
--- a/src/bridge/DBus.py	Thu Feb 05 11:59:26 2015 +0100
+++ b/src/bridge/DBus.py	Wed Mar 18 10:52:28 2015 +0100
@@ -230,9 +230,9 @@
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ss', out_signature='',
-                         async_callbacks=None)
-    def delContact(self, entity_jid, profile_key="@DEFAULT@"):
-        return self._callback("delContact", unicode(entity_jid), unicode(profile_key))
+                         async_callbacks=('callback', 'errback'))
+    def delContact(self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None):
+        return self._callback("delContact", unicode(entity_jid), unicode(profile_key), callback=callback, errback=errback)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ss', out_signature='(asa(sss))',
@@ -260,9 +260,9 @@
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='s', out_signature='a(sa{ss}as)',
-                         async_callbacks=None)
-    def getContacts(self, profile_key="@DEFAULT@"):
-        return self._callback("getContacts", unicode(profile_key))
+                         async_callbacks=('callback', 'errback'))
+    def getContacts(self, profile_key="@DEFAULT@", callback=None, errback=None):
+        return self._callback("getContacts", unicode(profile_key), callback=callback, errback=errback)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ss', out_signature='as',
@@ -271,6 +271,12 @@
         return self._callback("getContactsFromGroup", unicode(group), unicode(profile_key))
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
+                         in_signature='asass', out_signature='a{sa{ss}}',
+                         async_callbacks=None)
+    def getEntitiesData(self, jids, keys, profile):
+        return self._callback("getEntitiesData", jids, keys, unicode(profile))
+
+    @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='sass', out_signature='a{ss}',
                          async_callbacks=None)
     def getEntityData(self, jid, keys, profile):
@@ -285,8 +291,8 @@
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ss', out_signature='s',
                          async_callbacks=None)
-    def getLastResource(self, contact_jid, profile_key="@DEFAULT@"):
-        return self._callback("getLastResource", unicode(contact_jid), unicode(profile_key))
+    def getMainResource(self, contact_jid, profile_key="@DEFAULT@"):
+        return self._callback("getMainResource", unicode(contact_jid), unicode(profile_key))
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ss', out_signature='s',
@@ -295,7 +301,7 @@
         return self._callback("getMenuHelp", unicode(menu_id), unicode(language))
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
-                         in_signature='si', out_signature='a(ssasas)',
+                         in_signature='si', out_signature='a(ssasasa{ss})',
                          async_callbacks=None)
     def getMenus(self, language, security_limit):
         return self._callback("getMenus", unicode(language), security_limit)
@@ -434,9 +440,9 @@
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ssass', out_signature='',
-                         async_callbacks=None)
-    def updateContact(self, entity_jid, name, groups, profile_key="@DEFAULT@"):
-        return self._callback("updateContact", unicode(entity_jid), unicode(name), groups, unicode(profile_key))
+                         async_callbacks=('callback', 'errback'))
+    def updateContact(self, entity_jid, name, groups, profile_key="@DEFAULT@", callback=None, errback=None):
+        return self._callback("updateContact", unicode(entity_jid), unicode(name), groups, unicode(profile_key), callback=callback, errback=errback)
 
     def __attributes(self, in_sign):
         """Return arguments to user given a in_sign