]> git.0d.be Git - empathy.git/commitdiff
ask factory to prepare TP_ACCOUNT_FEATURE_CONNECTION
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 18 Aug 2011 15:42:39 +0000 (17:42 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 19 Aug 2011 07:26:25 +0000 (09:26 +0200)
So we can rely on the connection returned by tp_account_get_connection() to be
usable right away.

https://bugzilla.gnome.org/show_bug.cgi?id=656831

libempathy/empathy-client-factory.c

index 5055a2628f95ce51ecdcb8c21b9ce26d1acabd65..37ad18ff5c17271d691e1dfdac5f88cb1458ff25 100644 (file)
@@ -113,6 +113,21 @@ empathy_client_factory_dup_channel_features (TpSimpleClientFactory *factory,
   return features;
 }
 
+static GArray *
+empathy_client_factory_dup_account_features (TpSimpleClientFactory *factory,
+    TpAccount *account)
+{
+  GArray *features;
+  GQuark feature;
+
+  features = chainup->dup_account_features (factory, account);
+
+  feature = TP_ACCOUNT_FEATURE_CONNECTION;
+  g_array_append_val (features, feature);
+
+  return features;
+}
+
 static GArray *
 empathy_client_factory_dup_connection_features (TpSimpleClientFactory *factory,
     TpConnection *connection)
@@ -137,6 +152,9 @@ empathy_client_factory_class_init (EmpathyClientFactoryClass *cls)
   simple_class->dup_channel_features =
     empathy_client_factory_dup_channel_features;
 
+  simple_class->dup_account_features =
+    empathy_client_factory_dup_account_features;
+
   simple_class->dup_connection_features =
     empathy_client_factory_dup_connection_features;
 }