diff options
author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2011-01-31 17:05:00 +0200 |
---|---|---|
committer | Pekka Pessi <Pekka.Pessi@nokia.com> | 2011-02-02 17:22:06 +0200 |
commit | df7195bd6bf73cc5d4a8d056eecba1d244ae0218 (patch) | |
tree | fb31e0ba9b3b7d5e66a3cb53820f545fec39625d | |
parent | 5544102fb3ecfca6d77b0ba049169cc60052c82b (diff) |
text-factory: use TpsipBaseConnection
-rw-r--r-- | src/text-factory.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/text-factory.c b/src/text-factory.c index d62b2b6..decba2b 100644 --- a/src/text-factory.c +++ b/src/text-factory.c @@ -27,7 +27,7 @@ #include <telepathy-glib/interfaces.h> #include "sip-text-channel.h" -#include "sip-connection.h" +#include "tpsip/base-connection.h" #include "sip-connection-helpers.h" #include <sofia-sip/msg_header.h> @@ -39,7 +39,7 @@ static void channel_manager_iface_init (gpointer g_iface, gpointer iface_data); -static void connection_status_changed_cb (TpsipConnection *conn, +static void connection_status_changed_cb (TpBaseConnection *conn, guint status, guint reason, TpsipTextFactory *self); static void tpsip_text_factory_close_all (TpsipTextFactory *self); @@ -57,7 +57,7 @@ enum typedef struct _TpsipTextFactoryPrivate TpsipTextFactoryPrivate; struct _TpsipTextFactoryPrivate { - TpsipConnection *conn; + TpBaseConnection *conn; /* guint handle => TpsipTextChannel *channel */ GHashTable *channels; @@ -144,7 +144,7 @@ tpsip_text_factory_set_property (GObject *object, switch (property_id) { case PROP_CONNECTION: - priv->conn = g_value_get_object (value); + priv->conn = TP_BASE_CONNECTION (g_value_get_object (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -165,9 +165,10 @@ tpsip_text_factory_class_init (TpsipTextFactoryClass *klass) object_class->set_property = tpsip_text_factory_set_property; object_class->dispose = tpsip_text_factory_dispose; - param_spec = g_param_spec_object ("connection", "TpsipConnection object", + param_spec = g_param_spec_object ("connection", + "TpsipBaseConnection object", "SIP connection that owns this text 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); } @@ -281,7 +282,7 @@ tpsip_text_factory_new_channel (TpsipTextFactory *fac, GSList *request_tokens; priv = TPSIP_TEXT_FACTORY_GET_PRIVATE (fac); - conn = (TpBaseConnection *)(priv->conn); + conn = priv->conn; object_path = g_strdup_printf ("%s/TextChannel%u", conn->object_path, handle); @@ -597,7 +598,7 @@ end: } static void -connection_status_changed_cb (TpsipConnection *conn, +connection_status_changed_cb (TpBaseConnection *conn, guint status, guint reason, TpsipTextFactory *self) @@ -608,7 +609,7 @@ connection_status_changed_cb (TpsipConnection *conn, { case TP_CONNECTION_STATUS_CONNECTING: - priv->message_received_id = g_signal_connect (priv->conn, + priv->message_received_id = g_signal_connect (conn, "nua-event::nua_i_message", G_CALLBACK (tpsip_nua_i_message_cb), self); |