diff options
| author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-05-10 13:50:57 +0200 |
|---|---|---|
| committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-05-10 16:31:23 +0200 |
| commit | 9e6ee0fc8a5f5e07aa006cfc832a469735484849 (patch) | |
| tree | 99636f398451f9896535ac6b7d90da1b66063307 | |
| parent | 80da6b4bcff9068bed0aa7da2c3eb9cd54b31ba1 (diff) | |
Deprecate tp_connection_hold_handles()
Holding handles is not needed with Connection Managers having
immortal handles (any Connection Manager using telepathy-glib >= 0.13.8).
Other Connection Managers are considered deprecated, clients wanting to
still support them should continue using this deprecated function.
| -rw-r--r-- | telepathy-glib/connection-handles.c | 7 | ||||
| -rw-r--r-- | telepathy-glib/connection.h | 3 | ||||
| -rw-r--r-- | telepathy-glib/contact.c | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/telepathy-glib/connection-handles.c b/telepathy-glib/connection-handles.c index f264ef069..8fadb9a9f 100644 --- a/telepathy-glib/connection-handles.c +++ b/telepathy-glib/connection-handles.c @@ -99,6 +99,8 @@ hold_handles_context_free (gpointer p) * For convenience, the handle type and handles requested by the caller are * passed through to this callback on success, so the caller does not have to * include them in @user_data. + * + * Deprecated: See tp_connection_hold_handles(). */ static void @@ -161,6 +163,11 @@ connection_held_handles (TpConnection *self, * reference count of handles; you should not use the RequestHandles, * HoldHandles and GetContactAttributes D-Bus methods directly as well as these * functions. + * + * Deprecated: Holding handles is not needed with Connection Managers having + * immortal handles (any Connection Manager using telepathy-glib >= 0.13.8). + * Other Connection Managers are considered deprecated, clients wanting to + * still support them should continue using this deprecated function. */ void tp_connection_hold_handles (TpConnection *self, diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h index 4f7cea3f3..04506c02e 100644 --- a/telepathy-glib/connection.h +++ b/telepathy-glib/connection.h @@ -231,16 +231,17 @@ GQuark tp_connection_get_feature_quark_contact_info (void) G_GNUC_CONST; /* connection-handles.c */ +#ifndef TP_DISABLE_DEPRECATED typedef void (*TpConnectionHoldHandlesCb) (TpConnection *connection, TpHandleType handle_type, guint n_handles, const TpHandle *handles, const GError *error, gpointer user_data, GObject *weak_object); +_TP_DEPRECATED_IN_UNRELEASED void tp_connection_hold_handles (TpConnection *self, gint timeout_ms, TpHandleType handle_type, guint n_handles, const TpHandle *handles, TpConnectionHoldHandlesCb callback, gpointer user_data, GDestroyNotify destroy, GObject *weak_object); -#ifndef TP_DISABLE_DEPRECATED typedef void (*TpConnectionRequestHandlesCb) (TpConnection *connection, TpHandleType handle_type, guint n_handles, const TpHandle *handles, const gchar * const *ids, diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c index 469543bc4..f86170bb8 100644 --- a/telepathy-glib/contact.c +++ b/telepathy-glib/contact.c @@ -1969,11 +1969,13 @@ contacts_held_one (TpConnection *connection, static void contacts_hold_one (ContactsContext *c) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS c->refcount++; tp_connection_hold_handles (c->connection, -1, TP_HANDLE_TYPE_CONTACT, 1, &g_array_index (c->handles, TpHandle, c->next_index), contacts_held_one, c, contacts_context_unref, c->weak_object); + G_GNUC_END_IGNORE_DEPRECATIONS } @@ -4245,10 +4247,12 @@ tp_connection_get_contacts_by_handle (TpConnection *self, /* After that we'll get the features */ contacts_context_queue_features (context); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS /* but first, we need to hold onto them */ tp_connection_hold_handles (self, -1, TP_HANDLE_TYPE_CONTACT, n_handles, handles, contacts_held_handles, context, contacts_context_unref, weak_object); + G_GNUC_END_IGNORE_DEPRECATIONS } |
