From bdc01458100d7441206cb72aa1057f3f08c5a757 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 9 Feb 2012 14:40:34 +0000 Subject: [PATCH 3/7] Deprecate tp_channel_call_when_ready, tp_connection_call_when_ready Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45842 Signed-off-by: Simon McVittie --- telepathy-glib/channel.c | 9 ++++++--- telepathy-glib/channel.h | 5 +++-- telepathy-glib/connection.c | 9 ++++++--- telepathy-glib/connection.h | 5 +++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c index 3982529..d447c04 100644 --- a/telepathy-glib/channel.c +++ b/telepathy-glib/channel.c @@ -2118,9 +2118,9 @@ finally: * %FALSE if the channel has become invalid. * * Since: 0.7.1 - * Deprecated: 0.11.0: Use tp_connection_call_when_ready, - * or restructure your program in such a way as to avoid re-entering the - * main loop. + * Deprecated: 0.11.0: Use tp_proxy_prepare_async() and re-enter the main + * loop yourself, or restructure your program in such a way as to avoid + * re-entering the main loop. */ gboolean tp_channel_run_until_ready (TpChannel *self, @@ -2235,6 +2235,8 @@ cwr_ready (TpChannel *self, * Signature of a callback passed to tp_channel_call_when_ready(), which * will be called exactly once, when the channel becomes ready or * invalid (whichever happens first) + * + * Deprecated: 0.17.UNRELEASED */ /** @@ -2255,6 +2257,7 @@ cwr_ready (TpChannel *self, * calls @callback from the main loop.) * * Since: 0.7.7 + * Deprecated: 0.17.UNRELEASED: Use tp_proxy_prepare_async() */ void tp_channel_call_when_ready (TpChannel *self, diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h index 597e782..98f6e98 100644 --- a/telepathy-glib/channel.h +++ b/telepathy-glib/channel.h @@ -85,13 +85,14 @@ TpChannel *tp_channel_new_from_properties (TpConnection *conn, #ifndef TP_DISABLE_DEPRECATED gboolean tp_channel_run_until_ready (TpChannel *self, GError **error, GMainLoop **loop) _TP_GNUC_DEPRECATED; -#endif typedef void (*TpChannelWhenReadyCb) (TpChannel *channel, const GError *error, gpointer user_data); void tp_channel_call_when_ready (TpChannel *self, - TpChannelWhenReadyCb callback, gpointer user_data); + TpChannelWhenReadyCb callback, + gpointer user_data) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); +#endif void tp_channel_init_known_interfaces (void); diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c index f91c6b6..79e7b06 100644 --- a/telepathy-glib/connection.c +++ b/telepathy-glib/connection.c @@ -2542,9 +2542,9 @@ tp_connection_get_protocol_name (TpConnection *self) * %FALSE if the connection has become invalid. * * Since: 0.7.1 - * Deprecated: 0.11.0: Use tp_connection_call_when_ready, - * or restructure your program in such a way as to avoid re-entering the - * main loop. + * Deprecated: 0.11.0: Use tp_proxy_prepare_async() and re-enter the main + * loop yourself, or restructure your program in such a way as to avoid + * re-entering the main loop. */ typedef struct { @@ -2977,6 +2977,8 @@ cwr_ready (TpConnection *self, * Signature of a callback passed to tp_connection_call_when_ready(), which * will be called exactly once, when the connection becomes ready or * invalid (whichever happens first) + * + * Deprecated: 0.17.UNRELEASED */ /** @@ -2998,6 +3000,7 @@ cwr_ready (TpConnection *self, * Call tp_cli_connection_call_connect() too, if you want to do that. * * Since: 0.7.7 + * Deprecated: 0.17.UNRELEASED: Use tp_proxy_prepare_async() */ void tp_connection_call_when_ready (TpConnection *self, diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h index 0359070..cb60deb 100644 --- a/telepathy-glib/connection.h +++ b/telepathy-glib/connection.h @@ -158,13 +158,14 @@ gboolean tp_connection_is_ready (TpConnection *self); gboolean tp_connection_run_until_ready (TpConnection *self, gboolean connect, GError **error, GMainLoop **loop) _TP_GNUC_DEPRECATED; -#endif typedef void (*TpConnectionWhenReadyCb) (TpConnection *connection, const GError *error, gpointer user_data); void tp_connection_call_when_ready (TpConnection *self, - TpConnectionWhenReadyCb callback, gpointer user_data); + TpConnectionWhenReadyCb callback, + gpointer user_data) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); +#endif typedef void (*TpConnectionNameListCb) (const gchar * const *names, gsize n, const gchar * const *cms, const gchar * const *protocols, -- 1.7.9.1