aboutsummaryrefslogtreecommitdiffstats
path: root/vapi
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-09-29 15:22:37 +0200
committerSimon Busch <morphis@gravedo.de>2011-09-29 15:36:29 +0200
commit458fd1fbcd0abb1860739b19e8fd833aa056d185 (patch)
treec8b7294bd5b6eab7ae4b4931b85f20d54aacdc8d /vapi
parentf6bbbfa9c5e038e838e5641764666f53a04b2985 (diff)
downloadexternal_libsamsung-ipc-458fd1fbcd0abb1860739b19e8fd833aa056d185.zip
external_libsamsung-ipc-458fd1fbcd0abb1860739b19e8fd833aa056d185.tar.gz
external_libsamsung-ipc-458fd1fbcd0abb1860739b19e8fd833aa056d185.tar.bz2
Several update regarding integration in other userland environements than android
* add fd_get method to ipc_ops to retrieve the file descriptior responsible for modem requests/response * add bootstrap method to ipc_ops to separate modem bootstrap from modem opening * add first version of a vapi to be able to use samsung-ipc from vala * add missing pkg-config description file
Diffstat (limited to 'vapi')
-rw-r--r--vapi/samsung-ipc-1.0.vapi89
1 files changed, 89 insertions, 0 deletions
diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi
new file mode 100644
index 0000000..b4df9f8
--- /dev/null
+++ b/vapi/samsung-ipc-1.0.vapi
@@ -0,0 +1,89 @@
+/*
+ * samsung-ipc-1.0.vapi
+ *
+ * Copyright (C) 2011 Simon Busch <morphis@gravedo.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+namespace SamsungIpc
+{
+ [CCode (cname = "int", cprefix = "IPC_CLIENT_TYPE_", has_type_id = false, cheader_filename = "radio.h")]
+ public enum ClientType
+ {
+ CRESPO,
+ H1,
+ }
+
+ [CCode (cname = "struct ipc_header", cheader_filename = "radio.h")]
+ public struct Header
+ {
+ public uint16 length;
+ public uint8 mseq;
+ public uint8 aseq;
+ public uint8 group;
+ public uint8 index;
+ public uint8 type;
+ }
+
+ [CCode (cname = "struct ipc_request", cheader_filename = "radio.h")]
+ public struct Request
+ {
+ public uint8 mseq;
+ public uint8 aseq;
+ public uint8 group;
+ public uint8 index;
+ public uint8 type;
+ public uint32 length;
+ public uint8[] data;
+ }
+
+ [CCode (cname = "struct ipc_response", cheader_filename = "radio.h")]
+ public struct Response
+ {
+ public uint8 mseq;
+ public uint8 aseq;
+ public uint16 command;
+ public uint8 type;
+ public uint32 length;
+ public uint8[] data;
+ }
+
+ [CCode (cname = "ipc_init", cheader_filename = "radio.h")]
+ public int init(ClientType type);
+ [CCode (cname = "ipc_bootstrap", cheader_filename = "radio.h")]
+ public int bootstrap();
+ [CCode (cname = "ipc_open", cheader_filename = "radio.h")]
+ public void open();
+ [CCode (cname = "ipc_close", cheader_filename = "radio.h")]
+ public void close();
+ [CCode (cname = "ipc_fd_get", cheader_filename = "radio.h")]
+ public int fd_get();
+ [CCode (cname = "ipc_power_on", cheader_filename = "radio.h")]
+ public void power_on();
+ [CCode (cname = "ipc_power_off", cheader_filename = "radio.h")]
+ public void power_off();
+ [CCode (cname = "ipc_send", cheader_filename = "radio.h")]
+ public void send(Request request);
+ [CCode (cname = "ipc_recv", cheader_filename = "radio.h")]
+ public int recv(Response response);
+ [CCode (cname = "ipc_msg_send", cheader_filename = "radio.h")]
+ public void message_send(int command, int type, uint8 data, int length, uint8 mseq);
+ [CCode (cname = "ipc_msg_send_get", cheader_filename = "radio.h")]
+ public void message_send_get(int command, uint8 aseq);
+ [CCode (cname = "ipc_msg_send_exec", cheader_filename = "radio.h")]
+ public void message_send_exec(int command, uint8 aseq);
+}