diff options
author | Guillaume Zajac <guillaume.zajac@linux.intel.com> | 2011-04-01 10:56:04 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-05-02 07:05:57 -0500 |
commit | 70ae2f00289a51a3123fa7c1c5b4d6c0f78d5148 (patch) | |
tree | da6725d07333a97d9573a354d6fb901f4de66e74 /gatchat | |
parent | 6b3cfbba856e41e9fa7af2274e574392ca67dd41 (diff) |
gatio: add ability to drain GAtIO read buffer
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gatio.c | 5 | ||||
-rw-r--r-- | gatchat/gatio.h | 2 |
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, |