From 28a1c05febfa5c1c30ff0f405dd865365c6fe6f7 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 19 Sep 2013 11:57:21 +0200 Subject: [PATCH 2/4] 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(+) 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) -- 1.8.3.1