[gnome-chat] client-factory: Add some default channel features
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chat] client-factory: Add some default channel features
- Date: Fri, 13 Sep 2013 16:27:41 +0000 (UTC)
commit 9fba366a0a7b7910434a49ef09d3528570dc16b2
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Sep 13 18:17:17 2013 +0200
client-factory: Add some default channel features
src/chat-client-factory.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/src/chat-client-factory.c b/src/chat-client-factory.c
index 57e0659..86ebea0 100644
--- a/src/chat-client-factory.c
+++ b/src/chat-client-factory.c
@@ -46,6 +46,31 @@ chat_client_factory_dup_account_features (TpSimpleClientFactory *factory, TpAcco
static GArray *
+chat_client_factory_dup_channel_features (TpSimpleClientFactory *factory, TpChannel *channel)
+{
+ GArray *features;
+ GQuark feature;
+
+ features = TP_SIMPLE_CLIENT_FACTORY_CLASS (chat_client_factory_parent_class)
+ ->dup_channel_features (factory, channel);
+
+ feature = TP_CHANNEL_FEATURE_CONTACTS;
+ g_array_append_val (features, feature);
+
+ if (TP_IS_TEXT_CHANNEL (channel))
+ {
+ feature = TP_TEXT_CHANNEL_FEATURE_CHAT_STATES;
+ g_array_append_val (features, feature);
+
+ feature = TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES;
+ g_array_append_val (features, feature);
+ }
+
+ return features;
+}
+
+
+static GArray *
chat_client_factory_dup_connection_features (TpSimpleClientFactory *factory, TpConnection *connection)
{
GArray *features;
@@ -118,6 +143,7 @@ chat_client_factory_class_init (ChatClientFactoryClass *class)
object_class->constructor = chat_client_factory_constructor;
simple_class->dup_account_features = chat_client_factory_dup_account_features;
+ simple_class->dup_channel_features = chat_client_factory_dup_channel_features;
simple_class->dup_connection_features = chat_client_factory_dup_connection_features;
simple_class->dup_contact_features = chat_client_factory_dup_contact_features;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]