From 2cc2520bcfa36c834dab111ebf41637bbfc8371f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 2 May 2012 18:49:08 +0100 Subject: [PATCH 3/9] Use _TP_DEPRECATED_IN_* for most deprecated functions Also make use of TP_DISABLE_DEPRECATED consistent: always wrap deprecated functions, and add deprecation decorators to any wrapped function. --- telepathy-glib/account-channel-request.h | 6 ++-- telepathy-glib/account-manager.h | 14 +++++--- telepathy-glib/account.h | 8 +++-- telepathy-glib/automatic-proxy-factory.h | 11 ++++--- telepathy-glib/base-client.h | 43 +++++++++++++----------- telepathy-glib/basic-proxy-factory.h | 11 ++++--- telepathy-glib/channel-factory-iface.h | 8 +++++ telepathy-glib/channel-request.h | 5 ++- telepathy-glib/channel.h | 52 ++++++++++++++++++------------ telepathy-glib/cm-message.h | 1 + telepathy-glib/connection-manager.h | 8 ++--- telepathy-glib/connection.h | 17 ++++++---- telepathy-glib/dbus.h | 7 ++-- telepathy-glib/debug.h | 13 +++++--- telepathy-glib/errors.h | 8 ++++- telepathy-glib/message.h | 3 ++ telepathy-glib/simple-approver.h | 6 ++-- telepathy-glib/simple-handler.h | 7 ++-- telepathy-glib/simple-observer.h | 7 ++-- telepathy-glib/text-mixin.h | 4 +++ 20 files changed, 156 insertions(+), 83 deletions(-) diff --git a/telepathy-glib/account-channel-request.h b/telepathy-glib/account-channel-request.h index effa1f8..451f6b3 100644 --- a/telepathy-glib/account-channel-request.h +++ b/telepathy-glib/account-channel-request.h @@ -72,10 +72,12 @@ GHashTable * tp_account_channel_request_get_request ( gint64 tp_account_channel_request_get_user_action_time ( TpAccountChannelRequest *self); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16 void tp_account_channel_request_set_channel_factory ( TpAccountChannelRequest *self, - TpClientChannelFactory *factory) _TP_GNUC_DEPRECATED; - + TpClientChannelFactory *factory); +#endif TpChannelRequest * tp_account_channel_request_get_channel_request ( TpAccountChannelRequest *self); diff --git a/telepathy-glib/account-manager.h b/telepathy-glib/account-manager.h index 7df833e..eead17c 100644 --- a/telepathy-glib/account-manager.h +++ b/telepathy-glib/account-manager.h @@ -81,9 +81,11 @@ TpAccountManager *tp_account_manager_dup (void) G_GNUC_WARN_UNUSED_RESULT; void tp_account_manager_init_known_interfaces (void); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_ensure_account) TpAccount *tp_account_manager_ensure_account (TpAccountManager *manager, - const gchar *path) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_ensure_account); + const gchar *path); +#endif GList *tp_account_manager_get_valid_accounts (TpAccountManager *manager) G_GNUC_WARN_UNUSED_RESULT; @@ -106,14 +108,18 @@ TpAccount * tp_account_manager_create_account_finish ( gboolean tp_account_manager_is_prepared (TpAccountManager *manager, GQuark feature); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_async) void tp_account_manager_prepare_async (TpAccountManager *manager, const GQuark *features, GAsyncReadyCallback callback, - gpointer user_data) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); + gpointer user_data); +_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_finish) gboolean tp_account_manager_prepare_finish (TpAccountManager *manager, GAsyncResult *result, - GError **error) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_finish); + GError **error); +#endif void tp_account_manager_enable_restart (TpAccountManager *manager); diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h index 6658e06..10a2b6f 100644 --- a/telepathy-glib/account.h +++ b/telepathy-glib/account.h @@ -225,14 +225,18 @@ const GArray *tp_account_get_avatar_finish (TpAccount *account, gboolean tp_account_is_prepared (TpAccount *account, GQuark feature); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_async) void tp_account_prepare_async (TpAccount *account, const GQuark *features, GAsyncReadyCallback callback, - gpointer user_data) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); + gpointer user_data); +_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_finish) gboolean tp_account_prepare_finish (TpAccount *account, GAsyncResult *result, - GError **error) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_finish); + GError **error); +#endif void tp_account_set_avatar_async (TpAccount *self, const guchar *avatar, diff --git a/telepathy-glib/automatic-proxy-factory.h b/telepathy-glib/automatic-proxy-factory.h index 3fe3b7f..9a135f4 100644 --- a/telepathy-glib/automatic-proxy-factory.h +++ b/telepathy-glib/automatic-proxy-factory.h @@ -58,10 +58,13 @@ GType tp_automatic_proxy_factory_get_type (void); (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_AUTOMATIC_PROXY_FACTORY, \ TpAutomaticProxyFactoryClass)) -TpAutomaticProxyFactory * tp_automatic_proxy_factory_new (void) - _TP_GNUC_DEPRECATED_FOR (tp_automatic_client_factory_new); -TpAutomaticProxyFactory * tp_automatic_proxy_factory_dup (void) - _TP_GNUC_DEPRECATED_FOR (tp_automatic_client_factory_new); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_automatic_client_factory_new) +TpAutomaticProxyFactory * tp_automatic_proxy_factory_new (void); + +_TP_DEPRECATED_IN_0_16_FOR (tp_automatic_client_factory_new) +TpAutomaticProxyFactory * tp_automatic_proxy_factory_dup (void); +#endif G_END_DECLS diff --git a/telepathy-glib/base-client.h b/telepathy-glib/base-client.h index 823a1e8..b9c681a 100644 --- a/telepathy-glib/base-client.h +++ b/telepathy-glib/base-client.h @@ -139,35 +139,39 @@ void tp_base_client_add_handler_capabilities (TpBaseClient *self, void tp_base_client_add_handler_capabilities_varargs (TpBaseClient *self, const gchar *first_token, ...) G_GNUC_NULL_TERMINATED; +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_account_features) void tp_base_client_add_account_features (TpBaseClient *self, - const GQuark *features, gssize n) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_add_account_features); + const GQuark *features, gssize n); +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_account_features_varargs) void tp_base_client_add_account_features_varargs (TpBaseClient *self, - GQuark feature, ...) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_add_account_features_varargs); + GQuark feature, ...); +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_channel_features) void tp_base_client_add_channel_features (TpBaseClient *self, - const GQuark *features, gssize n) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_add_channel_features); -void tp_base_client_add_channel_features_varargs (TpBaseClient *self, - GQuark feature, ...) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_add_channel_features_varargs); + const GQuark *features, gssize n); +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_channel_features_varargs) +void tp_base_client_add_channel_features_varargs (TpBaseClient *self, + GQuark feature, ...); +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_connection_features) void tp_base_client_add_connection_features (TpBaseClient *self, - const GQuark *features, gssize n) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_add_connection_features); -void tp_base_client_add_connection_features_varargs (TpBaseClient *self, - GQuark feature, ...) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_add_connection_features_varargs); + const GQuark *features, gssize n); +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_connection_features_varargs) +void tp_base_client_add_connection_features_varargs (TpBaseClient *self, + GQuark feature, ...); +_TP_DEPRECATED_IN_0_16 void tp_base_client_set_channel_factory (TpBaseClient *self, - TpClientChannelFactory *factory) _TP_GNUC_DEPRECATED; + TpClientChannelFactory *factory); +_TP_DEPRECATED_IN_0_16 TpClientChannelFactory *tp_base_client_get_channel_factory ( - TpBaseClient *self) _TP_GNUC_DEPRECATED; + TpBaseClient *self); +#endif typedef void (*TpBaseClientDelegatedChannelsCb) ( TpBaseClient *client, @@ -213,8 +217,11 @@ gboolean tp_base_client_get_uniquify_name (TpBaseClient *self); const gchar *tp_base_client_get_bus_name (TpBaseClient *self); const gchar *tp_base_client_get_object_path (TpBaseClient *self); TpDBusDaemon *tp_base_client_get_dbus_daemon (TpBaseClient *self); -TpAccountManager *tp_base_client_get_account_manager (TpBaseClient *self) - _TP_GNUC_DEPRECATED; + +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16 +TpAccountManager *tp_base_client_get_account_manager (TpBaseClient *self); +#endif void tp_base_client_unregister (TpBaseClient *self); diff --git a/telepathy-glib/basic-proxy-factory.h b/telepathy-glib/basic-proxy-factory.h index a4e5797..c521d3e 100644 --- a/telepathy-glib/basic-proxy-factory.h +++ b/telepathy-glib/basic-proxy-factory.h @@ -58,12 +58,13 @@ GType tp_basic_proxy_factory_get_type (void); (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_BASIC_PROXY_FACTORY, \ TpBasicProxyFactoryClass)) -TpBasicProxyFactory * tp_basic_proxy_factory_new (void) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_new); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_new) +TpBasicProxyFactory * tp_basic_proxy_factory_new (void); - -TpBasicProxyFactory * tp_basic_proxy_factory_dup (void) - _TP_GNUC_DEPRECATED_FOR (tp_simple_client_factory_new); +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_new) +TpBasicProxyFactory * tp_basic_proxy_factory_dup (void); +#endif G_END_DECLS diff --git a/telepathy-glib/channel-factory-iface.h b/telepathy-glib/channel-factory-iface.h index 6ae303b..aaa16d6 100644 --- a/telepathy-glib/channel-factory-iface.h +++ b/telepathy-glib/channel-factory-iface.h @@ -198,25 +198,33 @@ struct _TpChannelFactoryIfaceClass { GType tp_channel_factory_iface_get_type (void); +_TP_DEPRECATED void tp_channel_factory_iface_close_all (TpChannelFactoryIface *self); +_TP_DEPRECATED void tp_channel_factory_iface_connecting (TpChannelFactoryIface *self); +_TP_DEPRECATED void tp_channel_factory_iface_connected (TpChannelFactoryIface *self); +_TP_DEPRECATED void tp_channel_factory_iface_disconnected (TpChannelFactoryIface *self); +_TP_DEPRECATED void tp_channel_factory_iface_foreach (TpChannelFactoryIface *self, TpChannelFunc func, gpointer data); +_TP_DEPRECATED TpChannelFactoryRequestStatus tp_channel_factory_iface_request ( TpChannelFactoryIface *self, const gchar *chan_type, TpHandleType handle_type, guint handle, gpointer request, TpChannelIface **ret, GError **error); +_TP_DEPRECATED void tp_channel_factory_iface_emit_new_channel (gpointer instance, TpChannelIface *channel, gpointer request); +_TP_DEPRECATED void tp_channel_factory_iface_emit_channel_error (gpointer instance, TpChannelIface *channel, GError *error, gpointer request); diff --git a/telepathy-glib/channel-request.h b/telepathy-glib/channel-request.h index c3f0b76..9cdf379 100644 --- a/telepathy-glib/channel-request.h +++ b/telepathy-glib/channel-request.h @@ -72,8 +72,11 @@ TpChannelRequest *tp_channel_request_new (TpDBusDaemon *bus_daemon, void tp_channel_request_init_known_interfaces (void); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16 void tp_channel_request_set_channel_factory (TpChannelRequest *self, - TpClientChannelFactory *factory) _TP_GNUC_DEPRECATED; + TpClientChannelFactory *factory); +#endif const GHashTable * tp_channel_request_get_immutable_properties ( TpChannelRequest *self); diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h index cf31db6..88df49a 100644 --- a/telepathy-glib/channel.h +++ b/telepathy-glib/channel.h @@ -83,18 +83,20 @@ TpChannel *tp_channel_new_from_properties (TpConnection *conn, GError **error) G_GNUC_WARN_UNUSED_RESULT; #ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_18 gboolean tp_channel_run_until_ready (TpChannel *self, GError **error, - GMainLoop **loop) _TP_GNUC_DEPRECATED; + GMainLoop **loop); typedef void (*TpChannelWhenReadyCb) (TpChannel *channel, const GError *error, gpointer user_data); +_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_prepare_async) void tp_channel_call_when_ready (TpChannel *self, TpChannelWhenReadyCb callback, - gpointer user_data) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); + gpointer user_data); -gboolean tp_channel_is_ready (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_proxy_is_ready); +_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_is_prepared) +gboolean tp_channel_is_ready (TpChannel *self); #endif void tp_channel_init_known_interfaces (void); @@ -106,29 +108,37 @@ const gchar *tp_channel_get_identifier (TpChannel *self); TpConnection *tp_channel_borrow_connection (TpChannel *self); GHashTable *tp_channel_borrow_immutable_properties (TpChannel *self); -TpHandle tp_channel_group_get_self_handle (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_channel_group_get_self_contact); TpChannelGroupFlags tp_channel_group_get_flags (TpChannel *self); -const TpIntset *tp_channel_group_get_members (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_channel_group_dup_members_contacts); -const TpIntset *tp_channel_group_get_local_pending (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_channel_group_dup_local_pending_contacts); -const TpIntset *tp_channel_group_get_remote_pending (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_channel_group_dup_remote_pending_contacts); + +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_get_self_contact) +TpHandle tp_channel_group_get_self_handle (TpChannel *self); + +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_dup_members_contacts) +const TpIntset *tp_channel_group_get_members (TpChannel *self); + +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_dup_local_pending_contacts) +const TpIntset *tp_channel_group_get_local_pending (TpChannel *self); + +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_dup_remote_pending_contacts) +const TpIntset *tp_channel_group_get_remote_pending (TpChannel *self); + +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_get_local_pending_contact_info) gboolean tp_channel_group_get_local_pending_info (TpChannel *self, TpHandle local_pending, TpHandle *actor, - TpChannelGroupChangeReason *reason, const gchar **message) - _TP_GNUC_DEPRECATED_FOR (tp_channel_group_get_local_pending_contact_info); + TpChannelGroupChangeReason *reason, const gchar **message); -TpHandle tp_channel_group_get_handle_owner (TpChannel *self, TpHandle handle) - _TP_GNUC_DEPRECATED_FOR (tp_channel_group_get_contact_owner); +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_get_contact_owner) +TpHandle tp_channel_group_get_handle_owner (TpChannel *self, TpHandle handle); -gboolean tp_channel_get_requested (TpChannel *self); +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_get_initiator_contact) +TpHandle tp_channel_get_initiator_handle (TpChannel *self); -TpHandle tp_channel_get_initiator_handle (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_channel_get_initiator_contact); -const gchar * tp_channel_get_initiator_identifier (TpChannel *self) - _TP_GNUC_DEPRECATED_FOR (tp_channel_get_initiator_contact); +_TP_DEPRECATED_IN_0_20_FOR (tp_channel_get_initiator_contact) +const gchar * tp_channel_get_initiator_identifier (TpChannel *self); +#endif + +gboolean tp_channel_get_requested (TpChannel *self); #define TP_CHANNEL_FEATURE_CORE \ tp_channel_get_feature_quark_core () diff --git a/telepathy-glib/cm-message.h b/telepathy-glib/cm-message.h index ac376b6..201c94d 100644 --- a/telepathy-glib/cm-message.h +++ b/telepathy-glib/cm-message.h @@ -63,6 +63,7 @@ void tp_cm_message_set_sender (TpMessage *self, TpHandle handle); #ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED TpMessage *tp_message_new (TpBaseConnection *connection, guint initial_parts, guint size_hint) G_GNUC_WARN_UNUSED_RESULT; diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h index f90de08..0147405 100644 --- a/telepathy-glib/connection-manager.h +++ b/telepathy-glib/connection-manager.h @@ -127,13 +127,13 @@ GList *tp_list_connection_managers_finish (GAsyncResult *result, typedef void (*TpConnectionManagerWhenReadyCb) (TpConnectionManager *cm, const GError *error, gpointer user_data, GObject *weak_object); +_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_prepare_async) void tp_connection_manager_call_when_ready (TpConnectionManager *self, TpConnectionManagerWhenReadyCb callback, - gpointer user_data, GDestroyNotify destroy, GObject *weak_object) - _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); + gpointer user_data, GDestroyNotify destroy, GObject *weak_object); -gboolean tp_connection_manager_is_ready (TpConnectionManager *self) - _TP_GNUC_DEPRECATED_FOR (tp_proxy_is_prepared); +_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_is_prepared) +gboolean tp_connection_manager_is_ready (TpConnectionManager *self); #endif const gchar *tp_connection_manager_get_name (TpConnectionManager *self); diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h index 10b5d9e..177e540 100644 --- a/telepathy-glib/connection.h +++ b/telepathy-glib/connection.h @@ -136,8 +136,11 @@ const gchar *tp_connection_get_connection_manager_name (TpConnection *self); const gchar *tp_connection_get_protocol_name (TpConnection *self); -TpHandle tp_connection_get_self_handle (TpConnection *self) - _TP_GNUC_DEPRECATED_FOR (tp_connection_get_self_contact); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_20_FOR (tp_connection_get_self_contact) +TpHandle tp_connection_get_self_handle (TpConnection *self); +#endif + TpContact *tp_connection_get_self_contact (TpConnection *self); TpCapabilities * tp_connection_get_capabilities (TpConnection *self); @@ -154,19 +157,21 @@ gboolean tp_connection_set_contact_info_finish (TpConnection *self, GAsyncResult *result, GError **error); #ifndef TP_DISABLE_DEPRECATED -gboolean tp_connection_is_ready (TpConnection *self) - _TP_GNUC_DEPRECATED_FOR (tp_proxy_is_prepared); +_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_is_prepared) +gboolean tp_connection_is_ready (TpConnection *self); +_TP_DEPRECATED_IN_0_18 gboolean tp_connection_run_until_ready (TpConnection *self, gboolean connect, GError **error, - GMainLoop **loop) _TP_GNUC_DEPRECATED; + GMainLoop **loop); typedef void (*TpConnectionWhenReadyCb) (TpConnection *connection, const GError *error, gpointer user_data); +_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_prepare_async) void tp_connection_call_when_ready (TpConnection *self, TpConnectionWhenReadyCb callback, - gpointer user_data) _TP_GNUC_DEPRECATED_FOR (tp_proxy_prepare_async); + gpointer user_data); #endif typedef void (*TpConnectionNameListCb) (const gchar * const *names, diff --git a/telepathy-glib/dbus.h b/telepathy-glib/dbus.h index bee7019..53a2606 100644 --- a/telepathy-glib/dbus.h +++ b/telepathy-glib/dbus.h @@ -131,8 +131,11 @@ void tp_asv_set_strv (GHashTable *asv, const gchar *key, gchar **value); void tp_asv_dump (GHashTable *asv); #ifndef TP_DISABLE_DEPRECATED -DBusGConnection * tp_get_bus (void) _TP_GNUC_DEPRECATED; -DBusGProxy * tp_get_bus_proxy (void) _TP_GNUC_DEPRECATED; +_TP_DEPRECATED +DBusGConnection * tp_get_bus (void); + +_TP_DEPRECATED +DBusGProxy * tp_get_bus_proxy (void); #endif G_END_DECLS diff --git a/telepathy-glib/debug.h b/telepathy-glib/debug.h index 1f7a24d..d04e2db 100644 --- a/telepathy-glib/debug.h +++ b/telepathy-glib/debug.h @@ -16,11 +16,14 @@ void tp_debug_timestamped_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer ignored); #ifndef TP_DISABLE_DEPRECATED -void tp_debug_set_flags_from_string (const gchar *flags_string) - _TP_GNUC_DEPRECATED; -void tp_debug_set_flags_from_env (const gchar *var) - _TP_GNUC_DEPRECATED; -void tp_debug_set_all_flags (void) _TP_GNUC_DEPRECATED; +_TP_DEPRECATED +void tp_debug_set_flags_from_string (const gchar *flags_string); + +_TP_DEPRECATED +void tp_debug_set_flags_from_env (const gchar *var); + +_TP_DEPRECATED +void tp_debug_set_all_flags (void); #endif G_END_DECLS diff --git a/telepathy-glib/errors.h b/telepathy-glib/errors.h index a24e69c..73e7da2 100644 --- a/telepathy-glib/errors.h +++ b/telepathy-glib/errors.h @@ -23,12 +23,18 @@ #include +#include + #include #include G_BEGIN_DECLS -GQuark tp_errors_quark (void) G_GNUC_DEPRECATED_FOR(tp_error_quark); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_FOR (TP_ERROR) +GQuark tp_errors_quark (void); +#endif + GQuark tp_error_quark (void); #define TP_ERROR_PREFIX "org.freedesktop.Telepathy.Error" diff --git a/telepathy-glib/message.h b/telepathy-glib/message.h index 395522f..c765615 100644 --- a/telepathy-glib/message.h +++ b/telepathy-glib/message.h @@ -74,12 +74,15 @@ gchar * tp_message_to_text (TpMessage *message, #ifndef TP_DISABLE_DEPRECATED /* Takes a TpCMMessage */ +_TP_DEPRECATED_FOR (tp_cm_message_set_sender) void tp_message_set_handle (TpMessage *self, guint part, const gchar *key, TpHandleType handle_type, TpHandle handle_or_0); +_TP_DEPRECATED_FOR (tp_cm_message_take_message) void tp_message_take_message (TpMessage *self, guint part, const gchar *key, TpMessage *message); +_TP_DEPRECATED_FOR (tp_cm_message_set_sender) void tp_message_ref_handle (TpMessage *self, TpHandleType handle_type, TpHandle handle); #endif diff --git a/telepathy-glib/simple-approver.h b/telepathy-glib/simple-approver.h index a037421..f82a969 100644 --- a/telepathy-glib/simple-approver.h +++ b/telepathy-glib/simple-approver.h @@ -72,13 +72,15 @@ typedef void (*TpSimpleApproverAddDispatchOperationImpl) ( TpAddDispatchOperationContext *context, gpointer user_data); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_approver_new_with_factory) TpBaseClient * tp_simple_approver_new (TpDBusDaemon *dbus, const gchar *name, gboolean uniquify, TpSimpleApproverAddDispatchOperationImpl callback, gpointer user_data, - GDestroyNotify destroy) - _TP_GNUC_DEPRECATED_FOR (tp_simple_approver_new_with_factory); + GDestroyNotify destroy); +#endif TpBaseClient *tp_simple_approver_new_with_am ( TpAccountManager *account_manager, diff --git a/telepathy-glib/simple-handler.h b/telepathy-glib/simple-handler.h index c152906..7589042 100644 --- a/telepathy-glib/simple-handler.h +++ b/telepathy-glib/simple-handler.h @@ -73,6 +73,8 @@ typedef void (*TpSimpleHandlerHandleChannelsImpl) ( TpHandleChannelsContext *context, gpointer user_data); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_handler_new_with_factory) TpBaseClient * tp_simple_handler_new (TpDBusDaemon *dbus, gboolean bypass_approval, gboolean requests, @@ -80,9 +82,8 @@ TpBaseClient * tp_simple_handler_new (TpDBusDaemon *dbus, gboolean uniquify, TpSimpleHandlerHandleChannelsImpl callback, gpointer user_data, - GDestroyNotify destroy) - _TP_GNUC_DEPRECATED_FOR (tp_simple_handler_new_with_factory); - + GDestroyNotify destroy); +#endif TpBaseClient *tp_simple_handler_new_with_am (TpAccountManager *account_manager, gboolean bypass_approval, diff --git a/telepathy-glib/simple-observer.h b/telepathy-glib/simple-observer.h index 3a4c2eb..5566447 100644 --- a/telepathy-glib/simple-observer.h +++ b/telepathy-glib/simple-observer.h @@ -73,15 +73,16 @@ typedef void (*TpSimpleObserverObserveChannelsImpl) ( TpObserveChannelsContext *context, gpointer user_data); +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_0_16_FOR (tp_simple_observer_new_with_factory) TpBaseClient * tp_simple_observer_new (TpDBusDaemon *dbus, gboolean recover, const gchar *name, gboolean uniquify, TpSimpleObserverObserveChannelsImpl callback, gpointer user_data, - GDestroyNotify destroy) - _TP_GNUC_DEPRECATED_FOR (tp_simple_observer_new_with_factory); - + GDestroyNotify destroy); +#endif TpBaseClient *tp_simple_observer_new_with_am ( TpAccountManager *account_manager, diff --git a/telepathy-glib/text-mixin.h b/telepathy-glib/text-mixin.h index 7ecd7ff..9222896 100644 --- a/telepathy-glib/text-mixin.h +++ b/telepathy-glib/text-mixin.h @@ -30,6 +30,8 @@ G_BEGIN_DECLS +#ifndef TP_DISABLE_DEPRECATED + typedef struct _TpTextMixinClass TpTextMixinClass; typedef struct _TpTextMixinClassPrivate TpTextMixinClassPrivate; typedef struct _TpTextMixin TpTextMixin; @@ -114,6 +116,8 @@ void tp_text_mixin_set_rescued (GObject *obj) void tp_text_mixin_iface_init (gpointer g_iface, gpointer iface_data) _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_text_iface_init); +#endif + G_END_DECLS #endif /* #ifndef __TP_TEXT_MIXIN_H__ */ -- 1.7.10