# HG changeset patch # User Goffi # Date 1306607042 -7200 # Node ID e6047415868d0aca0b22eadf281756cea315a687 # Parent f19771d2e63bc0b285ede00d629806647ec6c15c Bridge: added updateContact method diff -r f19771d2e63b -r e6047415868d frontends/src/bridge/DBus.py --- 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@'): diff -r f19771d2e63b -r e6047415868d src/bridge/DBus.py --- 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 diff -r f19771d2e63b -r e6047415868d src/bridge/bridge_constructor/bridge_template.ini --- 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