diff options
author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2011-01-31 20:58:00 +0200 |
---|---|---|
committer | Pekka Pessi <Pekka.Pessi@nokia.com> | 2011-02-02 17:22:06 +0200 |
commit | d668e5dd9c09fd5c13b2e6ac06f5a905bd5f8c98 (patch) | |
tree | e3e72b06fb58733a362c386fd921d52177f39bcc /src | |
parent | 89157182dcd9390a7a4fdd040c74401293972dfb (diff) |
media-factory: use TpsipBaseConnection
Diffstat (limited to 'src')
-rw-r--r-- | src/media-factory.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/media-factory.c b/src/media-factory.c index 1e941fe..f6afc01 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -27,7 +27,7 @@ #include <telepathy-glib/interfaces.h> #include "sip-media-channel.h" -#include "sip-connection.h" +#include <tpsip/base-connection.h> #include "sip-connection-helpers.h" #include <sofia-sip/sip_status.h> @@ -61,7 +61,7 @@ typedef struct _TpsipMediaFactoryPrivate TpsipMediaFactoryPrivate; struct _TpsipMediaFactoryPrivate { /* unreferenced (since it owns this factory) */ - TpsipConnection *conn; + TpBaseConnection *conn; /* array of referenced (TpsipMediaChannel *) */ GPtrArray *channels; /* for unique channel object paths, currently always increments */ @@ -181,9 +181,10 @@ tpsip_media_factory_class_init (TpsipMediaFactoryClass *klass) object_class->dispose = tpsip_media_factory_dispose; object_class->finalize = tpsip_media_factory_finalize; - param_spec = g_param_spec_object ("connection", "TpsipConnection object", + param_spec = g_param_spec_object ("connection", + "TpsipBaseConnection object", "SIP connection that owns this media channel factory", - TPSIP_TYPE_CONNECTION, + TPSIP_TYPE_BASE_CONNECTION, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_CONNECTION, param_spec); @@ -265,7 +266,6 @@ new_media_channel (TpsipMediaFactory *fac, { TpsipMediaFactoryPrivate *priv; TpsipMediaChannel *chan = NULL; - TpBaseConnection *conn; gchar *object_path; const gchar *nat_traversal = "none"; gboolean initial_audio; @@ -275,9 +275,8 @@ new_media_channel (TpsipMediaFactory *fac, g_assert (initiator != 0); priv = TPSIP_MEDIA_FACTORY_GET_PRIVATE (fac); - conn = (TpBaseConnection *)priv->conn; - object_path = g_strdup_printf ("%s/MediaChannel%u", conn->object_path, + object_path = g_strdup_printf ("%s/MediaChannel%u", priv->conn->object_path, priv->channel_index++); DEBUG("channel object path %s", object_path); @@ -285,7 +284,7 @@ new_media_channel (TpsipMediaFactory *fac, initial_audio = ((flags & TPSIP_MEDIA_CHANNEL_CREATE_WITH_AUDIO) != 0); initial_video = ((flags & TPSIP_MEDIA_CHANNEL_CREATE_WITH_VIDEO) != 0); - g_object_get (conn, + g_object_get (priv->conn, "immutable-streams", &immutable_streams, NULL); @@ -379,7 +378,7 @@ tpsip_nua_i_invite_cb (TpBaseConnection *conn, } static void -connection_status_changed_cb (TpsipConnection *conn, +connection_status_changed_cb (TpsipBaseConnection *conn, guint status, guint reason, TpsipMediaFactory *self) |