[empathy/next: 6/14] Port to Telepathy 1.0



commit c739e665871d087f65bd6861f3a5814993e52946
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Oct 23 16:27:37 2013 +0200

    Port to Telepathy 1.0

 libempathy-gtk/empathy-account-chooser.c           |   22 +++---
 libempathy-gtk/empathy-chat.c                      |    8 +--
 libempathy-gtk/empathy-contact-blocking-dialog.c   |    8 +-
 libempathy-gtk/empathy-contact-chooser.c           |    2 +-
 libempathy-gtk/empathy-individual-menu.c           |    2 +-
 libempathy-gtk/empathy-individual-store-channel.c  |    6 +-
 .../empathy-local-xmpp-assistant-widget.c          |    2 +-
 libempathy-gtk/empathy-location-manager.c          |    4 +-
 libempathy-gtk/empathy-log-window.c                |    2 +-
 libempathy-gtk/empathy-presence-chooser.c          |   10 ++--
 libempathy-gtk/empathy-protocol-chooser.c          |    2 +-
 libempathy-gtk/empathy-sound-manager.c             |    2 +-
 libempathy/empathy-auth-factory.c                  |    2 +-
 libempathy/empathy-auth-factory.h                  |    2 +-
 libempathy/empathy-chatroom-manager.c              |    4 +-
 libempathy/empathy-client-factory.c                |   65 ++++++++++++--------
 libempathy/empathy-connection-aggregator.c         |   12 ++--
 libempathy/empathy-contact.c                       |    4 +-
 libempathy/empathy-message.c                       |    6 +-
 libempathy/empathy-presence-manager.c              |    2 +-
 libempathy/empathy-tp-chat.c                       |   16 +++---
 libempathy/empathy-tp-chat.h                       |    2 +-
 libempathy/empathy-utils.c                         |    4 +-
 src/empathy-accounts-common.c                      |    4 +-
 src/empathy-accounts-dialog.c                      |   14 ++--
 src/empathy-accounts.c                             |    2 +-
 src/empathy-auth-client.c                          |    6 +-
 src/empathy-chat-window.c                          |    4 +-
 src/empathy-debug-window.c                         |    2 +-
 src/empathy-event-manager.c                        |    2 +-
 src/empathy-import-pidgin.c                        |    2 +-
 src/empathy-import-widget.c                        |    2 +-
 src/empathy-new-chatroom-dialog.c                  |    4 +-
 src/empathy-preferences.c                          |    4 +-
 src/empathy-roster-window.c                        |   24 ++++----
 src/empathy-sanity-cleaning.c                      |    6 +-
 src/empathy-status-icon.c                          |    2 +-
 src/empathy.c                                      |    6 +-
 .../test-empathy-contact-blocking-dialog.c         |    4 +-
 39 files changed, 144 insertions(+), 133 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 69fc54f..5327eb1 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -121,10 +121,10 @@ enum {
   COL_ACCOUNT_COUNT
 };
 
