summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-03-05 17:53:36 +0000
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-03-05 17:53:36 +0000
commit0e46c6118b1cdb9783315ee2f0c27042223854b3 (patch)
tree9c52e81a1048f274794c7408bf76737b057787a1 /lib
parentb251bd8f5dcc4ca2ae8ed6f044c73fa38094e1c5 (diff)
downloadtelepathy-salut-0e46c6118b1cdb9783315ee2f0c27042223854b3.tar.gz
add gibber_bytestream_oob_block_read
20080305175336-7fe3f-f69727027697ba9977c2499ea5363c746729a494.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/gibber/gibber-bytestream-oob.c16
-rw-r--r--lib/gibber/gibber-bytestream-oob.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/gibber/gibber-bytestream-oob.c b/lib/gibber/gibber-bytestream-oob.c
index df6772b8..cb0f8dc9 100644
--- a/lib/gibber/gibber-bytestream-oob.c
+++ b/lib/gibber/gibber-bytestream-oob.c
@@ -99,6 +99,8 @@ struct _GibberBytestreamIBBPrivate
GibberTransport *transport;
GIOChannel *listener;
guint listener_watch;
+ gboolean write_blocked;
+ gboolean read_blocked;
GibberBytestreamOOBCheckAddrFunc check_addr_func;
gpointer check_addr_func_data;
@@ -1118,6 +1120,20 @@ gibber_bytestream_oob_set_check_addr_func (
priv->check_addr_func_data = user_data;
}
+void
+gibber_bytestream_oob_block_read (GibberBytestreamOOB *self,
+ gboolean block)
+{
+ GibberBytestreamOOBPrivate *priv = GIBBER_BYTESTREAM_OOB_GET_PRIVATE (self);
+
+ if (priv->read_blocked == block)
+ return;
+
+ priv->read_blocked = block;
+
+ DEBUG ("%s the transport bytestream", block ? "block": "unblock");
+ gibber_transport_block (priv->transport, block);
+}
static void
bytestream_iface_init (gpointer g_iface,
diff --git a/lib/gibber/gibber-bytestream-oob.h b/lib/gibber/gibber-bytestream-oob.h
index 14499d7c..8834d925 100644
--- a/lib/gibber/gibber-bytestream-oob.h
+++ b/lib/gibber/gibber-bytestream-oob.h
@@ -69,6 +69,9 @@ void gibber_bytestream_oob_set_check_addr_func (
GibberBytestreamOOB *bytestream, GibberBytestreamOOBCheckAddrFunc func,
gpointer user_data);
+void gibber_bytestream_oob_block_read (GibberBytestreamOOB *bytestream,
+ gboolean block);
+
G_END_DECLS
#endif /* #ifndef __GIBBER_BYTESTREAM_OOB_H__ */