From f4429e60ceb7dc8603a95559d58a805f62e22d6b Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 18 May 2012 20:02:12 +0200 Subject: [PATCH] Deprecate tp_account_parse_object_path() https://bugs.freedesktop.org/show_bug.cgi?id=49372 --- telepathy-glib/account.c | 6 ++++++ telepathy-glib/account.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 9190c7b..62a1fbb 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -1041,8 +1041,10 @@ _tp_account_constructed (GObject *object) g_error_free (error); } + G_GNUC_BEGIN_IGNORE_DEPRECATIONS tp_account_parse_object_path (tp_proxy_get_object_path (self), &(priv->cm_name), &(priv->proto_name), NULL, NULL); + G_GNUC_END_IGNORE_DEPRECATIONS priv->icon_name = g_strdup_printf ("im-%s", priv->proto_name); priv->service = g_strdup (priv->proto_name); @@ -2096,8 +2098,10 @@ _tp_account_new_with_factory (TpSimpleClientFactory *factory, g_return_val_if_fail (object_path != NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (!tp_account_parse_object_path (object_path, NULL, NULL, NULL, error)) return NULL; + G_GNUC_END_IGNORE_DEPRECATIONS self = TP_ACCOUNT (g_object_new (TP_TYPE_ACCOUNT, "dbus-daemon", bus_daemon, @@ -3569,6 +3573,8 @@ set_or_free (gchar **target, * @error otherwise. * * Since: 0.9.0 + * Deprecated: Use tp_account_get_protocol() and + * tp_account_get_connection_manager() instead. */ gboolean tp_account_parse_object_path (const gchar *object_path, diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h index ff787b3..f77340f 100644 --- a/telepathy-glib/account.h +++ b/telepathy-glib/account.h @@ -85,8 +85,11 @@ GQuark tp_account_get_feature_quark_addressing (void) G_GNUC_CONST; TpAccount *tp_account_new (TpDBusDaemon *bus_daemon, const gchar *object_path, GError **error) G_GNUC_WARN_UNUSED_RESULT; +#ifndef TP_DISABLE_DEPRECATED +_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_account_get_protocol) gboolean tp_account_parse_object_path (const gchar *object_path, gchar **cm, gchar **protocol, gchar **account_id, GError **error); +#endif const gchar *tp_account_get_path_suffix (TpAccount *account); void tp_account_init_known_interfaces (void); -- 1.7.9.5