diff src/bridge/DBus.py @ 504:65ecbb473cbb

core, quick frontend, plugin xep-0054, bridge: use of memory's entities data for vcard: - bridge: new bridge method getEntityData and signal entityDataUpdated - core: entityDataUpdated signal sent on new string data - quick frontend: fixed avatars/vcard infos, fixed _replace in quick_contact_list - plugin xep-0054: dropped updatedValue signal, use entities data instead
author Goffi <goffi@goffi.org>
date Wed, 26 Sep 2012 01:23:56 +0200
parents e9634d2e7b38
children 862c0d6ab974
line wrap: on
line diff
--- a/src/bridge/DBus.py	Wed Sep 26 00:38:41 2012 +0200
+++ b/src/bridge/DBus.py	Wed Sep 26 01:23:56 2012 +0200
@@ -141,6 +141,11 @@
 
     @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
                          signature='ssss')
+    def entityDataUpdated(self, jid, name, value, profile):
+        pass
+
+    @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
+                         signature='ssss')
     def newAlert(self, message, title, alert_type, profile):
         pass
 
@@ -169,11 +174,6 @@
     def subscribe(self, sub_type, entity_jid, profile):
         pass
 
-    @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
-                         signature='sa{ss}s')
-    def updatedValue(self, name, value, profile):
-        pass
-
 
     ### methods ###    
     
@@ -262,6 +262,12 @@
         return self._callback("getContactsFromGroup", unicode(group), unicode(profile_key))
 
     @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):
+        return self._callback("getEntityData", unicode(jid), keys, unicode(profile))
+
+    @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ssib', out_signature='a(dsss)',
                          async_callbacks=('callback', 'errback'))
     def getHistory(self, from_jid, to_jid, limit, between=True, callback=None, errback=None):
@@ -518,6 +524,9 @@
     def disconnected(self, profile):
         self.dbus_bridge.disconnected(profile)
 
+    def entityDataUpdated(self, jid, name, value, profile):
+        self.dbus_bridge.entityDataUpdated(jid, name, value, profile)
+
     def newAlert(self, message, title, alert_type, profile):
         self.dbus_bridge.newAlert(message, title, alert_type, profile)
 
@@ -536,9 +545,6 @@
     def subscribe(self, sub_type, entity_jid, profile):
         self.dbus_bridge.subscribe(sub_type, entity_jid, profile)
 
-    def updatedValue(self, name, value, profile):
-        self.dbus_bridge.updatedValue(name, value, profile)
-
 
     def register(self, name, callback):
         debug("registering DBus bridge method [%s]", name)