telepathy-glib: Deprecate tp_connection_get_contact(_list)_attributes

Xavier Claessens xclaesse at kemper.freedesktop.org
Thu May 10 07:31:35 PDT 2012


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

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Thu May 10 12:37:05 2012 +0200

Deprecate tp_connection_get_contact(_list)_attributes

Contact attributes is an internal concept that should not appear
in our API.

---

 telepathy-glib/connection-contact-list.c |    4 ++--
 telepathy-glib/connection-handles.c      |    4 ++++
 telepathy-glib/connection.h              |    5 +++++
 telepathy-glib/contact.c                 |    5 ++---
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/telepathy-glib/connection-contact-list.c b/telepathy-glib/connection-contact-list.c
index 9b06784..a0650a2 100644
--- a/telepathy-glib/connection-contact-list.c
+++ b/telepathy-glib/connection-contact-list.c
@@ -314,8 +314,8 @@ prepare_roster (TpConnection *self,
   supported_interfaces = _tp_contacts_bind_to_signals (self, features->len,
       (TpContactFeature *) features->data);
 
-  tp_connection_get_contact_list_attributes (self, -1,
-      supported_interfaces, TRUE,
+  tp_cli_connection_interface_contact_list_call_get_contact_list_attributes (
+      self, -1, supported_interfaces, TRUE,
       got_contact_list_attributes_cb,
       features, (GDestroyNotify) g_array_unref,
       result ? g_object_ref (result) : NULL);
diff --git a/telepathy-glib/connection-handles.c b/telepathy-glib/connection-handles.c
index 248b98a..d33701a 100644
--- a/telepathy-glib/connection-handles.c
+++ b/telepathy-glib/connection-handles.c
@@ -401,6 +401,8 @@ tp_connection_request_handles (TpConnection *self,
  *
  * If @hold is %TRUE, the @callback is given one reference to each handle
  * that appears as a key in the callback's @attributes parameter.
+ *
+ * Deprecated: Use tp_simple_client_factory_ensure_contact() instead.
  */
 void
 tp_connection_get_contact_attributes (TpConnection *self,
@@ -472,6 +474,8 @@ tp_connection_get_contact_attributes (TpConnection *self,
  *
  * If @hold is %TRUE, the @callback is given a reference to each handle
  * that appears as a key in the callback's @attributes parameter.
+ *
+ * Deprecated: Use tp_connection_dup_contact_list() instead.
  */
 void
 tp_connection_get_contact_list_attributes (TpConnection *self,
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index 4380928..c6bc5a6 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -336,16 +336,21 @@ G_BEGIN_DECLS
 /* connection-handles.c again - this has to come after the auto-generated
  * stuff because it uses an auto-generated typedef */
 
+#ifndef TP_DISABLE_DEPRECATED
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_contact)
 void tp_connection_get_contact_attributes (TpConnection *self,
     gint timeout_ms, guint n_handles, const TpHandle *handles,
     const gchar * const *interfaces, gboolean hold,
     tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
     gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
 
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_connection_dup_contact_list)
 void tp_connection_get_contact_list_attributes (TpConnection *self,
     gint timeout_ms, const gchar * const *interfaces, gboolean hold,
     tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
     gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
+#endif
+
 GBinding *tp_connection_bind_connection_status_to_property (TpConnection *self,
     gpointer target, const char *target_property, gboolean invert);
 
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 2a2145d..756c39a 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -4047,9 +4047,8 @@ contacts_get_attributes (ContactsContext *context)
   /* The Hold parameter is only true if we started from handles, and we don't
    * already have all the contacts we need. */
   context->refcount++;
-  tp_connection_get_contact_attributes (context->connection, -1,
-      context->handles->len, (const TpHandle *) context->handles->data,
-      supported_interfaces,
+  tp_cli_connection_interface_contacts_call_get_contact_attributes (
+      context->connection, -1, context->handles, supported_interfaces,
       (context->signature == CB_BY_HANDLE && context->contacts->len == 0),
       contacts_got_attributes,
       context, contacts_context_unref, context->weak_object);



More information about the telepathy-commits mailing list