3 * AT chat library with GLib integration
5 * Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 typedef struct _GAtIO GAtIO;
37 typedef void (*GAtIOReadFunc)(struct ring_buffer *buffer, gpointer user_data);
38 typedef gboolean (*GAtIOWriteFunc)(gpointer user_data);
40 GAtIO *g_at_io_new(GIOChannel *channel);
41 GAtIO *g_at_io_new_blocking(GIOChannel *channel);
43 GIOChannel *g_at_io_get_channel(GAtIO *io);
45 GAtIO *g_at_io_ref(GAtIO *io);
46 void g_at_io_unref(GAtIO *io);
48 gboolean g_at_io_set_read_handler(GAtIO *io, GAtIOReadFunc read_handler,
50 gboolean g_at_io_set_write_handler(GAtIO *io, GAtIOWriteFunc write_handler,
52 void g_at_io_set_write_done(GAtIO *io, GAtDisconnectFunc func,
55 void g_at_io_drain_ring_buffer(GAtIO *io, guint len);
57 gsize g_at_io_write(GAtIO *io, const gchar *data, gsize count);
59 gboolean g_at_io_set_disconnect_function(GAtIO *io,
60 GAtDisconnectFunc disconnect, gpointer user_data);
62 gboolean g_at_io_set_debug(GAtIO *io, GAtDebugFunc func, gpointer user_data);
68 #endif /* __GATIO_H */