diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-27 11:07:53 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-28 17:27:32 -0500 |
commit | 5fc7c1e1d0b331c7198f49d1d0751a1e528aa263 (patch) | |
tree | 81e5822df5882fbbf294d01932197d2a760d315c /gatchat/gatio.h | |
parent | 3d0d2db83fa04fdf2743f5ab84817af6fe35d1c3 (diff) | |
download | ofono-5fc7c1e1d0b331c7198f49d1d0751a1e528aa263.tar.bz2 |
gatchat: Add initial GAtIO implementation
Diffstat (limited to 'gatchat/gatio.h')
-rw-r--r-- | gatchat/gatio.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gatchat/gatio.h b/gatchat/gatio.h new file mode 100644 index 00000000..87eb633b --- /dev/null +++ b/gatchat/gatio.h @@ -0,0 +1,60 @@ +/* + * + * AT chat library with GLib integration + * + * Copyright (C) 2008-2010 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __GATIO_H +#define __GATIO_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gat.h" + +struct _GAtIO; + +typedef struct _GAtIO GAtIO; + +typedef void (*GAtIOReadFunc)(struct ring_buffer *buffer, gpointer user_data); +typedef void (*GAtIOWriteFunc)(gpointer user_data); + +GAtIO *g_at_io_new(GIOChannel *channel); +GAtIO *g_at_io_new_blocking(GIOChannel *channel); + +GIOChannel *g_at_io_get_channel(GAtIO *io); + +GAtIO *g_at_io_ref(GAtIO *io); +void g_at_io_unref(GAtIO *io); + +gboolean g_at_io_shutdown(GAtIO *io); + +gboolean g_at_io_set_read_handler(GAtIO *io, GAtIOReadFunc read_handler, + gpointer user_data); + +gboolean g_at_io_set_disconnect_function(GAtIO *io, + GAtDisconnectFunc disconnect, gpointer user_data); + +gboolean g_at_io_set_debug(GAtIO *io, GAtDebugFunc func, gpointer user_data); + +#ifdef __cplusplus +} +#endif + +#endif /* __GATIO_H */ |