[next] telepathy-glib: Make mandatory to create TpChannelDispatchOperation and TpChannelRequest through a factory

Xavier Claessens xclaesse at kemper.freedesktop.org
Wed Dec 26 04:37:47 PST 2012


Module: telepathy-glib
Branch: next
Commit: 82298ed9fb5f474d8d80826c8814f1739e942efb
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=82298ed9fb5f474d8d80826c8814f1739e942efb

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Wed Dec 26 11:20:42 2012 +0100

Make mandatory to create TpChannelDispatchOperation and TpChannelRequest through a factory

Those objects does not have a public constructor anymore, so we can
assert they were created through a factory.

---

 telepathy-glib/channel-dispatch-operation.c |    2 +-
 telepathy-glib/channel-request.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index dc94def..e999b2e 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -399,7 +399,7 @@ tp_channel_dispatch_operation_constructed (GObject *object)
 
   g_return_if_fail (tp_proxy_get_dbus_daemon (self) != NULL);
 
-  _tp_proxy_ensure_factory (self, NULL);
+  g_assert (tp_proxy_get_factory (self) != NULL);
 
   maybe_set_connection (self,
       tp_asv_get_boxed (self->priv->immutable_properties,
diff --git a/telepathy-glib/channel-request.c b/telepathy-glib/channel-request.c
index a62b91c..dc1fd0a 100644
--- a/telepathy-glib/channel-request.c
+++ b/telepathy-glib/channel-request.c
@@ -264,7 +264,7 @@ tp_channel_request_constructed (GObject *object)
 
   g_return_if_fail (tp_proxy_get_dbus_daemon (self) != NULL);
 
-  _tp_proxy_ensure_factory (self, NULL);
+  g_assert (tp_proxy_get_factory (self) != NULL);
 
   sc = tp_cli_channel_request_connect_to_failed (self,
       tp_channel_request_failed_cb, NULL, NULL, NULL, &error);



More information about the telepathy-commits mailing list