From c96e94a66f65ef87054c0e2632748472f652ce2d Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 18 Sep 2013 10:19:01 +0200 Subject: [PATCH 1/3] protocol: claim to implement Interface.Avatars --- src/protocol.c | 1 + tests/twisted/cm/protocol.py | 4 +++- tests/twisted/constants.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/protocol.c b/src/protocol.c index deeaa8d..22b8444 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -330,6 +330,7 @@ get_interfaces_array (TpBaseProtocol *self) g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_PRESENCE); g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_ADDRESSING); + g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_AVATARS); return interfaces; } diff --git a/tests/twisted/cm/protocol.py b/tests/twisted/cm/protocol.py index e9c0b1c..264692e 100644 --- a/tests/twisted/cm/protocol.py +++ b/tests/twisted/cm/protocol.py @@ -3,7 +3,7 @@ Test Gabble's o.T.Protocol implementation """ import dbus -from servicetest import unwrap, tp_path_prefix, assertEquals +from servicetest import unwrap, tp_path_prefix, assertEquals, assertContains from gabbletest import exec_test, call_async import constants as cs import time @@ -66,6 +66,8 @@ def test(q, bus, conn, stream): acc_name = unwrap(proto_iface.IdentifyAccount(test_params)) assertEquals(test_params['account'], acc_name) + assertContains(cs.PROTOCOL_IFACE_AVATARS, proto_props['Interfaces']) + conn.Connect() q.expect('dbus-signal', signal='StatusChanged', args=[cs.CONN_STATUS_CONNECTING, cs.CSR_REQUESTED]) q.expect('stream-authenticated') diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py index 3f6cec0..0a93c5e 100644 --- a/tests/twisted/constants.py +++ b/tests/twisted/constants.py @@ -472,6 +472,7 @@ class SendError(object): PROTOCOL = 'org.freedesktop.Telepathy.Protocol' PROTOCOL_IFACE_PRESENCES = PROTOCOL + '.Interface.Presence' PROTOCOL_IFACE_ADDRESSING = PROTOCOL + '.Interface.Addressing' +PROTOCOL_IFACE_AVATARS = PROTOCOL + '.Interface.Avatars' PARAM_REQUIRED = 1 PARAM_REGISTER = 2 -- 1.8.3.1