aboutsummaryrefslogtreecommitdiffstats
path: root/vapi
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-10-09 18:43:28 +0200
committerSimon Busch <morphis@gravedo.de>2011-10-10 08:23:23 +0200
commit743ede5407a6e8b8baeb9c5b10cfc80d428ae847 (patch)
tree3d7d5eb9b849528c3db1f8969c775c74199287d6 /vapi
parent1cec835e06ddbf9d5229ff0a080e0e36106d64f3 (diff)
downloadexternal_libsamsung-ipc-743ede5407a6e8b8baeb9c5b10cfc80d428ae847.zip
external_libsamsung-ipc-743ede5407a6e8b8baeb9c5b10cfc80d428ae847.tar.gz
external_libsamsung-ipc-743ede5407a6e8b8baeb9c5b10cfc80d428ae847.tar.bz2
Rework API of this library to integrate better with other environments than Android
* send/recv is now done outside this library; the user has to provide callbacks for send and recv * it's now possible to create more than one ipc client as every ipc API method needs an object of type ipc_client (which is the context it operates in) * there are now two different client types for the crespo machine: RFS and FMT * disabled h1 client for now * removed power on/off functionality; should be done by another userland component with handling the correct sysfs nodes rather than dealing with ioctls for this. * updated vala interface description file to reflect API changes * various source code cleanups Signed-off-by: Simon Busch <morphis@gravedo.de>
Diffstat (limited to 'vapi')
-rw-r--r--vapi/samsung-ipc-1.0.vapi46
1 files changed, 19 insertions, 27 deletions
diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi
index 402d895..576d15c 100644
--- a/vapi/samsung-ipc-1.0.vapi
+++ b/vapi/samsung-ipc-1.0.vapi
@@ -24,7 +24,8 @@ namespace SamsungIpc
[CCode (cname = "int", cprefix = "IPC_CLIENT_TYPE_", has_type_id = false, cheader_filename = "radio.h")]
public enum ClientType
{
- CRESPO,
+ CRESPO_FMT,
+ CRESPO_RFS,
H1,
}
@@ -62,30 +63,21 @@ namespace SamsungIpc
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_set", cheader_filename = "radio.h")]
- public void fd_set(int fd);
- [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);
+ public delegate int TransportCb(uint8[] data);
+
+ [Compact]
+ [CCode (cname = "struct ipc_client", cprefix = "ipc_client_", cheader_filename = "radio.h")]
+ public class Client
+ {
+ public Client(ClientType type);
+ [CCode (delagate_target_pos = 0.9)]
+ public int set_delegates(TransportCb write_cb, TransportCb read_cb);
+ public int bootstrap_modem();
+ public void open();
+ public void close();
+ public int recv(Response response);
+ public void send(int command, int type, uint8 data, int length, uint8 mseq);
+ public void send_get(int command, uint8 aseq);
+ public void send_exec(int command, uint8 aseq);
+ }
}