From e66980c8e05c9c31f2591d683a077fab385179d8 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 18 May 2012 20:03:39 +0200 Subject: [PATCH] Deprecate tp_account_ensure_connection() https://bugs.freedesktop.org/show_bug.cgi?id=49372 --- telepathy-glib/account.c | 2 ++ telepathy-glib/account.h | 3 +++ telepathy-glib/base-client.c | 9 ++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 62a1fbb..88f13d2 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -2180,6 +2180,8 @@ tp_account_get_connection (TpAccount *account) * the object path @path is invalid or it is the null-value "/" * * Since: 0.9.0 + * Deprecated: New code should use tp_simple_client_factory_ensure_connection() + * instead. **/ TpConnection * tp_account_ensure_connection (TpAccount *account, diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h index f77340f..d1f5684 100644 --- a/telepathy-glib/account.h +++ b/telepathy-glib/account.h @@ -96,8 +96,11 @@ void tp_account_init_known_interfaces (void); TpConnection *tp_account_get_connection (TpAccount *account); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_connection) TpConnection *tp_account_ensure_connection (TpAccount *account, const gchar *path); +#endif const gchar *tp_account_get_display_name (TpAccount *account); diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c index 0704e2e..bd4e2ed 100644 --- a/telepathy-glib/base-client.c +++ b/telepathy-glib/base-client.c @@ -1729,7 +1729,8 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface, if (account == NULL) goto out; - connection = tp_account_ensure_connection (account, connection_path); + connection = tp_simple_client_factory_ensure_connection (self->priv->factory, + connection_path, NULL, NULL); if (connection == NULL) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, @@ -1949,7 +1950,8 @@ _tp_base_client_add_dispatch_operation (TpSvcClientApprover *iface, goto out; } - connection = tp_account_ensure_connection (account, path); + connection = tp_simple_client_factory_ensure_connection (self->priv->factory, + path, NULL, NULL); if (connection == NULL) { DEBUG ("Failed to create TpConnection"); @@ -2312,7 +2314,8 @@ _tp_base_client_handle_channels (TpSvcClientHandler *iface, if (account == NULL) goto out; - connection = tp_account_ensure_connection (account, connection_path); + connection = tp_simple_client_factory_ensure_connection (self->priv->factory, + connection_path, NULL, NULL); if (connection == NULL) { DEBUG ("Failed to create TpConnection"); -- 1.7.9.5