summaryrefslogtreecommitdiffstats
path: root/gatchat/gathdlc.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-04-10 15:11:46 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-04-10 15:11:46 +0200
commit20b394e72b05b3ecb5e8ec9ade14f287589c7cd8 (patch)
treea4aa4e66595f85d24c101fe713549d046ef1715a /gatchat/gathdlc.h
parenta9c204effa724ff31937e526f1050eadca6a9beb (diff)
downloadofono-20b394e72b05b3ecb5e8ec9ade14f287589c7cd8.tar.bz2
Add abstraction for HDLC stream handling
Diffstat (limited to 'gatchat/gathdlc.h')
-rw-r--r--gatchat/gathdlc.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/gatchat/gathdlc.h b/gatchat/gathdlc.h
new file mode 100644
index 00000000..2b7166a3
--- /dev/null
+++ b/gatchat/gathdlc.h
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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 __G_AT_HDLC_H
+#define __G_AT_HDLC_H
+
+#include "gat.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _GAtHDLC;
+
+typedef struct _GAtHDLC GAtHDLC;
+
+GAtHDLC *g_at_hdlc_new(GIOChannel *channel);
+
+GAtHDLC *g_at_hdlc_ref(GAtHDLC *hdlc);
+void g_at_hdlc_unref(GAtHDLC *hdlc);
+
+void g_at_hdlc_set_debug(GAtHDLC *hdlc, GAtDebugFunc func, gpointer user_data);
+
+void g_at_hdlc_set_receive(GAtHDLC *hdlc, GAtReceiveFunc func,
+ gpointer user_data);
+gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *buf, gsize len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __G_AT_HDLC_H */