summaryrefslogtreecommitdiffstats
path: root/gril/grilio.h
diff options
context:
space:
mode:
authorTony Espy <espy@canonical.com>2015-10-13 18:07:52 +0200
committerDenis Kenzior <denkenz@gmail.com>2015-10-13 16:02:11 -0500
commit9c2af753c0ca7e344019e33911bc590f35f81b12 (patch)
tree25611b0d70fedde1397eb3002c32e7d26f77ab6f /gril/grilio.h
parentab9fedc6ef3bde5855b2776acfae59aaae3e787a (diff)
downloadofono-9c2af753c0ca7e344019e33911bc590f35f81b12.tar.bz2
gril: Library to communicate with rild
gril is a library used to communicate with rild, the Android telephony daemon. Communication happens using a named socket over which binder parcels are transmitted. Co-authored-by: Tony Espy <espy@canonical.com> Co-authored-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Co-authored-by: Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com> Co-authored-by: Mikko Hurskainen <mikko.hurskainen@nomovok.com> Co-authored-by: You-Sheng Yang <vicamo.yang@canonical.com> Co-authored-by: Ratchanan Srirattanamet <peathot@hotmail.com>
Diffstat (limited to 'gril/grilio.h')
-rw-r--r--gril/grilio.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/gril/grilio.h b/gril/grilio.h
new file mode 100644
index 00000000..22fb60eb
--- /dev/null
+++ b/gril/grilio.h
@@ -0,0 +1,69 @@
+/*
+ *
+ * RIL chat library with GLib integration
+ *
+ * Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
+ * Copyright (C) 2012 Canonical Ltd.
+ *
+ * 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 __GRILIO_H
+#define __GRILIO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "gfunc.h"
+
+struct _GRilIO;
+
+typedef struct _GRilIO GRilIO;
+
+struct ring_buffer;
+
+typedef void (*GRilIOReadFunc)(struct ring_buffer *buffer, gpointer user_data);
+typedef gboolean (*GRilIOWriteFunc)(gpointer user_data);
+
+GRilIO *g_ril_io_new(GIOChannel *channel);
+GRilIO *g_ril_io_new_blocking(GIOChannel *channel);
+
+GIOChannel *g_ril_io_get_channel(GRilIO *io);
+
+GRilIO *g_ril_io_ref(GRilIO *io);
+void g_ril_io_unref(GRilIO *io);
+
+gboolean g_ril_io_set_read_handler(GRilIO *io, GRilIOReadFunc read_handler,
+ gpointer user_data);
+gboolean g_ril_io_set_write_handler(GRilIO *io, GRilIOWriteFunc write_handler,
+ gpointer user_data);
+void g_ril_io_set_write_done(GRilIO *io, GRilDisconnectFunc func,
+ gpointer user_data);
+
+void g_ril_io_drain_ring_buffer(GRilIO *io, guint len);
+
+gsize g_ril_io_write(GRilIO *io, const gchar *data, gsize count);
+
+gboolean g_ril_io_set_disconnect_function(GRilIO *io,
+ GRilDisconnectFunc disconnect, gpointer user_data);
+
+gboolean g_ril_io_set_debug(GRilIO *io, GRilDebugFunc func, gpointer user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GRILIO_H */