summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-09-03 15:35:25 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-09-11 10:34:19 +0200
commit4770a0dd38909fb3f74f1e3436e4c628a7df3020 (patch)
treecaebaf91a3f87aba484f3c1c1ac4085403866265
parent29daab56223b7a2bb8c98e389aca85a2b8a0dcfb (diff)
downloadtelepathy-glib-4770a0dd38909fb3f74f1e3436e4c628a7df3020.tar.gz
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
-rw-r--r--telepathy-glib/channel-dispatch-operation.c2
-rw-r--r--telepathy-glib/channel-dispatch-operation.h3
-rw-r--r--telepathy-glib/channel-request.c2
-rw-r--r--telepathy-glib/channel-request.h3
4 files changed, 10 insertions, 0 deletions
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index 1793e4b83..07453a0b1 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 d7be9d480..f90425fd6 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 636456ab1..7ed924c33 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 a2989490a..85a943756 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);