From e53e25ec3ab906d91927731c716600d2e61c02a6 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 30 Apr 2012 13:28:26 +0200 Subject: [PATCH] Implement ChatState in test echo channel https://bugs.freedesktop.org/show_bug.cgi?id=49215 --- examples/cm/echo-message-parts/chan.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/cm/echo-message-parts/chan.c b/examples/cm/echo-message-parts/chan.c index 320f428..65c4c33 100644 --- a/examples/cm/echo-message-parts/chan.c +++ b/examples/cm/echo-message-parts/chan.c @@ -30,6 +30,8 @@ G_DEFINE_TYPE_WITH_CODE (ExampleEcho2Channel, tp_message_mixin_text_iface_init) G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES, tp_message_mixin_messages_iface_init) + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_CHAT_STATE, + tp_message_mixin_chat_state_iface_init) G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE, destroyable_iface_init) G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_SMS, sms_iface_init) @@ -48,6 +50,8 @@ example_echo_2_channel_get_interfaces (TpBaseChannel *self) g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_MESSAGES); g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE); g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_SMS); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_CHAT_STATE); + return interfaces; }; @@ -175,6 +179,13 @@ finally: } } +static gboolean +send_chat_state (GObject *object, + TpChannelChatState state, + GError **error) +{ + return TRUE; +} static GObject * constructor (GType type, @@ -205,6 +216,8 @@ constructor (GType type, TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES, content_types); + tp_message_mixin_implement_send_chat_state (object, send_chat_state); + return object; } -- 1.7.9.5