diff --git a/frontends/src/bridge/DBus.py b/frontends/src/bridge/DBus.py index 6bdbc935..622011bf 100644 --- a/frontends/src/bridge/DBus.py +++ b/frontends/src/bridge/DBus.py @@ -142,6 +142,9 @@ class DBusBridgeFrontend(BridgeFrontend): 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 --git a/src/bridge/DBus.py b/src/bridge/DBus.py index 623ad639..476ce058 100755 --- a/src/bridge/DBus.py +++ b/src/bridge/DBus.py @@ -301,6 +301,12 @@ class DbusObject(dbus.service.Object): 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 --git a/src/bridge/bridge_constructor/bridge_template.ini b/src/bridge/bridge_constructor/bridge_template.ini index 9cdc5667..dd7a3330 100644 --- a/src/bridge/bridge_constructor/bridge_template.ini +++ b/src/bridge/bridge_constructor/bridge_template.ini @@ -402,6 +402,18 @@ doc=Add a contact to profile's roster 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