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);
+
+ feature = TP_ACCOUNT_FEATURE_ADDRESSING;
+ g_array_append_val (features, feature);
+
+ return features;
+}
+
static GArray *
empathy_client_factory_dup_connection_features (TpSimpleClientFactory *factory,
TpConnection *connection)
feature = TP_CONNECTION_FEATURE_CAPABILITIES;
g_array_append_val (features, feature);
+ feature = TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS;
+ g_array_append_val (features, feature);
+
+ feature = TP_CONNECTION_FEATURE_CONTACT_INFO;
+ g_array_append_val (features, feature);
+
+ feature = TP_CONNECTION_FEATURE_BALANCE;
+ g_array_append_val (features, feature);
+
+ feature = TP_CONNECTION_FEATURE_CONTACT_BLOCKING;
+ g_array_append_val (features, feature);
+
+ /* Most empathy-* may allow user to add a contact to his contact list. We
+ * need this property to check if the connection allows it. It's cheap to
+ * prepare anyway as it will just call GetAll() on the ContactList iface. */
+ feature = TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES;
+ g_array_append_val (features, feature);
+
+ return features;
+}
+
+static GArray *
+empathy_client_factory_dup_contact_features (TpSimpleClientFactory *factory,
+ TpConnection *connection)
+{
+ GArray *features;
+ TpContactFeature feature;
+
+ features = chainup->dup_contact_features (factory, connection);
+
+ /* Needed by empathy_individual_add_menu_item_new to check if a contact is
+ * already in the contact list. This feature is pretty cheap to prepare as
+ * it doesn't prepare the full roster. */
+ feature = TP_CONTACT_FEATURE_SUBSCRIPTION_STATES;
+ g_array_append_val (features, feature);
+
return features;
}
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;
+
+ simple_class->dup_contact_features =
+ empathy_client_factory_dup_contact_features;
}
static void