[Telepathy-commits] [telepathy-gabble/master] bytestream-multiple: forward write-blocked signal
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Tue Mar 3 02:22:09 PST 2009
---
src/bytestream-multiple.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/bytestream-multiple.c b/src/bytestream-multiple.c
index 10e7869..1184577 100644
--- a/src/bytestream-multiple.c
+++ b/src/bytestream-multiple.c
@@ -493,6 +493,15 @@ bytestream_state_changed_cb (GabbleBytestreamIface *bytestream,
}
static void
+bytestream_write_blocked_cb (GabbleBytestreamIface *bytestream,
+ gboolean blocked,
+ gpointer self)
+{
+ /* Forward signal */
+ g_signal_emit_by_name (G_OBJECT (self), "write-blocked", blocked);
+}
+
+static void
bytestream_connection_error_cb (GabbleBytestreamIface *failed,
gpointer user_data)
{
@@ -511,6 +520,8 @@ bytestream_connection_error_cb (GabbleBytestreamIface *failed,
bytestream_data_received_cb, self);
g_signal_handlers_disconnect_by_func (failed,
bytestream_state_changed_cb, self);
+ g_signal_handlers_disconnect_by_func (failed,
+ bytestream_write_blocked_cb, self);
/* We don't have to unref it because the reference is kept by the
* factory */
@@ -557,6 +568,8 @@ bytestream_activate_next (GabbleBytestreamMultiple *self)
G_CALLBACK (bytestream_data_received_cb), self);
g_signal_connect (priv->active_bytestream, "state-changed",
G_CALLBACK (bytestream_state_changed_cb), self);
+ g_signal_connect (priv->active_bytestream, "write-blocked",
+ G_CALLBACK (bytestream_write_blocked_cb), self);
}
/*
--
1.5.6.5
More information about the telepathy-commits
mailing list