diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-22 11:25:16 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-22 11:32:11 +0100 |
commit | 6154178f94d0b9533420715250fa166c734e4d0b (patch) | |
tree | ac71c200ea097670eb08029367b591a6a8bddd06 | |
parent | 80b458ae148f0759a639ad9ea763a9548b8eabf2 (diff) |
advertise that channels implement the Messages interface
-rw-r--r-- | src/idle-im-channel.c | 5 | ||||
-rw-r--r-- | src/idle-muc-channel.c | 1 | ||||
-rw-r--r-- | tests/twisted/channels/requests-muc.py | 1 | ||||
-rw-r--r-- | tests/twisted/messages/messages-iface.py | 8 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/idle-im-channel.c b/src/idle-im-channel.c index 70a31bd..7fe7585 100644 --- a/src/idle-im-channel.c +++ b/src/idle-im-channel.c @@ -70,7 +70,10 @@ enum { LAST_PROPERTY_ENUM }; -const gchar *im_channel_interfaces[] = {NULL}; +const gchar *im_channel_interfaces[] = { + TP_IFACE_CHANNEL_INTERFACE_MESSAGES, + NULL +}; /* private structure */ typedef struct _IdleIMChannelPrivate IdleIMChannelPrivate; diff --git a/src/idle-muc-channel.c b/src/idle-muc-channel.c index a85ee59..8ba09df 100644 --- a/src/idle-muc-channel.c +++ b/src/idle-muc-channel.c @@ -179,6 +179,7 @@ static const gchar *muc_channel_interfaces[] = { TP_IFACE_CHANNEL_INTERFACE_PASSWORD, TP_IFACE_CHANNEL_INTERFACE_GROUP, TP_IFACE_PROPERTIES_INTERFACE, + TP_IFACE_CHANNEL_INTERFACE_MESSAGES, NULL }; diff --git a/tests/twisted/channels/requests-muc.py b/tests/twisted/channels/requests-muc.py index 1de8a85..be50b7c 100644 --- a/tests/twisted/channels/requests-muc.py +++ b/tests/twisted/channels/requests-muc.py @@ -57,6 +57,7 @@ def test(q, bus, conn, stream): sorted([cs.CHANNEL_IFACE_GROUP, cs.CHANNEL_IFACE_PASSWORD, cs.TP_AWKWARD_PROPERTIES, + cs.CHANNEL_IFACE_MESSAGES, ]) assert props[cs.TARGET_HANDLE_TYPE] == cs.HT_ROOM assert props[cs.TARGET_ID] == '#idletest' diff --git a/tests/twisted/messages/messages-iface.py b/tests/twisted/messages/messages-iface.py index a98ec29..7406067 100644 --- a/tests/twisted/messages/messages-iface.py +++ b/tests/twisted/messages/messages-iface.py @@ -3,7 +3,7 @@ Test Messages interface implementation """ from idletest import exec_test -from servicetest import EventPattern, call_async +from servicetest import EventPattern, call_async, assertContains import constants as cs import dbus @@ -58,6 +58,9 @@ def test(q, bus, conn, stream): q.expect('dbus-signal', signal='MembersChanged') chan = bus.get_object(conn.bus_name, ret.value[0]) + props = ret.value[1] + assertContains(cs.CHANNEL_IFACE_MESSAGES, props[cs.INTERFACES]) + test_sending(q, bus, conn, stream, chan) # Receive a message on the channel @@ -78,6 +81,9 @@ def test(q, bus, conn, stream): ret = q.expect('dbus-return', method='CreateChannel') chan = bus.get_object(conn.bus_name, ret.value[0]) + props = ret.value[1] + assertContains(cs.CHANNEL_IFACE_MESSAGES, props[cs.INTERFACES]) + test_sending(q, bus, conn, stream, chan) # Receive a private message from Alice |