Change variable and function name for readability 41/244041/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 14 Sep 2020 08:21:56 +0000 (17:21 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 14 Sep 2020 10:01:46 +0000 (19:01 +0900)
Change-Id: I3ced806f3e0624a71d3b3a5c61ab0bc2c091c0c2
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/autofill-daemon.c

index 5187945400fa7946060ece838036dd89694818a7..4e3f01dc8017845be3a441bfd46bb8185996ed5f 100644 (file)
@@ -47,7 +47,7 @@ typedef struct {
 
 static GList *__client_list = NULL;
 static Ecore_Timer *g_connect_timer = NULL;
-static bool g_connected = false;
+static bool g_autofill_service_connected = false;
 
 static bool connect_service();
 static void terminate_autofill_service();
@@ -364,7 +364,7 @@ static int __auth_info_request_cb(rpc_port_stub_AutofillAppPort_context_h contex
     char *sender = NULL;
     char *view_id = NULL;
 
-    if (!g_connected) {
+    if (!g_autofill_service_connected) {
         LOGW("Not connected to autofill service");
         return 0;
     }
@@ -411,7 +411,7 @@ static int __autofill_fill_request_cb(rpc_port_stub_AutofillAppPort_context_h co
     char *sender = NULL;
     char *view_id = NULL;
 
-    if (!g_connected) {
+    if (!g_autofill_service_connected) {
         LOGW("Not connected to autofill service");
         return 0;
     }
@@ -455,7 +455,7 @@ static int __autofill_cancel_fill_request_cb(rpc_port_stub_AutofillAppPort_conte
     char *sender = NULL;
     char *view_id = NULL;
 
-    if (!g_connected) {
+    if (!g_autofill_service_connected) {
         LOGW("Not connected to autofill service");
         return 0;
     }
@@ -500,7 +500,7 @@ static int __commit_cb(rpc_port_stub_AutofillAppPort_context_h context, int cont
     char *view_id = NULL;
     char *view_title = NULL;
 
-    if (!g_connected) {
+    if (!g_autofill_service_connected) {
         LOGW("Not connected to autofill service");
         return 0;
     }
@@ -716,7 +716,7 @@ static void __error_info_recv_cb(void *user_data, int context_id, rpc_port_autof
         free(app_id);
 }
 
-static void __on_connected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
+static void __on_autofill_service_connected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
 {
     LOGI("Autofill service connected");
 
@@ -745,7 +745,7 @@ static void __on_connected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
     if (r != 0)
         LOGW("Failed to invoke Register");
 
-    g_connected = true;
+    g_autofill_service_connected = true;
 }
 
 static Eina_Bool connect_timer_cb(void *data)
@@ -777,7 +777,7 @@ static void retry_connect_service()
         error_info_cb_h = NULL;
     }
 
-    g_connected = false;
+    g_autofill_service_connected = false;
 
     // try to connect again
     if (!connect_service()) {
@@ -789,14 +789,14 @@ static void retry_connect_service()
 }
 
 //LCOV_EXCL_START
-static void __on_disconnected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
+static void __on_autofill_service_disconnected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
 {
     LOGW("Autofill service is disconnected");
 
     retry_connect_service();
 }
 
-static void __on_rejected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
+static void __on_autofill_service_rejected(rpc_port_proxy_AutofillSvcPort_h h, void *user_data)
 {
     LOGW("Rejected to connect autofill service");
 
@@ -818,7 +818,7 @@ static void terminate_autofill_service()
             auth_info_cb_h = NULL;
             error_info_cb_h = NULL;
 
-            g_connected = false;
+            g_autofill_service_connected = false;
         }
     }
 
@@ -919,9 +919,9 @@ static bool connect_service()
     bool sys_config = false;
 
     rpc_port_proxy_AutofillSvcPort_callback_s rpc_callback = {
-        .connected = __on_connected,
-        .disconnected = __on_disconnected,
-        .rejected = __on_rejected
+        .connected = __on_autofill_service_connected,
+        .disconnected = __on_autofill_service_disconnected,
+        .rejected = __on_autofill_service_rejected
     };
 
     if (svc_rpc_h) {
@@ -929,7 +929,7 @@ static bool connect_service()
         return true;
     }
 
-    if (g_connected) {
+    if (g_autofill_service_connected) {
         LOGI("already connected\n");
         return true;
     }