Set app id in fill response and authentication information 45/196845/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Sun, 6 Jan 2019 22:58:06 +0000 (07:58 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sun, 6 Jan 2019 22:58:06 +0000 (07:58 +0900)
Change-Id: I249a4ce5b574c980867f0b1fec7c429c35e4f595
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
client/autofill.c
tidl/autofill.tidl

index 6318d3d..fdd0df9 100644 (file)
@@ -92,18 +92,25 @@ static bool fill_response_group_cb(rpc_port_autofill_response_group_h response_g
 
 static void __fill_response_recv_cb(void *user_data, rpc_port_autofill_fill_response_h response_h)
 {
+    char *app_id = NULL;
     char *view_id = NULL;
     autofill_h ah = user_data;
     autofill_fill_response_h rh;
 
     autofill_fill_response_create(&rh);
 
+    rpc_port_autofill_fill_response_get_app_id(response_h, &app_id);
     rpc_port_autofill_fill_response_get_view_id(response_h, &view_id);
 
+    LOGD("app id : %s, view id : %s", app_id, view_id);
+
+    if (app_id) {
+        autofill_fill_response_set_app_id(rh, app_id);
+        free(app_id);
+    }
+
     if (view_id) {
         autofill_fill_response_set_view_id(rh, view_id);
-
-        LOGD("view id : %s", view_id);
         free(view_id);
     }
 
@@ -124,11 +131,13 @@ static void __auth_info_recv_cb(void *user_data, rpc_port_autofill_auth_info_h a
 
     bool autofill_data_present = false;
     bool authentication_needed = false;
+    char *app_id = NULL;
     char *view_id = NULL;
     char *service_name = NULL;
     char *service_logo_image_path = NULL;
     char *service_message = NULL;
 
+    rpc_port_autofill_auth_info_get_app_id(auth_info_h, &app_id);
     rpc_port_autofill_auth_info_get_view_id(auth_info_h, &view_id);
     rpc_port_autofill_auth_info_get_exist_autofill_data(auth_info_h, &autofill_data_present);
     rpc_port_autofill_auth_info_get_need_authentication(auth_info_h, &authentication_needed);
@@ -136,8 +145,9 @@ static void __auth_info_recv_cb(void *user_data, rpc_port_autofill_auth_info_h a
     rpc_port_autofill_auth_info_get_service_logo_image_path(auth_info_h, &service_logo_image_path);
     rpc_port_autofill_auth_info_get_service_message(auth_info_h, &service_message);
 
-    LOGD("service name : %s", service_name);
+    LOGD("app id : %s, view id : %s, service name : %s", app_id, view_id, service_name);
 
+    autofill_auth_info_set_app_id(aih, app_id);
     autofill_auth_info_set_view_id(aih, view_id);
     autofill_auth_info_set_autofill_data_present(aih, autofill_data_present);
     autofill_auth_info_set_authentication_needed(aih, authentication_needed);
@@ -145,6 +155,9 @@ static void __auth_info_recv_cb(void *user_data, rpc_port_autofill_auth_info_h a
     autofill_auth_info_set_service_logo_image_path(aih, service_logo_image_path);
     autofill_auth_info_set_service_message(aih, service_message);
 
+    if (app_id)
+        free(app_id);
+
     if (view_id)
         free(view_id);
 
index 8c3d185..6f4ccac 100644 (file)
@@ -25,6 +25,7 @@ struct autofill_save_view_info {
 }
 
 struct autofill_auth_info {
+    string app_id;
     string view_id;
     bool exist_autofill_data;
     bool need_authentication;
@@ -45,6 +46,7 @@ struct autofill_response_group {
 }
 
 struct autofill_fill_response {
+    string app_id;
     string view_id;
     list<autofill_response_group> response_groups;
 }