telepathy-glib: Deprecate tp_channel_request_new() and tp_channel_dispatch_operation_new()
Xavier Claessens
xclaesse at kemper.freedesktop.org
Tue Sep 11 01:35:28 PDT 2012
Module: telepathy-glib
Branch: master
Commit: 4770a0dd38909fb3f74f1e3436e4c628a7df3020
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=4770a0dd38909fb3f74f1e3436e4c628a7df3020
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Mon Sep 3 15:35:25 2012 +0200
Deprecate tp_channel_request_new() and tp_channel_dispatch_operation_new()
Those constructors are useless because TpChannelRequest and
TpChannelDispatchOperation objects are created internally by
TpBaseClient and friends. Applications using the high-level API
should never need them.
Those constructors are harmful because they do not take a factory and
they need a factory internally. This means that creating our own
TpChannelRequest/TpChannelDispatchOperation will create our own
account/connection/channel/whatever objects instead of sharing them.
Internally we already have _new_with_factory() variant.
https://bugs.freedesktop.org/show_bug.cgi?id=49372
---
telepathy-glib/channel-dispatch-operation.c | 2 ++
telepathy-glib/channel-dispatch-operation.h | 3 +++
telepathy-glib/channel-request.c | 2 ++
telepathy-glib/channel-request.h | 3 +++
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index 1793e4b..07453a0 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -886,6 +886,8 @@ tp_channel_dispatch_operation_init_known_interfaces (void)
* Returns: a new reference to an channel dispatch operation proxy, or %NULL if
* @object_path is not syntactically valid or the channel dispatcher is not
* running
+ * Deprecated: Since 0.UNRELEASED. New code should get
+ * #TpChannelDispatchOperation objects from a #TpBaseClient
*/
TpChannelDispatchOperation *
tp_channel_dispatch_operation_new (TpDBusDaemon *bus_daemon,
diff --git a/telepathy-glib/channel-dispatch-operation.h b/telepathy-glib/channel-dispatch-operation.h
index d7be9d4..f90425f 100644
--- a/telepathy-glib/channel-dispatch-operation.h
+++ b/telepathy-glib/channel-dispatch-operation.h
@@ -75,10 +75,13 @@ GType tp_channel_dispatch_operation_get_type (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_CHANNEL_DISPATCH_OPERATION, \
TpChannelDispatchOperationClass))
+#ifndef TP_DISABLE_DEPRECATED
+_TP_DEPRECATED_IN_0_20
TpChannelDispatchOperation *tp_channel_dispatch_operation_new (
TpDBusDaemon *bus_daemon, const gchar *object_path,
GHashTable *immutable_properties, GError **error)
G_GNUC_WARN_UNUSED_RESULT;
+#endif
void tp_channel_dispatch_operation_init_known_interfaces (void);
diff --git a/telepathy-glib/channel-request.c b/telepathy-glib/channel-request.c
index 636456a..7ed924c 100644
--- a/telepathy-glib/channel-request.c
+++ b/telepathy-glib/channel-request.c
@@ -567,6 +567,8 @@ tp_channel_request_init_known_interfaces (void)
* Returns: a new reference to an channel request proxy, or %NULL if
* @object_path is not syntactically valid or the channel dispatcher is
* not running
+ * Deprecated: Since 0.UNRELEASED. New code should get #TpChannelRequest objects
+ * from a #TpBaseClient
*/
TpChannelRequest *
tp_channel_request_new (TpDBusDaemon *bus_daemon,
diff --git a/telepathy-glib/channel-request.h b/telepathy-glib/channel-request.h
index a298949..85a9437 100644
--- a/telepathy-glib/channel-request.h
+++ b/telepathy-glib/channel-request.h
@@ -70,9 +70,12 @@ GType tp_channel_request_get_type (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_CHANNEL_REQUEST, \
TpChannelRequestClass))
+#ifndef TP_DISABLE_DEPRECATED
+_TP_DEPRECATED_IN_0_20
TpChannelRequest *tp_channel_request_new (TpDBusDaemon *bus_daemon,
const gchar *object_path, GHashTable *immutable_properties,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
+#endif
void tp_channel_request_init_known_interfaces (void);
More information about the telepathy-commits
mailing list