aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sec.h3
-rw-r--r--samsung-ipc/sec.c21
-rw-r--r--vapi/samsung-ipc-1.0.vapi3
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