-static void account_chooser_account_validity_changed_cb (
+static void account_chooser_account_usability_changed_cb (
     TpAccountManager *manager,
     TpAccount *account,
-    gboolean valid,
+    gboolean usable,
     EmpathyAccountChooser *self);
 static void account_chooser_account_add_foreach (TpAccount *account,
     EmpathyAccountChooser *self);
@@ -172,7 +172,7 @@ G_DEFINE_TYPE (EmpathyAccountChooser, empathy_account_chooser,
 static void
 empathy_account_chooser_init (EmpathyAccountChooser *self)
 {
-  TpSimpleClientFactory *factory;
+  TpClientFactory *factory;
 
   self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
     EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserPriv);
@@ -184,8 +184,8 @@ empathy_account_chooser_init (EmpathyAccountChooser *self)
 
   self->priv->manager = tp_account_manager_dup ();
 
-  tp_g_signal_connect_object (self->priv->manager, "account-validity-changed",
-      G_CALLBACK (account_chooser_account_validity_changed_cb), self, 0);
+  tp_g_signal_connect_object (self->priv->manager, "account-usability-changed",
+      G_CALLBACK (account_chooser_account_usability_changed_cb), self, 0);
 
   tp_g_signal_connect_object (self->priv->manager, "account-removed",
       G_CALLBACK (account_chooser_account_removed_cb), self, 0);
@@ -193,9 +193,9 @@ empathy_account_chooser_init (EmpathyAccountChooser *self)
   /* Make sure we'll have the capabilities feature on TpAccount's connection */
   factory = tp_proxy_get_factory (self->priv->manager);
 
-  tp_simple_client_factory_add_account_features_varargs (factory,
+  tp_client_factory_add_account_features_varargs (factory,
       TP_ACCOUNT_FEATURE_CONNECTION, NULL);
-  tp_simple_client_factory_add_connection_features_varargs (factory,
+  tp_client_factory_add_connection_features_varargs (factory,
       TP_CONNECTION_FEATURE_CAPABILITIES, NULL);
 }
 
@@ -271,7 +271,7 @@ account_manager_prepared_cb (GObject *source_object,
       return;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (manager);
+  accounts = tp_account_manager_dup_usable_accounts (manager);
 
   for (l = accounts; l != NULL; l = l->next)
     {
@@ -705,12 +705,12 @@ empathy_account_chooser_set_has_all_option (EmpathyAccountChooser *self,
 }
 
 static void
-account_chooser_account_validity_changed_cb (TpAccountManager *manager,
+account_chooser_account_usability_changed_cb (TpAccountManager *manager,
     TpAccount *account,
-    gboolean valid,
+    gboolean usable,
     EmpathyAccountChooser *self)
 {
-  if (valid)
+  if (usable)
     account_chooser_account_add_foreach (account, self);
   else
     account_chooser_account_remove_foreach (account, self);
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 35f908b..c16f12a 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -303,8 +303,6 @@ account_reconnected (EmpathyChat *chat,
                                TP_USER_ACTION_TIME_NOT_USER_ACTION);
                        break;
                case TP_HANDLE_TYPE_NONE:
-               case TP_HANDLE_TYPE_LIST:
-               case TP_HANDLE_TYPE_GROUP:
                default:
                        g_assert_not_reached ();
                        break;
@@ -722,7 +720,7 @@ chat_command_msg_cb (GObject *source,
        GError *error = NULL;
        TpChannel *channel;
 
-       channel = tp_account_channel_request_ensure_and_observe_channel_finish (
+       channel = tp_account_channel_request_ensure_channel_finish (
                                        TP_ACCOUNT_CHANNEL_REQUEST (source), result, &error);
 
        if (channel == NULL) {
@@ -864,7 +862,7 @@ chat_command_msg_internal (EmpathyChat *chat,
        data->chat = chat;
        data->message = g_strdup (message);
 
-       tp_account_channel_request_ensure_and_observe_channel_async (req,
+       tp_account_channel_request_ensure_channel_async (req,
                EMPATHY_CHAT_BUS_NAME, NULL, chat_command_msg_cb, data);
 
        g_object_unref (req);
@@ -3639,7 +3637,7 @@ account_manager_prepared_cb (GObject *source_object,
                return;
        }
 
-       accounts = tp_account_manager_dup_valid_accounts (account_manager);
+       accounts = tp_account_manager_dup_usable_accounts (account_manager);
 
        for (l = accounts; l != NULL; l = l->next) {
                TpAccount *account = l->data;
diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.c 
b/libempathy-gtk/empathy-contact-blocking-dialog.c
index cbd514f..96d18fd 100644
--- a/libempathy-gtk/empathy-contact-blocking-dialog.c
+++ b/libempathy-gtk/empathy-contact-blocking-dialog.c
@@ -235,7 +235,7 @@ contact_blocking_dialog_am_prepared (GObject *am,
       return;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (TP_ACCOUNT_MANAGER (am));
+  accounts = tp_account_manager_dup_usable_accounts (TP_ACCOUNT_MANAGER (am));
 
   for (ptr = accounts; ptr != NULL; ptr = ptr->next)
     {
@@ -350,7 +350,7 @@ contact_blocking_dialog_add_contact (GtkWidget *widget,
       identifier, get_pretty_conn_name (conn));
 
   tp_connection_dup_contact_by_id_async (conn, identifier,
-      0, NULL, block_contact_got_contact,
+      NULL, block_contact_got_contact,
       tp_weak_ref_new (self, NULL, NULL));
 
   gtk_entry_set_text (GTK_ENTRY (self->priv->add_contact_entry), "");
@@ -603,7 +603,7 @@ empathy_contact_blocking_dialog_init (EmpathyContactBlockingDialog *self)
   GtkEntryCompletion *completion;
   TpAccountManager *am;
   GtkStyleContext *context;
-  TpSimpleClientFactory *factory;
+  TpClientFactory *factory;
 
   self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
       EMPATHY_TYPE_CONTACT_BLOCKING_DIALOG,
@@ -700,7 +700,7 @@ empathy_contact_blocking_dialog_init (EmpathyContactBlockingDialog *self)
   am = tp_account_manager_dup ();
 
   factory = tp_proxy_get_factory (am);
-  tp_simple_client_factory_add_connection_features_varargs (factory,
+  tp_client_factory_add_connection_features_varargs (factory,
       TP_CONNECTION_FEATURE_CONTACT_BLOCKING, NULL);
 
   tp_proxy_prepare_async (am, NULL, contact_blocking_dialog_am_prepared, self);
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index b82aa93..30af869 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -278,7 +278,7 @@ add_temporary_individuals (EmpathyContactChooser *self,
   self->priv->add_temp_ctx = add_temporary_individual_ctx_new (self);
 
   /* Try to add an individual for each connected account */
-  accounts = tp_account_manager_dup_valid_accounts (self->priv->account_mgr);
+  accounts = tp_account_manager_dup_usable_accounts (self->priv->account_mgr);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       TpAccount *account = l->data;
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 7f53a7a..7fe41d0 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -300,7 +300,7 @@ find_phone_accounts (void)
   am = tp_account_manager_dup ();
   g_return_val_if_fail (am != NULL, NULL);
 
-  accounts = tp_account_manager_dup_valid_accounts (am);
+  accounts = tp_account_manager_dup_usable_accounts (am);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       TpAccount *account = l->data;
diff --git a/libempathy-gtk/empathy-individual-store-channel.c 
b/libempathy-gtk/empathy-individual-store-channel.c
index a18bc33..b18f9c1 100644
--- a/libempathy-gtk/empathy-individual-store-channel.c
+++ b/libempathy-gtk/empathy-individual-store-channel.c
@@ -202,7 +202,7 @@ individual_store_channel_set_individual_channel (
   self->priv->channel = g_object_ref (channel);
 
   /* Add initial members */
-  members = tp_channel_group_dup_members_contacts (channel);
+  members = tp_channel_group_dup_members (channel);
   if (members != NULL)
     {
       add_members (self, members);
@@ -305,7 +305,7 @@ individual_store_channel_reload_individuals (EmpathyIndividualStore *store)
   g_ptr_array_unref (members);
 
   /* re-add members */
-  members = tp_channel_group_dup_members_contacts (self->priv->channel);
+  members = tp_channel_group_dup_members (self->priv->channel);
   if (members == NULL)
     return;
 
@@ -320,7 +320,7 @@ individual_store_channel_initial_loading (EmpathyIndividualStore *store)
       store);
 
   return !tp_proxy_is_prepared (self->priv->channel,
-      TP_CHANNEL_FEATURE_CONTACTS);
+      TP_CHANNEL_FEATURE_GROUP);
 }
 
 static void
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c 
b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
index 6ee8711..cb4e81d 100644
--- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
@@ -224,7 +224,7 @@ empathy_local_xmpp_assistant_widget_should_create_account (
   gboolean salut_created = FALSE;
   GList *accounts, *l;
 
-  accounts = tp_account_manager_dup_valid_accounts (manager);
+  accounts = tp_account_manager_dup_usable_accounts (manager);
 
   for (l = accounts; l != NULL;  l = g_list_next (l))
     {
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 8787eb2..219b8a1 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -179,7 +179,7 @@ publish_to_all_am_prepared_cb (GObject *source_object,
       goto out;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (manager);
+  accounts = tp_account_manager_dup_usable_accounts (manager);
   for (l = accounts; l; l = l->next)
     {
       TpConnection *conn = tp_account_get_connection (TP_ACCOUNT (l->data));
@@ -384,7 +384,7 @@ account_manager_prepared_cb (GObject *source_object,
       return;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (account_manager);
+  accounts = tp_account_manager_dup_usable_accounts (account_manager);
   for (l = accounts; l != NULL; l = l->next)
     {
       TpAccount *account = TP_ACCOUNT (l->data);
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 752fdc9..6d8eb40 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -2501,7 +2501,7 @@ log_window_who_populate (EmpathyLogWindow *self)
       GList *accounts, *l;
 
       manager = empathy_account_chooser_get_account_manager (account_chooser);
-      accounts = tp_account_manager_dup_valid_accounts (manager);
+      accounts = tp_account_manager_dup_usable_accounts (manager);
 
       for (l = accounts; l != NULL; l = l->next)
         {
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 6ff113d..9d6a84c 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -752,7 +752,7 @@ update_sensitivity_am_prepared_cb (GObject *source_object,
                return;
        }
 
-       accounts = tp_account_manager_dup_valid_accounts (manager);
+       accounts = tp_account_manager_dup_usable_accounts (manager);
 
        for (l = accounts ; l != NULL ; l = g_list_next (l)) {
                TpAccount *a = TP_ACCOUNT (l->data);
@@ -784,10 +784,10 @@ presence_chooser_update_sensitivity (EmpathyPresenceChooser *chooser)
 }
 
 static void
-presence_chooser_account_manager_account_validity_changed_cb (
+presence_chooser_account_manager_account_usability_changed_cb (
        TpAccountManager *manager,
        TpAccount *account,
-       gboolean valid,
+       gboolean usable,
        EmpathyPresenceChooser *chooser)
 {
        presence_chooser_update_sensitivity (chooser);
@@ -889,8 +889,8 @@ presence_chooser_constructed (GObject *object)
                G_CALLBACK (presence_chooser_presence_changed_cb),
                chooser);
 
-       tp_g_signal_connect_object (priv->account_manager, "account-validity-changed",
-               G_CALLBACK (presence_chooser_account_manager_account_validity_changed_cb),
+       tp_g_signal_connect_object (priv->account_manager, "account-usability-changed",
+               G_CALLBACK (presence_chooser_account_manager_account_usability_changed_cb),
                chooser, 0);
        tp_g_signal_connect_object (priv->account_manager, "account-removed",
                G_CALLBACK (presence_chooser_account_manager_account_changed_cb),
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index ff8dac1..69af28d 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -209,7 +209,7 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
       COL_PROTOCOL, &protocol,
       -1);
 
-  tp_protocol = tp_connection_manager_get_protocol_object (
+  tp_protocol = tp_connection_manager_get_protocol (
       tpaw_protocol_get_cm (protocol),
       tpaw_protocol_get_protocol_name (protocol));
 
diff --git a/libempathy-gtk/empathy-sound-manager.c b/libempathy-gtk/empathy-sound-manager.c
index 3453e8f..5bba190 100644
--- a/libempathy-gtk/empathy-sound-manager.c
+++ b/libempathy-gtk/empathy-sound-manager.c
@@ -175,7 +175,7 @@ empathy_check_available_state (void)
    * See https://bugzilla.gnome.org/show_bug.cgi?id=704454 */
   most_available_requested_presence = TP_CONNECTION_PRESENCE_TYPE_UNSET;
   am = tp_account_manager_dup ();
-  accounts = tp_account_manager_dup_valid_accounts (am);
+  accounts = tp_account_manager_dup_usable_accounts (am);
   while (accounts != NULL)
     {
       TpAccount *account = accounts->data;
diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c
index 04e619b..a87e916 100644
--- a/libempathy/empathy-auth-factory.c
+++ b/libempathy/empathy-auth-factory.c
@@ -760,7 +760,7 @@ empathy_auth_factory_class_init (EmpathyAuthFactoryClass *klass)
 }
 
 EmpathyAuthFactory *
-empathy_auth_factory_new (TpSimpleClientFactory *factory)
+empathy_auth_factory_new (TpClientFactory *factory)
 {
   return g_object_new (EMPATHY_TYPE_AUTH_FACTORY,
       "factory", factory,
diff --git a/libempathy/empathy-auth-factory.h b/libempathy/empathy-auth-factory.h
index 73e9057..3f11396 100644
--- a/libempathy/empathy-auth-factory.h
+++ b/libempathy/empathy-auth-factory.h
@@ -58,7 +58,7 @@ GType empathy_auth_factory_get_type (void);
   (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_AUTH_FACTORY, \
     EmpathyAuthFactoryClass))
 
-EmpathyAuthFactory * empathy_auth_factory_new (TpSimpleClientFactory *factory);
+EmpathyAuthFactory * empathy_auth_factory_new (TpClientFactory *factory);
 
 gboolean empathy_auth_factory_register (EmpathyAuthFactory *self,
     GError **error);
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index 3a117b1..0f79178 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -269,8 +269,8 @@ chatroom_manager_parse_chatroom (EmpathyChatroomManager *manager,
 
   factory = empathy_client_factory_dup ();
 
-  account = tp_simple_client_factory_ensure_account (
-          TP_SIMPLE_CLIENT_FACTORY (factory), account_id, NULL, &error);
+  account = tp_client_factory_ensure_account (
+          TP_CLIENT_FACTORY (factory), account_id, NULL, &error);
   g_object_unref (factory);
 
   if (account == NULL)
diff --git a/libempathy/empathy-client-factory.c b/libempathy/empathy-client-factory.c
index b57ea06..16c09b7 100644
--- a/libempathy/empathy-client-factory.c
+++ b/libempathy/empathy-client-factory.c
@@ -31,11 +31,11 @@
 G_DEFINE_TYPE (EmpathyClientFactory, empathy_client_factory,
     TP_TYPE_AUTOMATIC_CLIENT_FACTORY)
 
-#define chainup ((TpSimpleClientFactoryClass *) \
+#define chainup ((TpClientFactoryClass *) \
     empathy_client_factory_parent_class)
 
 static TpChannel *
-empathy_client_factory_create_channel (TpSimpleClientFactory *factory,
+empathy_client_factory_create_channel (TpClientFactory *factory,
     TpConnection *conn,
     const gchar *path,
     const GHashTable *properties,
@@ -48,7 +48,7 @@ empathy_client_factory_create_channel (TpSimpleClientFactory *factory,
   if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_TEXT))
     {
       return TP_CHANNEL (empathy_tp_chat_new (
-            TP_SIMPLE_CLIENT_FACTORY (factory), conn, path,
+            TP_CLIENT_FACTORY (factory), conn, path,
             properties));
     }
 
@@ -56,7 +56,7 @@ empathy_client_factory_create_channel (TpSimpleClientFactory *factory,
 }
 
 static GArray *
-empathy_client_factory_dup_channel_features (TpSimpleClientFactory *factory,
+empathy_client_factory_dup_channel_features (TpClientFactory *factory,
     TpChannel *channel)
 {
   GArray *features;
@@ -64,7 +64,7 @@ empathy_client_factory_dup_channel_features (TpSimpleClientFactory *factory,
 
   features = chainup->dup_channel_features (factory, channel);
 
-  feature = TP_CHANNEL_FEATURE_CONTACTS;
+  feature = TP_CHANNEL_FEATURE_GROUP;
   g_array_append_val (features, feature);
 
   if (EMPATHY_IS_TP_CHAT (channel))
@@ -80,7 +80,7 @@ empathy_client_factory_dup_channel_features (TpSimpleClientFactory *factory,
 }
 
 static GArray *
-empathy_client_factory_dup_account_features (TpSimpleClientFactory *factory,
+empathy_client_factory_dup_account_features (TpClientFactory *factory,
     TpAccount *account)
 {
   GArray *features;
@@ -101,7 +101,7 @@ empathy_client_factory_dup_account_features (TpSimpleClientFactory *factory,
 }
 
 static GArray *
-empathy_client_factory_dup_connection_features (TpSimpleClientFactory *factory,
+empathy_client_factory_dup_connection_features (TpClientFactory *factory,
     TpConnection *connection)
 {
   GArray *features;
@@ -134,27 +134,40 @@ empathy_client_factory_dup_connection_features (TpSimpleClientFactory *factory,
 }
 
 static GArray *
-empathy_client_factory_dup_contact_features (TpSimpleClientFactory *factory,
+empathy_client_factory_dup_contact_features (TpClientFactory *factory,
         TpConnection *connection)
 {
   GArray *features;
-  TpContactFeature extra_features[] = {
-      TP_CONTACT_FEATURE_ALIAS,
-      TP_CONTACT_FEATURE_PRESENCE,
-      TP_CONTACT_FEATURE_AVATAR_TOKEN,
-      TP_CONTACT_FEATURE_AVATAR_DATA,
-      TP_CONTACT_FEATURE_CAPABILITIES,
-      /* 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. */
-      TP_CONTACT_FEATURE_SUBSCRIPTION_STATES,
-      TP_CONTACT_FEATURE_CONTACT_GROUPS,
-      TP_CONTACT_FEATURE_CLIENT_TYPES,
-  };
+  GQuark feature;
 
   features = chainup->dup_contact_features (factory, connection);
 
-  g_array_append_vals (features, extra_features, G_N_ELEMENTS (extra_features));
+  feature = TP_CONTACT_FEATURE_ALIAS,
+  g_array_append_val (features, feature);
+
+  feature = TP_CONTACT_FEATURE_PRESENCE,
+  g_array_append_val (features, feature);
+
+  feature = TP_CONTACT_FEATURE_AVATAR_TOKEN,
+  g_array_append_val (features, feature);
+
+  feature = TP_CONTACT_FEATURE_AVATAR_DATA,
+  g_array_append_val (features, feature);
+
+  feature = TP_CONTACT_FEATURE_CAPABILITIES,
+  g_array_append_val (features, feature);
+
+  /* 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);
+
+  feature = TP_CONTACT_FEATURE_CONTACT_GROUPS,
+  g_array_append_val (features, feature);
+
+  feature = TP_CONTACT_FEATURE_CLIENT_TYPES,
+  g_array_append_val (features, feature);
 
   return features;
 }
@@ -162,7 +175,7 @@ empathy_client_factory_dup_contact_features (TpSimpleClientFactory *factory,
 static void
 empathy_client_factory_class_init (EmpathyClientFactoryClass *cls)
 {
-  TpSimpleClientFactoryClass *simple_class = (TpSimpleClientFactoryClass *) cls;
+  TpClientFactoryClass *simple_class = (TpClientFactoryClass *) cls;
 
   simple_class->create_channel = empathy_client_factory_create_channel;
   simple_class->dup_channel_features =
@@ -263,10 +276,10 @@ empathy_client_factory_dup_contact_by_id_async (
       empathy_client_factory_dup_contact_by_id_async);
 
   features = empathy_client_factory_dup_contact_features (
-      TP_SIMPLE_CLIENT_FACTORY (self), connection);
+      TP_CLIENT_FACTORY (self), connection);
 
-  tp_connection_dup_contact_by_id_async (connection, id, features->len,
-      (TpContactFeature * ) features->data, dup_contact_cb, result);
+  tp_connection_dup_contact_by_id_async (connection, id,
+      (const GQuark *) features->data, dup_contact_cb, result);
 
   g_array_unref (features);
 }
diff --git a/libempathy/empathy-connection-aggregator.c b/libempathy/empathy-connection-aggregator.c
index 763715f..5bdcd7e 100644
--- a/libempathy/empathy-connection-aggregator.c
+++ b/libempathy/empathy-connection-aggregator.c
@@ -157,12 +157,12 @@ add_account (EmpathyConnectionAggregator *self,
 }
 
 static void
-account_validity_changed_cb (TpAccountManager *manager,
+account_usability_changed_cb (TpAccountManager *manager,
     TpAccount *account,
-    gboolean valid,
+    gboolean usable,
     EmpathyConnectionAggregator *self)
 {
-  if (valid)
+  if (usable)
     add_account (self, account);
 }
 
@@ -182,7 +182,7 @@ am_prepare_cb (GObject *source,
       goto out;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (self->priv->mgr);
+  accounts = tp_account_manager_dup_usable_accounts (self->priv->mgr);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       TpAccount *account = l->data;
@@ -190,8 +190,8 @@ am_prepare_cb (GObject *source,
       add_account (self, account);
     }
 
-  tp_g_signal_connect_object (self->priv->mgr, "account-validity-changed",
-      G_CALLBACK (account_validity_changed_cb), self, 0);
+  tp_g_signal_connect_object (self->priv->mgr, "account-usability-changed",
+      G_CALLBACK (account_usability_changed_cb), self, 0);
 
   g_list_free_full (accounts, g_object_unref);
 
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index d228480..e543820 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -761,11 +761,11 @@ empathy_contact_from_tpl_contact (TpAccount *account,
       conn = tp_account_get_connection (account);
       if (conn != NULL)
         {
-          TpContactFeature features[] = { TP_CONTACT_FEATURE_CAPABILITIES };
+          GQuark features[] = { TP_CONTACT_FEATURE_CAPABILITIES, 0 };
           conn = tp_account_get_connection (account);
 
           tp_connection_dup_contact_by_id_async (conn, id,
-              G_N_ELEMENTS (features), features, get_contacts_cb,
+              features, get_contacts_cb,
               tp_weak_ref_new (retval, NULL, NULL));
         }
     }
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index ab683c7..368ea5b 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -348,8 +348,8 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
         * If the way EmpathyContact stores the avatar is changes, it might not be
         * needed anymore any TpAccount passing and the following call will be
         * useless */
-       account = tp_simple_client_factory_ensure_account (
-                       TP_SIMPLE_CLIENT_FACTORY (factory),
+       account = tp_client_factory_ensure_account (
+                       TP_CLIENT_FACTORY (factory),
                        tpl_event_get_account_path (logevent), NULL, NULL);
        g_object_unref (factory);
 
@@ -681,7 +681,7 @@ empathy_message_new_from_tp_message (TpMessage *tp_msg,
 
        g_return_val_if_fail (TP_IS_MESSAGE (tp_msg), NULL);
 
-       body = tp_message_to_text (tp_msg, NULL);
+       body = tp_message_to_text (tp_msg);
 
        timestamp = tp_message_get_sent_timestamp (tp_msg);
        if (timestamp == 0)
diff --git a/libempathy/empathy-presence-manager.c b/libempathy/empathy-presence-manager.c
index a6aca1a..b2127da 100644
--- a/libempathy/empathy-presence-manager.c
+++ b/libempathy/empathy-presence-manager.c
@@ -425,7 +425,7 @@ account_manager_ready_cb (GObject *source_object,
   most_available_presence_changed (account_manager, state, status,
     status_message, self);
 
-  accounts = tp_account_manager_dup_valid_accounts (self->priv->manager);
+  accounts = tp_account_manager_dup_usable_accounts (self->priv->manager);
   for (l = accounts; l != NULL; l = l->next)
     {
       tp_g_signal_connect_object (l->data, "status-changed",
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 6d2d0a9..6bd4bf6 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -151,7 +151,7 @@ create_conference_cb (GObject *source,
   GError *error = NULL;
   GHashTable *props;
 
-  channel = tp_account_channel_request_create_and_observe_channel_finish (
+  channel = tp_account_channel_request_create_channel_finish (
       TP_ACCOUNT_CHANNEL_REQUEST (source), result, &error);
   if (channel == NULL)
     {
@@ -224,7 +224,7 @@ empathy_tp_chat_add (EmpathyTpChat *self,
 
       /* Although this is a MUC, it's anonymous, so CreateChannel is
        * valid. */
-      tp_account_channel_request_create_and_observe_channel_async (req,
+      tp_account_channel_request_create_channel_async (req,
           EMPATHY_CHAT_BUS_NAME, NULL, create_conference_cb, NULL);
 
       g_object_unref (req);
@@ -390,7 +390,7 @@ handle_incoming_message (EmpathyTpChat *self,
       return;
     }
 
-  message_body = tp_message_to_text (message, NULL);
+  message_body = tp_message_to_text (message);
 
   DEBUG ("Message %s (channel %s): %s",
     pending ? "pending" : "received",
@@ -459,7 +459,7 @@ message_sent_cb (TpTextChannel *channel,
 {
   gchar *message_body;
 
-  message_body = tp_message_to_text (message, NULL);
+  message_body = tp_message_to_text (message);
 
   DEBUG ("Message sent: %s", message_body);
 
@@ -1093,7 +1093,7 @@ empathy_tp_chat_init (EmpathyTpChat *self)
 }
 
 EmpathyTpChat *
-empathy_tp_chat_new (TpSimpleClientFactory *factory,
+empathy_tp_chat_new (TpClientFactory *factory,
     TpConnection *conn,
     const gchar *object_path,
     const GHashTable *immutable_properties)
@@ -1157,7 +1157,7 @@ empathy_tp_chat_send (EmpathyTpChat *self,
   g_return_if_fail (EMPATHY_IS_TP_CHAT (self));
   g_return_if_fail (TP_IS_CLIENT_MESSAGE (message));
 
-  message_body = tp_message_to_text (message, NULL);
+  message_body = tp_message_to_text (message);
 
   DEBUG ("Sending message: %s", message_body);
 
@@ -1251,7 +1251,7 @@ empathy_tp_chat_is_invited (EmpathyTpChat *self,
   if (self_contact == NULL)
     return FALSE;
 
-  return tp_channel_group_get_local_pending_contact_info (channel,
+  return tp_channel_group_get_local_pending_info (channel,
       self_contact, inviter, NULL, NULL);
 }
 
@@ -1331,7 +1331,7 @@ continue_preparing (EmpathyTpChat *self)
       create_self_contact (self, contact);
 
       /* Get initial member contacts */
-      contacts = tp_channel_group_dup_members_contacts (channel);
+      contacts = tp_channel_group_dup_members (channel);
       add_members_contact (self, contacts);
       g_ptr_array_unref (contacts);
 
diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h
index 20fb4e1..d0b1056 100644
--- a/libempathy/empathy-tp-chat.h
+++ b/libempathy/empathy-tp-chat.h
@@ -62,7 +62,7 @@ GQuark empathy_tp_chat_get_feature_ready (void) G_GNUC_CONST;
 
 GType empathy_tp_chat_get_type (void) G_GNUC_CONST;
 
-EmpathyTpChat * empathy_tp_chat_new (TpSimpleClientFactory *factory,
+EmpathyTpChat * empathy_tp_chat_new (TpClientFactory *factory,
     TpConnection *connection,
     const gchar *object_path,
     const GHashTable *immutable_properties);
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e834937..d377233 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -101,7 +101,7 @@ empathy_init (void)
   initialized = TRUE;
 
   factory = empathy_client_factory_dup ();
-  am = tp_account_manager_new_with_factory (TP_SIMPLE_CLIENT_FACTORY (factory));
+  am = tp_account_manager_new_with_factory (TP_CLIENT_FACTORY (factory));
   tp_account_manager_set_default (am);
 
   g_object_unref (factory);
@@ -419,7 +419,7 @@ empathy_account_manager_get_accounts_connected (gboolean *connecting)
           TP_ACCOUNT_MANAGER_FEATURE_CORE)))
     g_critical (G_STRLOC ": %s called before AccountManager ready", G_STRFUNC);
 
-  accounts = tp_account_manager_dup_valid_accounts (manager);
+  accounts = tp_account_manager_dup_usable_accounts (manager);
 
   for (l = accounts; l != NULL; l = l->next)
     {
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c
index 772e686..1375ea8 100644
--- a/src/empathy-accounts-common.c
+++ b/src/empathy-accounts-common.c
@@ -38,7 +38,7 @@ empathy_accounts_has_non_salut_accounts (TpAccountManager *manager)
   gboolean ret = FALSE;
   GList *accounts, *l;
 
-  accounts = tp_account_manager_dup_valid_accounts (manager);
+  accounts = tp_account_manager_dup_usable_accounts (manager);
 
   for (l = accounts ; l != NULL; l = g_list_next (l))
     {
@@ -60,7 +60,7 @@ empathy_accounts_has_accounts (TpAccountManager *manager)
   GList *accounts;
   gboolean has_accounts;
 
-  accounts = tp_account_manager_dup_valid_accounts (manager);
+  accounts = tp_account_manager_dup_usable_accounts (manager);
   has_accounts = (accounts != NULL);
   g_list_free_full (accounts, g_object_unref);
 
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 76b460a..9cd45ca 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -869,7 +869,7 @@ accounts_dialog_button_add_clicked_cb (GtkWidget *button,
           EMPATHY_NEW_ACCOUNT_DIALOG (dialog));
 
       /* The newly created account has already been added by
-       * accounts_dialog_account_validity_changed_cb so we just
+       * accounts_dialog_account_usability_changed_cb so we just
        * have to select it. */
       account = tpaw_account_settings_get_account (settings);
       accounts_dialog_model_set_selected (self, account);
@@ -1235,7 +1235,7 @@ accounts_dialog_remove_account_iter (EmpathyAccountsDialog *dialog,
 
   gtk_tree_model_get (model, iter, COL_ACCOUNT, &account, -1);
 
-  if (account == NULL || !tp_account_is_valid (account))
+  if (account == NULL || !tp_account_is_usable (account))
     {
       if (account != NULL)
         g_object_unref (account);
@@ -1908,9 +1908,9 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
 }
 
 static void
-accounts_dialog_account_validity_changed_cb (TpAccountManager *manager,
+accounts_dialog_account_usability_changed_cb (TpAccountManager *manager,
     TpAccount *account,
-    gboolean valid,
+    gboolean usable,
     EmpathyAccountsDialog *dialog)
 {
   accounts_dialog_add_account (dialog, account);
@@ -2183,8 +2183,8 @@ accounts_dialog_accounts_setup (EmpathyAccountsDialog *dialog)
   EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
   GList *accounts, *l;
 
-  g_signal_connect (priv->account_manager, "account-validity-changed",
-      G_CALLBACK (accounts_dialog_account_validity_changed_cb),
+  g_signal_connect (priv->account_manager, "account-usability-changed",
+      G_CALLBACK (accounts_dialog_account_usability_changed_cb),
       dialog);
   g_signal_connect (priv->account_manager, "account-removed",
       G_CALLBACK (accounts_dialog_account_removed_cb),
@@ -2197,7 +2197,7 @@ accounts_dialog_accounts_setup (EmpathyAccountsDialog *dialog)
       dialog);
 
   /* Add existing accounts */
-  accounts = tp_account_manager_dup_valid_accounts (priv->account_manager);
+  accounts = tp_account_manager_dup_usable_accounts (priv->account_manager);
   for (l = accounts; l; l = l->next)
     {
       accounts_dialog_add_account (dialog, l->data);
diff --git a/src/empathy-accounts.c b/src/empathy-accounts.c
index 60bba82..0bde0a6 100644
--- a/src/empathy-accounts.c
+++ b/src/empathy-accounts.c
@@ -67,7 +67,7 @@ find_account (TpAccountManager *mgr,
   GList *accounts, *l;
   TpAccount *found = NULL;
 
-  accounts = tp_account_manager_dup_valid_accounts (mgr);
+  accounts = tp_account_manager_dup_usable_accounts (mgr);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       if (!tp_strdiff (tp_proxy_get_object_path (l->data), path))
diff --git a/src/empathy-auth-client.c b/src/empathy-auth-client.c
index be5b13a..2097142 100644
--- a/src/empathy-auth-client.c
+++ b/src/empathy-auth-client.c
@@ -279,7 +279,7 @@ main (int argc,
   GError *error = NULL;
   EmpathyAuthFactory *factory;
   TpDebugSender *debug_sender;
-  TpSimpleClientFactory *tp_factory;
+  TpClientFactory *tp_factory;
   TpDBusDaemon *dbus;
 
   context = g_option_context_new (N_(" - Empathy authentication client"));
@@ -316,8 +316,8 @@ main (int argc,
 #endif
 
   dbus = tp_dbus_daemon_dup (NULL);
-  tp_factory = tp_simple_client_factory_new (dbus);
-  tp_simple_client_factory_add_account_features_varargs (tp_factory,
+  tp_factory = tp_client_factory_new (dbus);
+  tp_client_factory_add_account_features_varargs (tp_factory,
       TP_ACCOUNT_FEATURE_STORAGE,
       0);
 
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index b496356..ac63442 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -2206,8 +2206,8 @@ chat_window_drag_data_received (GtkWidget *widget,
           account_id = strv[0];
           contact_id = strv[1];
 
-          account = tp_simple_client_factory_ensure_account (
-              TP_SIMPLE_CLIENT_FACTORY (factory), account_id, NULL, NULL);
+          account = tp_client_factory_ensure_account (
+              TP_CLIENT_FACTORY (factory), account_id, NULL, NULL);
 
           g_object_unref (factory);
           if (account != NULL)
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index ec59813..8d25a20 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -784,7 +784,7 @@ get_cm_display_name (EmpathyDebugWindow *self,
   GList *accounts, *ptr;
   char *retval;
 
-  accounts = tp_account_manager_dup_valid_accounts (self->priv->am);
+  accounts = tp_account_manager_dup_usable_accounts (self->priv->am);
 
   for (ptr = accounts; ptr != NULL; ptr = ptr->next)
     {
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index f7b4b4f..2decd9d 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -717,7 +717,7 @@ display_invite_room_dialog (EventManagerApproval *approval)
   EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager);
 
   self_contact = tp_channel_group_get_self_contact (approval->main_channel);
-  tp_channel_group_get_local_pending_contact_info (approval->main_channel,
+  tp_channel_group_get_local_pending_info (approval->main_channel,
       self_contact, NULL, NULL, &invite_msg);
 
   if (approval->contact != NULL)
diff --git a/src/empathy-import-pidgin.c b/src/empathy-import-pidgin.c
index bd05753..11baf4f 100644
--- a/src/empathy-import-pidgin.c
+++ b/src/empathy-import-pidgin.c
@@ -142,7 +142,7 @@ import_dialog_pidgin_parse_setting (EmpathyImportAccountData *data,
       if (!empathy_import_protocol_is_supported (data->protocol, &cm))
         return;
 
-      proto = tp_connection_manager_get_protocol_object (cm, data->protocol);
+      proto = tp_connection_manager_get_protocol (cm, data->protocol);
       param = tp_protocol_get_param (proto, item->cm_name);
       signature = tp_connection_manager_param_get_dbus_signature (param);
       signature_i = (int) (*signature);
diff --git a/src/empathy-import-widget.c b/src/empathy-import-widget.c
index 708370b..0ce490d 100644
--- a/src/empathy-import-widget.c
+++ b/src/empathy-import-widget.c
@@ -119,7 +119,7 @@ import_widget_add_accounts_to_model (EmpathyImportWidget *self)
 
       value = g_hash_table_lookup (data->settings, "account");
 
-      accounts = tp_account_manager_dup_valid_accounts (manager);
+      accounts = tp_account_manager_dup_usable_accounts (manager);
 
       /* Only set the "Import" cell to be active if there isn't already an
        * account set up with the same account id. */
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 7f46cb4..9bfbfae 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -362,7 +362,7 @@ new_chatroom_dialog_select_last_account (GSettings *gsettings,
 {
   const gchar *account_path;
   TpAccountManager *manager;
-  TpSimpleClientFactory *factory;
+  TpClientFactory *factory;
   TpAccount *account;
   TpConnectionStatus status;
 
@@ -372,7 +372,7 @@ new_chatroom_dialog_select_last_account (GSettings *gsettings,
 
   manager =  tp_account_manager_dup ();
   factory = tp_proxy_get_factory (manager);
-  account = tp_simple_client_factory_ensure_account (factory, account_path,
+  account = tp_client_factory_ensure_account (factory, account_path,
       NULL, NULL);
 
   if (account != NULL)
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index b7b1a7b..e92622a 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -610,8 +610,8 @@ preferences_preview_theme_changed_cb (EmpathyThemeManager *manager,
         * conversation */
        factory = empathy_client_factory_dup ();
 
-       account = tp_simple_client_factory_ensure_account (
-               TP_SIMPLE_CLIENT_FACTORY (factory),
+       account = tp_client_factory_ensure_account (
+               TP_CLIENT_FACTORY (factory),
                TP_ACCOUNT_OBJECT_PATH_BASE "cm/jabber/account", NULL, NULL);
        juliet = g_object_new (EMPATHY_TYPE_CONTACT,
                "account", account,
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 8319227..6e4a463 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -427,7 +427,7 @@ can_add_contact (EmpathyRosterWindow *self)
   GList *accounts, *l;
   gboolean result = FALSE;
 
-  accounts = tp_account_manager_dup_valid_accounts (
+  accounts = tp_account_manager_dup_usable_accounts (
       self->priv->account_manager);
   for (l = accounts; l != NULL && !result; l = g_list_next (l))
     {
@@ -1288,8 +1288,8 @@ roster_window_join_chatroom_menu_activate_cb (GSimpleAction *action,
 
   factory = empathy_client_factory_dup ();
 
-  account = tp_simple_client_factory_ensure_account (
-      TP_SIMPLE_CLIENT_FACTORY (factory), path, NULL, &error);
+  account = tp_client_factory_ensure_account (
+      TP_CLIENT_FACTORY (factory), path, NULL, &error);
   if (account == NULL)
     {
       DEBUG ("Failed to get account '%s': %s", path, error->message);
@@ -1680,7 +1680,7 @@ set_notebook_page (EmpathyRosterWindow *self)
 
   gtk_spinner_stop (GTK_SPINNER (self->priv->spinner_loading));
 
-  accounts = tp_account_manager_dup_valid_accounts (
+  accounts = tp_account_manager_dup_usable_accounts (
       self->priv->account_manager);
 
   len = g_list_length (accounts);
@@ -1742,12 +1742,12 @@ out:
 }
 
 static void
-roster_window_account_validity_changed_cb (TpAccountManager  *manager,
+roster_window_account_usability_changed_cb (TpAccountManager  *manager,
     TpAccount *account,
-    gboolean valid,
+    gboolean usable,
     EmpathyRosterWindow *self)
 {
-  if (valid)
+  if (usable)
     add_account (self, account);
   else
     roster_window_account_removed_cb (manager, account, self);
@@ -1822,7 +1822,7 @@ account_manager_prepared_cb (GObject *source_object,
       return;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (
+  accounts = tp_account_manager_dup_usable_accounts (
       self->priv->account_manager);
   for (j = accounts; j != NULL; j = j->next)
     {
@@ -1831,8 +1831,8 @@ account_manager_prepared_cb (GObject *source_object,
       add_account (self, account);
     }
 
-  g_signal_connect (manager, "account-validity-changed",
-      G_CALLBACK (roster_window_account_validity_changed_cb), self);
+  g_signal_connect (manager, "account-usability-changed",
+      G_CALLBACK (roster_window_account_usability_changed_cb), self);
   tp_g_signal_connect_object (manager, "account-removed",
       G_CALLBACK (account_removed_cb), self, 0);
   tp_g_signal_connect_object (manager, "account-disabled",
@@ -2460,8 +2460,8 @@ empathy_roster_window_init (EmpathyRosterWindow *self)
   tp_g_signal_connect_object (self->priv->event_manager, "event-removed",
       G_CALLBACK (roster_window_event_removed_cb), self, 0);
 
-  g_signal_connect (self->priv->account_manager, "account-validity-changed",
-      G_CALLBACK (roster_window_account_validity_changed_cb), self);
+  g_signal_connect (self->priv->account_manager, "account-usability-changed",
+      G_CALLBACK (roster_window_account_usability_changed_cb), self);
   g_signal_connect (self->priv->account_manager, "account-removed",
       G_CALLBACK (roster_window_account_removed_cb), self);
   g_signal_connect (self->priv->account_manager, "account-disabled",
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c
index a1a097d..80c9514 100644
--- a/src/empathy-sanity-cleaning.c
+++ b/src/empathy-sanity-cleaning.c
@@ -121,7 +121,7 @@ fix_xmpp_account_priority (TpAccountManager *am)
 {
   GList *accounts, *l;
 
-  accounts = tp_account_manager_dup_valid_accounts (am);
+  accounts = tp_account_manager_dup_usable_accounts (am);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       TpAccount *account = l->data;
@@ -160,7 +160,7 @@ set_facebook_account_fallback_server (TpAccountManager *am)
 {
   GList *accounts, *l;
 
-  accounts = tp_account_manager_dup_valid_accounts (am);
+  accounts = tp_account_manager_dup_usable_accounts (am);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       TpAccount *account = l->data;
@@ -538,7 +538,7 @@ migrate_accounts_to_uoa (SanityCtx *ctx)
 
   manager = tpaw_uoa_manager_dup ();
 
-  accounts = tp_account_manager_dup_valid_accounts (ctx->am);
+  accounts = tp_account_manager_dup_usable_accounts (ctx->am);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       TpAccount *account = l->data;
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 2f71fa1..3af2822 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -432,7 +432,7 @@ account_manager_prepared_cb (GObject *source_object,
                return;
        }
 
-       list = tp_account_manager_dup_valid_accounts (account_manager);
+       list = tp_account_manager_dup_usable_accounts (account_manager);
        for (l = list; l != NULL; l = l->next) {
                tp_g_signal_connect_object (l->data, "status-changed",
                                             G_CALLBACK (status_icon_status_changed_cb),
diff --git a/src/empathy.c b/src/empathy.c
index 0d3c694..54e6fa7 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -708,7 +708,7 @@ account_manager_chatroom_ready_cb (GObject *source_object,
       return;
     }
 
-  accounts = tp_account_manager_dup_valid_accounts (account_manager);
+  accounts = tp_account_manager_dup_usable_accounts (account_manager);
 
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
@@ -805,8 +805,8 @@ add_empathy_features (void)
 
   factory = empathy_client_factory_dup ();
 
-  tp_simple_client_factory_add_connection_features_varargs (
-      TP_SIMPLE_CLIENT_FACTORY (factory),
+  tp_client_factory_add_connection_features_varargs (
+      TP_CLIENT_FACTORY (factory),
       /* empathy_connection_aggregator_get_all_groups(), used by
        * EmpathyGroupsWidget relies on it */
       TP_CONNECTION_FEATURE_CONTACT_GROUPS,
diff --git a/tests/interactive/test-empathy-contact-blocking-dialog.c 
b/tests/interactive/test-empathy-contact-blocking-dialog.c
index a478c05..f59567d 100644
--- a/tests/interactive/test-empathy-contact-blocking-dialog.c
+++ b/tests/interactive/test-empathy-contact-blocking-dialog.c
@@ -56,8 +56,8 @@ main (int argc,
      * so we prepare it first. */
     factory = empathy_client_factory_dup ();
 
-    tp_simple_client_factory_add_connection_features_varargs (
-        TP_SIMPLE_CLIENT_FACTORY (factory),
+    tp_client_factory_add_connection_features_varargs (
+        TP_CLIENT_FACTORY (factory),
         TP_CONNECTION_FEATURE_CONTACT_LIST,
         NULL);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]