telepathy-salut: protocol: claim that we implement Avatars
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Thu Sep 19 04:01:31 PDT 2013
Module: telepathy-salut
Branch: master
Commit: ca5fa44a7d74dc1450b0409bbf91c08c453a94df
URL: http://cgit.freedesktop.org/telepathy/telepathy-salut/commit/?id=ca5fa44a7d74dc1450b0409bbf91c08c453a94df
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Thu Sep 19 11:57:21 2013 +0200
protocol: claim that we implement Avatars
https://bugs.freedesktop.org/show_bug.cgi?id=69508
---
src/protocol.c | 13 +++++++++++++
tests/twisted/cm/protocol.py | 2 ++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/protocol.c b/src/protocol.c
index 4295451..453adf8 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -273,6 +273,18 @@ salut_protocol_finalize (GObject *object)
G_OBJECT_CLASS (salut_protocol_parent_class)->finalize (object);
}
+static GPtrArray *
+get_interfaces_array (TpBaseProtocol *self)
+{
+ GPtrArray *interfaces;
+
+ interfaces = TP_BASE_PROTOCOL_CLASS (
+ salut_protocol_parent_class)->get_interfaces_array (self);
+
+ g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_AVATARS);
+
+ return interfaces;
+}
static void
salut_protocol_class_init (SalutProtocolClass *klass)
@@ -288,6 +300,7 @@ salut_protocol_class_init (SalutProtocolClass *klass)
base_class->normalize_contact = normalize_contact;
base_class->identify_account = identify_account;
base_class->get_connection_details = get_connection_details;
+ base_class->get_interfaces_array = get_interfaces_array;
object_class->get_property = salut_protocol_get_property;
object_class->set_property = salut_protocol_set_property;
diff --git a/tests/twisted/cm/protocol.py b/tests/twisted/cm/protocol.py
index 94bccac..46db537 100644
--- a/tests/twisted/cm/protocol.py
+++ b/tests/twisted/cm/protocol.py
@@ -61,5 +61,7 @@ def test(q, bus, conn):
acc_name = unwrap(proto_iface.IdentifyAccount(test_params))
assertEquals('', acc_name)
+ assertContains(cs.PROTOCOL_IFACE_AVATARS, proto_props['Interfaces'])
+
if __name__ == '__main__':
exec_test(test)
More information about the telepathy-commits
mailing list