Replace LOGI with STLOGI in sticker-receiver 13/240613/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 10 Aug 2020 06:03:16 +0000 (15:03 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 10 Aug 2020 06:03:23 +0000 (15:03 +0900)
Change-Id: I55fafa0fad8a753a49a6eb31e6dc9785baad8861
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
receiver/src/ft.cpp
receiver/src/main.cpp
receiver/src/sticker_info.cpp

index eda0692..629d54f 100644 (file)
@@ -98,7 +98,7 @@ static void save_last_sync_time()
     // save last sync time in preference
     double current_time = ecore_time_unix_get();
     if (preference_set_double(LAST_SYNC_TIME, current_time) == PREFERENCE_ERROR_NONE) {
-        LOGI("Succeed to set last sync time : %f", current_time);
+        STLOGI("Succeed to set last sync time : %f", current_time);
     }
     else {
         STLOGW("Failed to set last sync time");
@@ -189,7 +189,7 @@ static void notify_sync_progress(unsigned int file_progress)
     if (total_file_count_in_group == 0)
         return;
 
-    LOGI("(%2d / %2d), file progress : %3u%%", rec_file_cnt_in_group+1, total_file_count_in_group, file_progress);
+    STLOGI("(%2d / %2d), file progress : %3u%%", rec_file_cnt_in_group+1, total_file_count_in_group, file_progress);
     send_message("sync_progress", NULL);
 }
 
@@ -204,13 +204,13 @@ static void _on_transfer_completed(sap_file_transaction_h file_transaction,
     }
 
     if (result == SAP_FT_TRANSFER_SUCCESS) {
-        LOGI("Transfer Completed");
+        STLOGI("Transfer Completed");
 
         if (chmod(sticker_data.file_path.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) == -1) {
             STLOGE("Failed to change permission : %s. error : %s", sticker_data.file_path.c_str(), strerror(errno));
         }
         else {
-            LOGI("Succeed to change permission : %s", sticker_data.file_path.c_str());
+            STLOGI("Succeed to change permission : %s", sticker_data.file_path.c_str());
             char thumb_path[PATH_MAX];
             char *data_path = NULL;
             data_path = app_get_shared_data_path();
@@ -300,7 +300,7 @@ static void _on_transfer_file_in_progress(sap_file_transaction_h file_transactio
 
 static void __set_file_transfer_cb(sap_file_transaction_h file_socket)
 {
-    LOGI("# set callbacks");
+    STLOGI("# set callbacks");
     sap_file_transfer_set_progress_cb(file_socket, _on_transfer_file_in_progress, NULL);
 
     sap_file_transfer_set_done_cb(file_socket, _on_transfer_completed, NULL);
@@ -318,9 +318,9 @@ void accept_file()
     char *data_path = NULL;
 
     data_path = app_get_shared_data_path();
-    LOGI("Path : %s", data_path);
+    STLOGI("Path : %s", data_path);
     snprintf(file_path, sizeof(file_path), "%s/%s", data_path, incoming_file_name.c_str());
-    LOGI("Receive filepath : %s", file_path);
+    STLOGI("Receive filepath : %s", file_path);
     sticker_data.file_path = string(file_path);
 
     if (data_path)
@@ -335,7 +335,7 @@ void accept_file()
             STLOGW("Fail");
             break;
         case SAP_RESULT_SUCCESS:
-            LOGI("Success");
+            STLOGI("Success");
             break;
     }
 
@@ -377,7 +377,7 @@ bool request_sticker_data(const char *mode, const char *category, const char *ty
         pending_request.type = string(type ? type : "input");
 
         ReqQueue.push(pending_request);
-        LOGI("Push sync request");
+        STLOGI("Push sync request");
 
         return false;
     }
@@ -505,7 +505,7 @@ void request_sticker_feature()
         StickerRequest pending_request;
         pending_request.req_type = REQUEST_TYPE_FEATURE_REQ;
         ReqQueue.push(pending_request);
-        LOGI("Push sync feature request");
+        STLOGI("Push sync feature request");
         return;
     }
 
@@ -559,7 +559,7 @@ void request_show_sync_notification()
         StickerRequest pending_request;
         pending_request.req_type = REQUEST_TYPE_SHOW_NOTIFICATION;
         ReqQueue.push(pending_request);
-        LOGI("Push show notification request");
+        STLOGI("Push show notification request");
         return;
     }
 
@@ -584,7 +584,7 @@ void request_show_sync_notification()
 void reject_file()
 {
     int ret = sap_file_transfer_reject(priv_data.file_socket);
-    LOGI("ret : %d", ret);
+    STLOGI("ret : %d", ret);
 
     file_on_progress = FALSE;
 }
@@ -596,14 +596,14 @@ static void _on_transfer_file_cb(sap_peer_agent_h peer_agent_h,
 {
     file_on_progress = TRUE;
     priv_data.file_socket = socket;
-    LOGI("# incoming file request.");
+    STLOGI("# incoming file request.");
     __set_file_transfer_cb(priv_data.file_socket);
 
     incoming_file_name = file_path;
     std::size_t found = incoming_file_name.find_last_of("/");
     incoming_file_name = incoming_file_name.substr(found+1);
 
-    LOGI("# file path : %s, incoming file name : %s", file_path, incoming_file_name.c_str());
+    STLOGI("# file path : %s, incoming file name : %s", file_path, incoming_file_name.c_str());
 
     accept_file();
 }
@@ -724,7 +724,7 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in
                  void *user_data) /* message exchange on_receive callback (sap_agent_data_received_cb) */
 {
     unsigned int buf_len = strlen((char *)buffer);
-    LOGI("received data: %s, len: %d, buffer len : %d", (char *)buffer, payload_length, buf_len);
+    STLOGI("received data: %s, len: %d, buffer len : %d", (char *)buffer, payload_length, buf_len);
 
     JsonParser *parser = json_parser_new();
     GError *err_msg = NULL;
@@ -994,7 +994,7 @@ static void on_conn_req(sap_peer_agent_h peer_agent,
     switch (result)
     {
     case SAP_CONNECTION_SUCCESS:
-        LOGI("Connection success");
+        STLOGI("Connection success");
         priv_data.socket = socket;
         sap_peer_agent_accept_service_connection(peer_agent);
         sap_peer_agent_set_service_connection_terminated_cb(peer_agent, conn_terminated, &priv_data);
@@ -1002,7 +1002,7 @@ static void on_conn_req(sap_peer_agent_h peer_agent,
         break;
     case SAP_CONNECTION_ALREADY_EXIST:
         priv_data.socket = socket;
-        LOGI("Connection Already Exist");
+        STLOGI("Connection Already Exist");
         break;
     case SAP_CONNECTION_FAILURE_DEVICE_UNREACHABLE:
         STLOGW("Connection failure device unreachable");
@@ -1045,7 +1045,7 @@ _on_service_connection_created(sap_peer_agent_h peer_agent,
 
         sap_socket_set_data_received_cb(socket, on_data_received, peer_agent);
         priv->socket = socket;
-        LOGI("Connection Established");
+        STLOGI("Connection Established");
 
         process_request_queue();
 
@@ -1053,7 +1053,7 @@ _on_service_connection_created(sap_peer_agent_h peer_agent,
 
     case SAP_CONNECTION_ALREADY_EXIST:
         priv->socket = socket;
-        LOGI("Connection Already Exist");
+        STLOGI("Connection Already Exist");
         break;
 
     case SAP_CONNECTION_FAILURE_DEVICE_UNREACHABLE:
index a829059..07e6a24 100644 (file)
@@ -81,12 +81,12 @@ static bool check_battery_condition()
         return false;
     }
 
-    LOGI("battery percent : %d", battery_percentage);
+    STLOGI("battery percent : %d", battery_percentage);
     if (battery_percentage >= MINIMUM_BATTERY)
         return true;
     else
     {
-        LOGI("No sync due to insufficient battery");
+        STLOGI("No sync due to insufficient battery");
         return false;
     }
 }
@@ -249,7 +249,7 @@ static void app_control(app_control_h app_control, void *data)
                 param_error = true;
             }
 
-            LOGI("[sync request] mode : %s, type : %s", mode, type);
+            STLOGI("[sync request] mode : %s, type : %s", mode, type);
             if (param_error)
                 goto cleanup;
 
index 435d507..fa7c2ff 100644 (file)
@@ -107,7 +107,7 @@ insert_sticker_data(const char *filepath, const char *keyword, const char *group
         STLOGE("Failed to insert data. error code : %x. message : %s", ret, get_error_message(ret));
     }
     else {
-        LOGI("Succeeded to insert data");
+        STLOGI("Succeeded to insert data");
     }
 
     /* Destroys a sticker data handle */
@@ -172,4 +172,4 @@ void delete_all_stickers(const char *groupName)
     ret = sticker_provider_data_foreach_all(sticker_provider, 0, total_cnt, &result, _delete_all_stickers_cb, (void *)groupName);
     if (ret != STICKER_ERROR_NONE)
         STLOGE("Failed to retrieve all sticker data. ret : %d", ret);
-}
\ No newline at end of file
+}