changeset 345:e6047415868d

Bridge: added updateContact method
author Goffi <goffi@goffi.org>
date Sat, 28 May 2011 20:24:02 +0200
parents f19771d2e63b
children ca3a041fed30
files frontends/src/bridge/DBus.py src/bridge/DBus.py src/bridge/bridge_constructor/bridge_template.ini
diffstat 3 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py	Sat May 28 20:23:41 2011 +0200
+++ b/frontends/src/bridge/DBus.py	Sat May 28 20:24:02 2011 +0200
@@ -142,6 +142,9 @@
     def subscription(self, sub_type, entity, profile_key="@DEFAULT@"):
         return self.db_comm_iface.subscription(sub_type, entity, profile_key)
 
+    def updateContact(self, entity, name, groups, profile_key="@DEFAULT@"):
+        return self.db_comm_iface.updateContact(entity, name, groups, profile_key)
+
 
 #methods from plugins
     def getRoomJoined(self, profile_key='@DEFAULT@'):
--- a/src/bridge/DBus.py	Sat May 28 20:23:41 2011 +0200
+++ b/src/bridge/DBus.py	Sat May 28 20:24:02 2011 +0200
@@ -301,6 +301,12 @@
     def subscription(self, sub_type, entity, profile_key="@DEFAULT@"):
         return self.cb["subscription"](unicode(sub_type), unicode(entity), unicode(profile_key))
 
+    @dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX,
+                         in_signature='ssass', out_signature='',
+                         async_callbacks=None)
+    def updateContact(self, entity, name, groups, profile_key="@DEFAULT@"):
+        return self.cb["updateContact"](unicode(entity), unicode(name), groups, unicode(profile_key))
+
     
     def __attributes(self, in_sign):
         """Return arguments to user given a in_sign
--- a/src/bridge/bridge_constructor/bridge_template.ini	Sat May 28 20:23:41 2011 +0200
+++ b/src/bridge/bridge_constructor/bridge_template.ini	Sat May 28 20:24:02 2011 +0200
@@ -402,6 +402,18 @@
 doc_param_0=entity: JID to add to roster
 doc_param_1=%(doc_profile_key)s
 
+[updateContact]
+type=method
+category=communication
+sig_in=ssass
+sig_out=
+param_3_default="@DEFAULT@"
+doc=update a contact in profile's roster
+doc_param_0=entity: JID update in roster
+doc_param_1=name: roster's name for the entity
+doc_param_2=groups: list of group where the entity is
+doc_param_3=%(doc_profile_key)s
+
 [delContact]
 type=method
 category=communication