diff options
author | Simon Busch <morphis@gravedo.de> | 2011-10-25 19:14:04 +0200 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2011-10-25 19:14:04 +0200 |
commit | fcc205d9f852ccc72c7fed1b54d541e1319c2f1c (patch) | |
tree | cc936e240a49d178a2b97cd2a9c39b3dba57ad05 | |
parent | 4771ea19e252ed3ee940a6b8e50a5a1cae93e183 (diff) | |
download | external_libsamsung-ipc-fcc205d9f852ccc72c7fed1b54d541e1319c2f1c.zip external_libsamsung-ipc-fcc205d9f852ccc72c7fed1b54d541e1319c2f1c.tar.gz external_libsamsung-ipc-fcc205d9f852ccc72c7fed1b54d541e1319c2f1c.tar.bz2 |
Add setup method for ipc_sec_pin_status_set message
Signed-off-by: Simon Busch <morphis@gravedo.de>
-rw-r--r-- | include/sec.h | 3 | ||||
-rw-r--r-- | samsung-ipc/sec.c | 21 | ||||
-rw-r--r-- | vapi/samsung-ipc-1.0.vapi | 3 |
3 files changed, 27 insertions, 0 deletions
diff --git a/include/sec.h b/include/sec.h index a5f7651..3401a40 100644 --- a/include/sec.h +++ b/include/sec.h @@ -111,5 +111,8 @@ struct ipc_sec_lock_info_response { char* ipc_sec_rsim_access_response_get_file_data(struct ipc_response *response); +void ipc_sec_pin_status_set_setup(struct ipc_sec_pin_status_set *message, + unsigned char pin_type, char *pin1, char *pin2); + #endif diff --git a/samsung-ipc/sec.c b/samsung-ipc/sec.c index e27f518..9cef712 100644 --- a/samsung-ipc/sec.c +++ b/samsung-ipc/sec.c @@ -21,6 +21,27 @@ #include <radio.h> #include <string.h> #include <stdlib.h> +#include <assert.h> + +void ipc_sec_pin_status_set_setup(struct ipc_sec_pin_status_set *message, + unsigned char pin_type, char *pin1, char *pin2) +{ + assert(message != NULL); + + message->type = pin_type; + + if (pin1 != NULL) + { + strncpy(message->pin1, pin1, 8); + message->length1 = strlen(pin1); + } + + if (pin2 != NULL) + { + strncpy(message->pin2, pin2, 8); + message->length2 = strlen(pin2); + } +} char* ipc_sec_rsim_access_response_get_file_data(struct ipc_response *response) { diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi index 4c5acf5..8b90b3c 100644 --- a/vapi/samsung-ipc-1.0.vapi +++ b/vapi/samsung-ipc-1.0.vapi @@ -294,6 +294,9 @@ namespace SamsungIpc [CCode (array_length_cname = "length2")] public uint8[] pin2; // size = 8 + [CCode (cname = "ipc_sec_pin_status_set_setup")] + public void setup(PinType pin_type, string pin1, string pin2); + public unowned uint8[] data { get |