aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-10-30 18:16:58 +0100
committerSimon Busch <morphis@gravedo.de>2011-10-30 18:16:58 +0100
commit924962f733f2b813af0e1ea72c8879a3a57a1be3 (patch)
tree1306b8e977862d5d1e03e3e11bdcb0d6e39a7563
parent3f2302f7c377800cb1f0801c64575bef2b7d05a9 (diff)
downloadexternal_libsamsung-ipc-924962f733f2b813af0e1ea72c8879a3a57a1be3.zip
external_libsamsung-ipc-924962f733f2b813af0e1ea72c8879a3a57a1be3.tar.gz
external_libsamsung-ipc-924962f733f2b813af0e1ea72c8879a3a57a1be3.tar.bz2
Adjust vala binding to suite for the latest changes to the library API
Signed-off-by: Simon Busch <morphis@gravedo.de>
-rw-r--r--vapi/samsung-ipc-1.0.vapi77
1 files changed, 34 insertions, 43 deletions
diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi
index 42fb743..48daf02 100644
--- a/vapi/samsung-ipc-1.0.vapi
+++ b/vapi/samsung-ipc-1.0.vapi
@@ -25,9 +25,8 @@ namespace SamsungIpc
[CCode (cname = "int", cprefix = "IPC_CLIENT_TYPE_", has_type_id = false)]
public enum ClientType
{
- CRESPO_FMT,
- CRESPO_RFS,
- H1,
+ FMT,
+ RFS,
}
[CCode (cname = "int", cprefix = "IPC_TYPE_", has_type_id = false)]
@@ -43,9 +42,9 @@ namespace SamsungIpc
[CCode (cname = "unsigned char", cprefix = "IPC_TYPE_", has_type_id = false)]
public enum ResponseType
{
- INDICATION,
- RESPONSE,
- NOTIFICATION,
+ INDI,
+ RESP,
+ NOTI,
}
[CCode (cname = "int", cprefix = "IPC_GROUP_", has_type_id = false)]
@@ -71,21 +70,6 @@ namespace SamsungIpc
GEN,
}
- [CCode (cname = "int", cprefix = "IPC_PWR_", has_type_id = false)]
- public enum GenericMessageType
- {
- PHONE_RESPONSE,
- }
-
- [CCode (cname = "struct ipc_get_phone_res")]
- public struct GenericPhoneResponseMessage
- {
- public uint8 group;
- public uint8 type;
- public uint8 unk;
- public uint16 code;
- }
-
[CCode (cname = "unsigned short", cprefix = "IPC_", has_type_id = false)]
public enum MessageType
{
@@ -377,6 +361,9 @@ namespace SamsungIpc
return res;
}
}
+
+ [CCode (cname = "ipc_sec_rsim_access_response_get_file_data")]
+ public static string get_file_data( Response response );
}
[CCode (cname = "struct ipc_sec_lock_info_request", destroy_function = "")]
@@ -687,7 +674,7 @@ namespace SamsungIpc
}
}
- [CCode (cname = "struct ipc_response", destroy_function = "")]
+ [CCode (cname = "struct ipc_message_info", destroy_function = "")]
public struct ListResponseMessage
{
[CCode (cname = "ipc_call_list_response_get_num_entries")]
@@ -782,6 +769,13 @@ namespace SamsungIpc
}
}
+ [CCode (cname = "struct ipc_message_info")]
+ public struct MeResponseMessage
+ {
+ [CCode (cname = "ipc_misc_me_imsi_response_get_imsi")]
+ public static string get_imsi( Response response );
+ }
+
[CCode (cname = "struct ipc_misc_time_info", destroy_function = "")]
public struct TimeInfoMessage
{
@@ -962,17 +956,6 @@ namespace SamsungIpc
/* ******************************************************************************** */
- [CCode (cname = "struct ipc_header", destroy_function = "")]
- 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_message_info", destroy_function = "", free_function = "")]
public struct Request
{
@@ -982,25 +965,33 @@ namespace SamsungIpc
public uint8 index;
public RequestType type;
public uint32 length;
+ [CCode (array_length_cname = "length")]
public uint8[] data;
+
+ public MessageType command
+ {
+ get { return (MessageType) ((group << 8) | index); }
+ set { group = value >> 8; index = value & 0xff; }
+ }
}
- [CCode (cname = "struct ipc_response", destroy_function = "", free_function = "", copy_function = "")]
+ [CCode (cname = "struct ipc_message_info", destroy_function = "", free_function = "", copy_function = "")]
public struct Response
{
public uint8 mseq;
public uint8 aseq;
- public MessageType command;
+ public uint8 group;
+ public uint8 index;
public ResponseType type;
- public uint32 data_length;
- [CCode (array_length_cname = "data_length")]
+ public uint32 length;
+ [CCode (array_length_cname = "length")]
public uint8[] data;
- // FIXME this should not be here ...
- [CCode (cname = "ipc_sec_rsim_access_response_get_file_data")]
- public string sec_rsim_access_response_get_file_data();
- [CCode (cname = "ipc_misc_me_imsi_response_get_imsi")]
- public string misc_me_imsi_response_get_imsi();
+ public MessageType command
+ {
+ get { return (MessageType) ((group << 8) | index); }
+ set { group = value >> 8; index = value & 0xff; }
+ }
}
public delegate int TransportCb(uint8[] data);
@@ -1013,7 +1004,7 @@ namespace SamsungIpc
public Client(ClientType type);
[CCode (delagate_target_pos = 0.9)]
public int set_log_handler(LogHandlerCb log_cb);
- public int set_delegates(TransportCb write_cb, TransportCb read_cb);
+ public int set_io_handlers(TransportCb write_cb, TransportCb read_cb);
public int bootstrap_modem();
public void open();
public void close();