diff options
author | Simon Busch <morphis@gravedo.de> | 2011-11-23 21:44:01 +0100 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2011-11-23 21:44:01 +0100 |
commit | 3c98c20f0cc09d6d098f1cc7cf2924d57796d1fd (patch) | |
tree | 312448fbd712fe7ea05824c1d4fcec4c0de84a5a | |
parent | 157b91c590241230378482c70c463544d948eeff (diff) | |
download | external_libsamsung-ipc-3c98c20f0cc09d6d098f1cc7cf2924d57796d1fd.zip external_libsamsung-ipc-3c98c20f0cc09d6d098f1cc7cf2924d57796d1fd.tar.gz external_libsamsung-ipc-3c98c20f0cc09d6d098f1cc7cf2924d57796d1fd.tar.bz2 |
vapi: some minor changes and implement method to retrieve single plmn entries
Signed-off-by: Simon Busch <morphis@gravedo.de>
-rw-r--r-- | vapi/samsung-ipc-1.0.vapi | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi index 89b44eb..edc2d8c 100644 --- a/vapi/samsung-ipc-1.0.vapi +++ b/vapi/samsung-ipc-1.0.vapi @@ -564,7 +564,6 @@ namespace SamsungIpc public PlmnStatus status; public uint8[] plmn; public uint8 type; - public uint8[] unk; public unowned uint8[] data { @@ -581,8 +580,19 @@ namespace SamsungIpc public struct PlmnEntriesMessage { public uint8 num; - [CCode (cname = "data", array_length_cname = "num")] - public PlmnEntriesMessage[] entries; + + public unowned PlmnEntryMessage? get_entry( Response response, uint pos ) + { + unowned PlmnEntryMessage? entry = null; + + if ( pos >= num ) + return null; + + uint8 *p = ((uint8*) response.data) + sizeof(PlmnEntriesMessage); + entry = (PlmnEntryMessage?) (p + pos * sizeof(PlmnEntryMessage)); + + return entry; + } public unowned uint8[] data { @@ -1037,8 +1047,8 @@ namespace SamsungIpc public uint8[] unpack_pdu( Response response ) { uint8[] pdu = new uint8[this.length]; - uint8 *pdu_start = response.data + sizeof( IncomingMessage ); - Memory.copy(pdu, pdu_start, this.length); + uint8 *pdu_start = ((uint8*) response.data) + sizeof( IncomingMessage ); + GLib.Memory.copy(pdu, pdu_start, this.length); return pdu; } } |