From: sooyeon Date: Thu, 4 Aug 2022 01:31:44 +0000 (+0900) Subject: Remove unused codes X-Git-Tag: accepted/tizen/unified/20220826.161539~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F279243%2F1;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Remove unused codes Change-Id: Ie4c287f6745631d386d8aa5edc387c4662c1a95d Signed-off-by: sooyeon --- diff --git a/client/vc.c b/client/vc.c index 4b872c2..3d359bb 100644 --- a/client/vc.c +++ b/client/vc.c @@ -1563,24 +1563,8 @@ static void __vc_notify_error(void *data) } } -int __vc_cb_error(int reason, int daemon_pid, char* msg) +int __vc_cb_error_to_app(int pid, int reason, const char* msg) { - vc_state_e state; - if (0 != vc_client_get_client_state(&state)) { - SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Invalid client"); - return VC_ERROR_INVALID_PARAMETER; - } - - /* check state */ - if (state != VC_STATE_READY) { - SLOG(LOG_DEBUG, TAG_VCC, "[DEBUG] State is not READY"); - if (VC_ERROR_SERVICE_RESET != reason) { - SLOG(LOG_ERROR, TAG_VCC, "[ERROR] not connected client yet(%d)", reason); - return VC_ERROR_INVALID_STATE; - } - return VC_ERROR_NONE; - } - if (VC_ERROR_SERVICE_RESET == reason) { SLOG(LOG_ERROR, TAG_VCC, "[ERROR] VC daemon reset"); @@ -1592,18 +1576,7 @@ int __vc_cb_error(int reason, int daemon_pid, char* msg) } } - SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Error reason(%d), msg(%s)", reason, msg); - - vc_client_set_error(reason); - ecore_main_loop_thread_safe_call_async(__vc_notify_error, NULL); - - return VC_ERROR_NONE; -} - -int __vc_cb_error_to_app(int pid, int reason, const char* msg) -{ - SLOG(LOG_INFO, TAG_VCC, "[INFO] send error to app(%d)", pid); - SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Error reason(%d), msg(%s)", reason, msg); + SLOG(LOG_ERROR, TAG_VCC, "[INFO] send error to app(%d), error reason(%d), msg(%s)", pid, reason, msg); vc_client_set_error(reason); ecore_main_loop_thread_safe_call_async(__vc_notify_error, NULL); diff --git a/client/vc_tidl.c b/client/vc_tidl.c index 46fc18a..ac5550f 100644 --- a/client/vc_tidl.c +++ b/client/vc_tidl.c @@ -37,7 +37,6 @@ typedef struct { static GList* g_tidl_infos = NULL; -extern int __vc_cb_error(int reason, int daemon_pid, char* msg); extern int __vc_cb_error_to_app(int pid, int reason, char* msg); extern void __vc_cb_result(); extern int __vc_cb_service_state(int state); @@ -200,19 +199,6 @@ static void __notify_cb(void* user_data, int pid, bundle* msg) __vc_cb_manager_pid(atoi(manager_pid)); } } /* VCD_METHOD_SEND_MANAGER_PID */ - else if (0 == strncmp(VCD_METHOD_ERROR, method, strlen(VCD_METHOD_ERROR))) { - /* signal!!! */ - char* reason = NULL; - char* daemon_pid = NULL; - char* err_msg = NULL; - - bundle_get_str(msg, VC_BUNDLE_REASON, &reason); - bundle_get_str(msg, VC_BUNDLE_DAEMON_PID, &daemon_pid); - bundle_get_str(msg, VC_BUNDLE_ERR_MSG, &err_msg); - - SLOG(LOG_DEBUG, TAG_VCC, "@@ vc Get Error message : reason(%d), daemon_pid(%d), msg(%s)", atoi(reason), atoi(daemon_pid), err_msg); - __vc_cb_error(atoi(reason), atoi(daemon_pid), err_msg); - } /* VCD_METHOD_ERROR */ else if (0 == strncmp(VCD_METHOD_ERROR_TO_APP, method, strlen(VCD_METHOD_ERROR_TO_APP))) { /* signal!!! */ char* pid; diff --git a/common/vc_defs.h b/common/vc_defs.h index e163687..0f09459 100644 --- a/common/vc_defs.h +++ b/common/vc_defs.h @@ -115,7 +115,6 @@ extern "C" { #define VCD_METHOD_RESULT "vcd_method_result" -#define VCD_METHOD_ERROR "vcd_method_error" #define VCD_METHOD_ERROR_TO_APP "vcd_method_error_to_app" #define VCD_METHOD_HELLO "vcd_method_hello" #define VCD_METHOD_SET_SERVICE_STATE "vcd_method_set_service_state"