telepathy-farstream: stop accessing TpProxy members directly

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Wed Sep 25 06:48:09 PDT 2013


Module: telepathy-farstream
Branch: master
Commit: 8dc3a82cc6680f9f22900e595fa88bb6d6f2850e
URL:    http://cgit.freedesktop.org/telepathy/telepathy-farstream/commit/?id=8dc3a82cc6680f9f22900e595fa88bb6d6f2850e

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Wed Sep 25 12:07:34 2013 +0200

stop accessing TpProxy members directly

https://bugs.freedesktop.org/show_bug.cgi?id=69802

---

 telepathy-farstream/channel.c                  |    7 ++-----
 telepathy-farstream/media-signalling-channel.c |   12 ++++++------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/telepathy-farstream/channel.c b/telepathy-farstream/channel.c
index 5e651f3..3442f70 100644
--- a/telepathy-farstream/channel.c
+++ b/telepathy-farstream/channel.c
@@ -139,11 +139,8 @@ tf_channel_get_property (GObject    *object,
       g_value_set_object (value, self->priv->channel_proxy);
       break;
     case PROP_OBJECT_PATH:
-        {
-          TpProxy *as_proxy = (TpProxy *) self->priv->channel_proxy;
-
-          g_value_set_string (value, as_proxy->object_path);
-        }
+      g_value_set_string (value,
+          tp_proxy_get_object_path (self->priv->channel_proxy));
       break;
     case PROP_FS_CONFERENCES:
       if (self->priv->call_channel)
diff --git a/telepathy-farstream/media-signalling-channel.c b/telepathy-farstream/media-signalling-channel.c
index 52db185..2f7b2f7 100644
--- a/telepathy-farstream/media-signalling-channel.c
+++ b/telepathy-farstream/media-signalling-channel.c
@@ -425,12 +425,12 @@ new_stream_cb (TfSession *session,
   TfStream *stream;
   FsConference *fs_conference;
   FsParticipant *fs_participant;
-  TpProxy *channel_as_proxy = (TpProxy *) self->channel_proxy;
   TpMediaStreamHandler *proxy;
   GList *local_codec_config = NULL;
 
-  proxy = tp_media_stream_handler_new (channel_as_proxy->dbus_daemon,
-      channel_as_proxy->bus_name, object_path, NULL);
+  proxy = tp_media_stream_handler_new (
+      tp_proxy_get_dbus_daemon (self->channel_proxy),
+      tp_proxy_get_bus_name (self->channel_proxy), object_path, NULL);
 
   if (proxy == NULL)
     {
@@ -503,7 +503,6 @@ add_session (TfMediaSignallingChannel *self,
     const gchar *session_type)
 {
   GError *error = NULL;
-  TpProxy *channel_as_proxy = (TpProxy *) self->channel_proxy;
   TpMediaSessionHandler *proxy;
   FsConference *conf = NULL;
 
@@ -511,8 +510,9 @@ add_session (TfMediaSignallingChannel *self,
 
   g_assert (self->session == NULL);
 
-  proxy = tp_media_session_handler_new (channel_as_proxy->dbus_daemon,
-      channel_as_proxy->bus_name, object_path, &error);
+  proxy = tp_media_session_handler_new (
+      tp_proxy_get_dbus_daemon (self->channel_proxy),
+      tp_proxy_get_bus_name (self->channel_proxy), object_path, &error);
 
   if (proxy == NULL)
     {



More information about the telepathy-commits mailing list