telepathy-glib: Deprecate tp_account_ensure_connection()

Xavier Claessens xclaesse at kemper.freedesktop.org
Wed May 23 01:31:09 PDT 2012


Module: telepathy-glib
Branch: master
Commit: 951c6fcf9292f451d3bd977dc90a01444db2c9f5
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=951c6fcf9292f451d3bd977dc90a01444db2c9f5

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Fri May 18 20:03:39 2012 +0200

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 9190c7b..f4d7704 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -2176,6 +2176,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 ff787b3..4a25f62 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -93,8 +93,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");



More information about the telepathy-commits mailing list