summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-05-16 13:10:31 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-07-03 13:46:41 +0200
commit50fdb9d38694d620dbe49ff00572df1e54454052 (patch)
treea058a7a7c34e8514119e33c3cec444b37af5f212
parentbe781d63238f4eb55a334508c6073101d01a4ab0 (diff)
downloadtelepathy-glib-50fdb9d38694d620dbe49ff00572df1e54454052.tar.gz
Deprecate tp_account_new(), tp_connection_new() and tp_*_channel_new()
Those proxies should be constructed using TpSimpleClientFactory https://bugs.freedesktop.org/show_bug.cgi?id=49372
-rw-r--r--telepathy-glib/account.c1
-rw-r--r--telepathy-glib/account.h1
-rw-r--r--telepathy-glib/automatic-proxy-factory.c5
-rw-r--r--telepathy-glib/channel.c2
-rw-r--r--telepathy-glib/channel.h2
-rw-r--r--telepathy-glib/client-channel-factory.c5
-rw-r--r--telepathy-glib/connection.c1
-rw-r--r--telepathy-glib/connection.h1
-rw-r--r--telepathy-glib/file-transfer-channel.c1
-rw-r--r--telepathy-glib/file-transfer-channel.h1
-rw-r--r--telepathy-glib/stream-tube-channel.c1
-rw-r--r--telepathy-glib/stream-tube-channel.h1
-rw-r--r--telepathy-glib/text-channel.c1
-rw-r--r--telepathy-glib/text-channel.h1
14 files changed, 24 insertions, 0 deletions
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index c58f43490..6a313a6f4 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -2117,6 +2117,7 @@ tp_account_init_known_interfaces (void)
*
* Returns: a new reference to an account proxy, or %NULL if @object_path is
* not valid
+ * Deprecated: Use tp_simple_client_factory_ensure_account() instead.
*/
TpAccount *
tp_account_new (TpDBusDaemon *bus_daemon,
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index 88e32bc52..851826391 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -86,6 +86,7 @@ GQuark tp_account_get_feature_quark_connection (void) G_GNUC_CONST;
GQuark tp_account_get_feature_quark_storage (void) G_GNUC_CONST;
GQuark tp_account_get_feature_quark_addressing (void) G_GNUC_CONST;
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_account)
TpAccount *tp_account_new (TpDBusDaemon *bus_daemon, const gchar *object_path,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/telepathy-glib/automatic-proxy-factory.c b/telepathy-glib/automatic-proxy-factory.c
index 9af0939aa..3e526baa7 100644
--- a/telepathy-glib/automatic-proxy-factory.c
+++ b/telepathy-glib/automatic-proxy-factory.c
@@ -115,6 +115,9 @@ G_DEFINE_TYPE_WITH_CODE(TpAutomaticProxyFactory,
G_IMPLEMENT_INTERFACE (TP_TYPE_CLIENT_CHANNEL_FACTORY,
client_proxy_factory_iface_init))
+/* Deprecated module can use deprecated APIs */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void
tp_automatic_proxy_factory_init (TpAutomaticProxyFactory *self)
{
@@ -299,3 +302,5 @@ tp_automatic_proxy_factory_dup (void)
return singleton;
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 6d9d6d87b..f70b9d56a 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -2000,6 +2000,7 @@ tp_channel_class_init (TpChannelClass *klass)
* Returns: a new channel proxy, or %NULL on invalid arguments
*
* Since: 0.7.19
+ * Deprecated: Use tp_simple_client_factory_ensure_channel() instead.
*/
TpChannel *
tp_channel_new_from_properties (TpConnection *conn,
@@ -2064,6 +2065,7 @@ finally:
* Returns: a new channel proxy, or %NULL on invalid arguments.
*
* Since: 0.7.1
+ * Deprecated: Use tp_simple_client_factory_ensure_channel() instead.
*/
TpChannel *
tp_channel_new (TpConnection *conn,
diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h
index 837fae8fd..d72ad740d 100644
--- a/telepathy-glib/channel.h
+++ b/telepathy-glib/channel.h
@@ -77,11 +77,13 @@ GQuark tp_errors_removed_from_group_quark (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_CHANNEL, \
TpChannelClass))
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_channel)
TpChannel *tp_channel_new (TpConnection *conn,
const gchar *object_path, const gchar *optional_channel_type,
TpHandleType optional_handle_type, TpHandle optional_handle,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_channel)
TpChannel *tp_channel_new_from_properties (TpConnection *conn,
const gchar *object_path, const GHashTable *immutable_properties,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/telepathy-glib/client-channel-factory.c b/telepathy-glib/client-channel-factory.c
index addfc6fac..c5d3cf46a 100644
--- a/telepathy-glib/client-channel-factory.c
+++ b/telepathy-glib/client-channel-factory.c
@@ -75,6 +75,9 @@
G_DEFINE_INTERFACE(TpClientChannelFactory, tp_client_channel_factory,
G_TYPE_OBJECT)
+/* Deprecated module can use deprecated APIs */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void
tp_client_channel_factory_default_init (TpClientChannelFactoryInterface *iface)
{
@@ -165,3 +168,5 @@ tp_client_channel_factory_dup_channel_features (
return arr;
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index f818c993f..f92936537 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -2364,6 +2364,7 @@ tp_connection_class_init (TpConnectionClass *klass)
* fails or on invalid arguments
*
* Since: 0.7.1
+ * Deprecated: Use tp_simple_client_factory_ensure_connection() instead.
*/
TpConnection *
tp_connection_new (TpDBusDaemon *dbus,
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index ad501a7d9..d4a0508d0 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -140,6 +140,7 @@ GQuark tp_errors_disconnected_quark (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_CONNECTION, \
TpConnectionClass))
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_connection)
TpConnection *tp_connection_new (TpDBusDaemon *dbus, const gchar *bus_name,
const gchar *object_path, GError **error) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/telepathy-glib/file-transfer-channel.c b/telepathy-glib/file-transfer-channel.c
index db39bff5d..fcf0c6b1d 100644
--- a/telepathy-glib/file-transfer-channel.c
+++ b/telepathy-glib/file-transfer-channel.c
@@ -1058,6 +1058,7 @@ tp_file_transfer_channel_get_feature_quark_core (void)
* Returns: (transfer full): a newly created #TpFileTransferChannel
*
* Since: 0.15.5
+ * Deprecated: Use tp_simple_client_factory_ensure_channel() instead.
*/
TpFileTransferChannel *
tp_file_transfer_channel_new (TpConnection *conn,
diff --git a/telepathy-glib/file-transfer-channel.h b/telepathy-glib/file-transfer-channel.h
index cbd645e4f..eed4fe612 100644
--- a/telepathy-glib/file-transfer-channel.h
+++ b/telepathy-glib/file-transfer-channel.h
@@ -68,6 +68,7 @@ GType tp_file_transfer_channel_get_type (void);
/* Methods */
_TP_AVAILABLE_IN_0_16
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_channel)
TpFileTransferChannel * tp_file_transfer_channel_new (TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
diff --git a/telepathy-glib/stream-tube-channel.c b/telepathy-glib/stream-tube-channel.c
index d3bf54541..452e02c5b 100644
--- a/telepathy-glib/stream-tube-channel.c
+++ b/telepathy-glib/stream-tube-channel.c
@@ -488,6 +488,7 @@ tp_stream_tube_channel_init (TpStreamTubeChannel *self)
* Returns: (transfer full): a newly-created #TpStreamTubeChannel proxy
*
* Since: 0.13.2
+ * Deprecated: Use tp_simple_client_factory_ensure_channel() instead.
*/
TpStreamTubeChannel *
tp_stream_tube_channel_new (TpConnection *conn,
diff --git a/telepathy-glib/stream-tube-channel.h b/telepathy-glib/stream-tube-channel.h
index 26709a5d8..62b23f675 100644
--- a/telepathy-glib/stream-tube-channel.h
+++ b/telepathy-glib/stream-tube-channel.h
@@ -59,6 +59,7 @@ struct _TpStreamTubeChannelClass
GType tp_stream_tube_channel_get_type (void);
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_channel)
TpStreamTubeChannel *tp_stream_tube_channel_new (TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
diff --git a/telepathy-glib/text-channel.c b/telepathy-glib/text-channel.c
index 24c49afb7..0f8ca6c3f 100644
--- a/telepathy-glib/text-channel.c
+++ b/telepathy-glib/text-channel.c
@@ -1126,6 +1126,7 @@ tp_text_channel_init (TpTextChannel *self)
* Returns: (transfer full): a newly created #TpTextChannel
*
* Since: 0.13.10
+ * Deprecated: Use tp_simple_client_factory_ensure_channel() instead.
*/
TpTextChannel *
tp_text_channel_new (TpConnection *conn,
diff --git a/telepathy-glib/text-channel.h b/telepathy-glib/text-channel.h
index c4f782978..2b07a7d1a 100644
--- a/telepathy-glib/text-channel.h
+++ b/telepathy-glib/text-channel.h
@@ -60,6 +60,7 @@ struct _TpTextChannelClass
GType tp_text_channel_get_type (void);
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_channel)
TpTextChannel *tp_text_channel_new (TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,