[Telepathy-commits] [telepathy-salut/master] Set the tube to open when we receive the ack of the SI offer
Alban Crequy
alban.crequy at collabora.co.uk
Tue Nov 25 03:59:24 PST 2008
---
src/salut-tubes-channel.c | 4 ++++
src/tube-iface.c | 2 +-
src/tube-stream.c | 5 +++++
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c
index fd515c3..6c0bce4 100644
--- a/src/salut-tubes-channel.c
+++ b/src/salut-tubes-channel.c
@@ -1773,6 +1773,10 @@ iq_reply_cb (GibberIqHelper *helper,
return;
}
+ g_object_set (tube,
+ "state", TP_TUBE_STATE_OPEN,
+ NULL);
+
DEBUG ("tube offered successfully");
}
diff --git a/src/tube-iface.c b/src/tube-iface.c
index c6d031b..31237ba 100644
--- a/src/tube-iface.c
+++ b/src/tube-iface.c
@@ -185,7 +185,7 @@ salut_tube_iface_base_init (gpointer klass)
"Tube state",
"The SalutTubeState of this DBUS tube object",
0, G_MAXUINT32, TP_TUBE_STATE_REMOTE_PENDING,
- G_PARAM_READABLE |
+ G_PARAM_READWRITE |
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB);
diff --git a/src/tube-stream.c b/src/tube-stream.c
index f130fa1..48adde3 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1230,6 +1230,11 @@ salut_tube_stream_set_property (GObject *object,
case PROP_PARAMETERS:
priv->parameters = g_value_get_boxed (value);
break;
+ case PROP_STATE:
+ priv->state = g_value_get_uint (value);
+ if (priv->state == TP_TUBE_STATE_OPEN)
+ g_signal_emit (G_OBJECT (self), signals[OPENED], 0);
+ break;
case PROP_ADDRESS_TYPE:
g_assert (g_value_get_uint (value) == TP_SOCKET_ADDRESS_TYPE_UNIX ||
g_value_get_uint (value) == TP_SOCKET_ADDRESS_TYPE_IPV4 ||
--
1.5.6.5
More information about the Telepathy-commits
mailing list