summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>2011-04-01 10:56:04 +0200
committerDenis Kenzior <denkenz@gmail.com>2011-05-02 07:05:57 -0500
commit70ae2f00289a51a3123fa7c1c5b4d6c0f78d5148 (patch)
treeda6725d07333a97d9573a354d6fb901f4de66e74
parent6b3cfbba856e41e9fa7af2274e574392ca67dd41 (diff)
gatio: add ability to drain GAtIO read buffer
-rw-r--r--gatchat/gatio.c5
-rw-r--r--gatchat/gatio.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/gatchat/gatio.c b/gatchat/gatio.c
index 27782606..f679cd0e 100644
--- a/gatchat/gatio.c
+++ b/gatchat/gatio.c
@@ -387,3 +387,8 @@ void g_at_io_set_write_done(GAtIO *io, GAtDisconnectFunc func,
io->write_done_func = func;
io->write_done_data = user_data;
}
+
+void g_at_io_drain_ring_buffer(GAtIO *io, guint len)
+{
+ ring_buffer_drain(io->buf, len);
+}
diff --git a/gatchat/gatio.h b/gatchat/gatio.h
index ca9618fd..16dd6212 100644
--- a/gatchat/gatio.h
+++ b/gatchat/gatio.h
@@ -52,6 +52,8 @@ gboolean g_at_io_set_write_handler(GAtIO *io, GAtIOWriteFunc write_handler,
void g_at_io_set_write_done(GAtIO *io, GAtDisconnectFunc func,
gpointer user_data);
+void g_at_io_drain_ring_buffer(GAtIO *io, guint len);
+
gsize g_at_io_write(GAtIO *io, const gchar *data, gsize count);
gboolean g_at_io_set_disconnect_function(GAtIO *io,