[next] telepathy-glib: TpAutomaticClientFactory: Set only CORE features by default
Xavier Claessens
xclaesse at kemper.freedesktop.org
Thu May 3 11:49:52 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 41542835815c67814b3f0464573ee6f7801c869e
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=41542835815c67814b3f0464573ee6f7801c869e
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Thu May 3 12:59:38 2012 +0200
TpAutomaticClientFactory: Set only CORE features by default
There is no point in doing features if the factory request them
all anyway.
---
next-NEWS | 4 ++++
telepathy-glib/automatic-client-factory.c | 21 ++++-----------------
2 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/next-NEWS b/next-NEWS
index 46e4dea..5b03cae 100644
--- a/next-NEWS
+++ b/next-NEWS
@@ -27,3 +27,7 @@ API/Behaviour changes
- TpContact now uses GQuark instead of TpContactFeature. This make them
consistent with TpProxy features.
+
+ - TpAutomaticClientFactory now only has CORE features by default, other
+ features must be added explicitly by the user using
+ tp_client_factory_add_*_features().
diff --git a/telepathy-glib/automatic-client-factory.c b/telepathy-glib/automatic-client-factory.c
index 633ed1f..e1d8251 100644
--- a/telepathy-glib/automatic-client-factory.c
+++ b/telepathy-glib/automatic-client-factory.c
@@ -65,13 +65,8 @@
*
* <itemizedlist>
* <listitem>
- * <para>%TP_CHANNEL_FEATURE_CORE, %TP_CHANNEL_FEATURE_GROUP
- * and %TP_CHANNEL_FEATURE_PASSWORD for all
- * type of channels.</para>
- * </listitem>
- * <listitem>
- * <para>%TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES and
- * %TP_TEXT_CHANNEL_FEATURE_SMS for #TpTextChannel</para>
+ * <para>%TP_CHANNEL_FEATURE_CORE
+ * for all type of channels.</para>
* </listitem>
* <listitem>
* <para>%TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE
@@ -87,7 +82,7 @@
* </listitem>
* </itemizedlist>
*
- * Since: 0.15.5
+ * Since: 1.0
*/
/**
@@ -167,9 +162,7 @@ build_channel_type_mapping (void)
TP_TYPE_TEXT_CHANNEL,
NULL,
(NewFunc) _tp_text_channel_new_with_factory,
- { TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES,
- TP_TEXT_CHANNEL_FEATURE_SMS,
- 0 },
+ { 0 },
},
{ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
TP_TYPE_FILE_TRANSFER_CHANNEL,
@@ -226,17 +219,11 @@ dup_channel_features_impl (TpClientFactory *self,
TpChannel *channel)
{
GArray *features;
- GQuark standard_features[] = {
- TP_CHANNEL_FEATURE_GROUP,
- TP_CHANNEL_FEATURE_PASSWORD,
- };
ChannelTypeMapping *m;
/* Chainup to get desired features for all channel types */
features = chainup->dup_channel_features (self, channel);
- g_array_append_vals (features, standard_features, G_N_ELEMENTS (standard_features));
-
for (m = channel_type_mapping; m->channel_type != NULL; m++)
{
if (G_TYPE_CHECK_INSTANCE_TYPE (channel, m->gtype))
More information about the telepathy-commits
mailing list