From 482805ea8012b14ac834ad21e0d45ce7860a6106 Mon Sep 17 00:00:00 2001 From: sooyeon Date: Thu, 30 Jun 2022 17:44:12 +0900 Subject: [PATCH] Rename function name and Rearrange codes Change-Id: Iaa053e9004dd3aaf3e6caa99bfcab5288d73211b Signed-off-by: sooyeon --- server/vcd_engine_agent.c | 2 +- server/vcd_server.c | 14 +++++++------- server/vcd_tidl.c | 10 +++++++--- server/vcd_tidl.h | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/server/vcd_engine_agent.c b/server/vcd_engine_agent.c index 9c3c9c1..c000e7b 100644 --- a/server/vcd_engine_agent.c +++ b/server/vcd_engine_agent.c @@ -922,7 +922,7 @@ int vcd_engine_agent_start_recording() SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to start recorder : result(%d)", ret); vcd_engine_recognize_cancel(); /* Send error cb to manager */ - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.vcfw.send_rc_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.vcfw.send_rc_fail"); return ret; } diff --git a/server/vcd_server.c b/server/vcd_server.c index 16717a5..f22895f 100644 --- a/server/vcd_server.c +++ b/server/vcd_server.c @@ -145,9 +145,9 @@ static int __server_recorder_callback(const void* data, const unsigned int lengt ecore_timer_add(0, __cancel_by_interrupt, NULL); /* Send error cb to manager */ if (VCE_ERROR_OUT_OF_NETWORK == ret) { - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_TIMED_OUT, "voice_framework.error.engine.set_recording_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_TIMED_OUT, "voice_framework.error.engine.set_recording_fail"); } else { - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), ret, "voice_framework.error.engine.set_recording_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), ret, "voice_framework.error.engine.set_recording_fail"); } return VCD_ERROR_NONE; } @@ -1123,7 +1123,7 @@ int vcd_send_error(vce_error_e error, const char* msg, void *user_data) int pid = __get_tts_played_pid(); ret = vcdc_send_error_signal_to_app(pid, error, error_msg); } else { - ret = vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), error, error_msg); + ret = vcdc_send_error_to_manager(vcd_client_manager_get_pid(), error, error_msg); ecore_main_loop_thread_safe_call_async(__cancel_by_error, NULL); } @@ -1898,7 +1898,7 @@ static int __start_internal_recognition() /* Send error cb to manager */ int pid = vcd_client_widget_get_foreground_pid(); if (-1 != pid) - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.vcfw.collect_command_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.vcfw.collect_command_fail"); return VCD_ERROR_OPERATION_FAILED; } @@ -1909,7 +1909,7 @@ static int __start_internal_recognition() /* Send error cb to manager */ int pid = vcd_client_widget_get_foreground_pid(); if (-1 != pid) - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.engine.set_commands_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.engine.set_commands_fail"); return VCD_ERROR_OPERATION_FAILED; } @@ -1929,7 +1929,7 @@ static int __start_internal_recognition() /* Send error cb to manager */ int pid = vcd_client_widget_get_foreground_pid(); if (-1 != pid) - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), ret, "voice_framework.error.engine.start_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), ret, "voice_framework.error.engine.start_fail"); return ret; } @@ -1944,7 +1944,7 @@ static int __start_internal_recognition() /* Send error cb to manager */ int pid = vcd_client_widget_get_foreground_pid(); if (-1 != pid) - vcdc_tidl_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.vcfw.send_rc_fail"); + vcdc_send_error_to_manager(vcd_client_manager_get_pid(), VCD_ERROR_OPERATION_FAILED, "voice_framework.error.vcfw.send_rc_fail"); return ret; } #endif diff --git a/server/vcd_tidl.c b/server/vcd_tidl.c index 237488f..631643b 100644 --- a/server/vcd_tidl.c +++ b/server/vcd_tidl.c @@ -57,7 +57,9 @@ extern int __setting_tidl_open_connection(); extern int __setting_tidl_close_connection(); -/* For common request */ +/** + * For common request + */ static void __request_tidl_connect(vcd_client_type_e type, int pid) { char* type_str = NULL; @@ -1916,7 +1918,9 @@ int __setting_tidl_close_connection() } - +/** + * Functions for sending the information to client sides + */ int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg) { if (NULL == err_msg) { @@ -2376,7 +2380,7 @@ int vcdc_send_dialog(int manager_pid, int pid, const char* disp_text, const char return VCD_ERROR_NONE; } -int vcdc_tidl_send_error_to_manager(int manager_pid, int reason, char *err_msg) +int vcdc_send_error_to_manager(int manager_pid, int reason, char *err_msg) { SLOG(LOG_ERROR, TAG_VCD, "[TIDL] Send error signal to manager"); diff --git a/server/vcd_tidl.h b/server/vcd_tidl.h index 839258b..4b555f3 100644 --- a/server/vcd_tidl.h +++ b/server/vcd_tidl.h @@ -52,7 +52,7 @@ int vcdc_send_speech_detected(int manger_pid); // int vcdc_tidl_send_error(int reason, char *err_msg); -int vcdc_tidl_send_error_to_manager(int manager_pid, int reason, char *err_msg); +int vcdc_send_error_to_manager(int manager_pid, int reason, char *err_msg); int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg); -- 2.34.1