From: sooyeon.kim Date: Thu, 9 Jun 2016 07:57:35 +0000 (+0900) Subject: [Code Review] Fix codes X-Git-Tag: accepted/tizen/common/20160609.151345^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa8a2de43dfb393f022e576b54e37eadb5992307;p=platform%2Fcore%2Fuifw%2Fvoice-control.git [Code Review] Fix codes Change-Id: I276d19b41172aa86c94b281c412a2b9dd499a334 Signed-off-by: sooyeon.kim --- diff --git a/client/vc_mgr.c b/client/vc_mgr.c index b0ae203..0623886 100644 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -296,62 +296,6 @@ static Eina_Bool __vc_mgr_prepare_daemon(void *data) g_m_connect_timer = ecore_idler_add(__vc_mgr_connect_daemon, data); -#if 0 - /* request initialization */ - int ret = -1; - int service_state = 0; - int foreground = VC_RUNTIME_INFO_NO_FOREGROUND; - ret = vc_mgr_dbus_request_initialize(g_vc_m->handle, &service_state, &foreground, &g_daemon_pid); - - if (VC_ERROR_ENGINE_NOT_FOUND == ret) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to initialize : %s", __vc_mgr_get_error_code(ret)); - - vc_mgr_client_set_error(g_vc_m, VC_ERROR_ENGINE_NOT_FOUND); - ecore_timer_add(0, __vc_mgr_notify_error, g_vc_m); - - SLOG(LOG_DEBUG, TAG_VCM, "====="); - SLOG(LOG_DEBUG, TAG_VCM, " "); - return EINA_FALSE; - - } else if (0 != ret) { - SLOG(LOG_ERROR, TAG_VCM, "[WARNING] Fail to connection. Retry to connect : %s", __vc_mgr_get_error_code(ret)); - return EINA_TRUE; - } else { - /* Success to connect */ - } - - /* Set service state */ - vc_mgr_client_set_service_state(g_vc_m, (vc_service_state_e)service_state); - - /* Set foreground */ - vc_mgr_client_set_foreground(g_vc_m, foreground, true); - - SLOG(LOG_DEBUG, TAG_VCM, "[SUCCESS] Connected daemon"); - - vc_mgr_client_set_client_state(g_vc_m, VC_STATE_READY); - - vc_state_changed_cb changed_callback = NULL; - void* user_data = NULL; - - vc_mgr_client_get_state_changed_cb(g_vc_m, &changed_callback, &user_data); - - vc_state_e current_state; - vc_state_e before_state; - - vc_mgr_client_get_before_state(g_vc_m, ¤t_state, &before_state); - - if (NULL != changed_callback) { - vc_mgr_client_use_callback(g_vc_m); - changed_callback(before_state, current_state, user_data); - vc_mgr_client_not_use_callback(g_vc_m); - SLOG(LOG_DEBUG, TAG_VCM, "State changed callback is called"); - } else { - SLOG(LOG_WARN, TAG_VCM, "[WARNING] State changed callback is null"); - } - - SLOG(LOG_DEBUG, TAG_VCM, "====="); - SLOG(LOG_DEBUG, TAG_VCM, " "); -#endif return EINA_FALSE; } @@ -1516,11 +1460,6 @@ static Eina_Bool __vc_mgr_set_select_result(void *data) return EINA_FALSE; } -int vc_mgr_set_nlp_info(const char* info) -{ - return 0; -} - int vc_mgr_get_nlp_info(char** info) { SLOG(LOG_DEBUG, TAG_VCM, "===== [Manager] Get nlp info"); diff --git a/include/voice_control_manager.h b/include/voice_control_manager.h index 8909b57..47e2ff0 100644 --- a/include/voice_control_manager.h +++ b/include/voice_control_manager.h @@ -533,8 +533,6 @@ int vc_mgr_get_recording_volume(float* volume); int vc_mgr_set_selected_results(vc_cmd_list_h vc_cmd_list); -int vc_mgr_set_nlp_info(const char* info); - int vc_mgr_get_nlp_info(char** info); int vc_mgr_set_pre_result_cb(vc_mgr_pre_result_cb callback, void* user_data); diff --git a/include/voice_control_plugin_engine.h b/include/voice_control_plugin_engine.h index 3d257a2..5649ace 100644 --- a/include/voice_control_plugin_engine.h +++ b/include/voice_control_plugin_engine.h @@ -290,8 +290,6 @@ typedef int (*vcpe_set_commands)(vcp_cmd_h vcp_command); typedef int (*vcpe_unset_commands)(); // Add new -typedef int (*vcpe_set_nlp_info)(const char* info); - typedef int (*vcpe_get_nlp_info)(char** info); /** @@ -454,7 +452,6 @@ typedef struct { vcpe_set_language set_language; /**< Set language */ vcpe_set_commands set_commands; /**< Request to set current commands */ vcpe_unset_commands unset_commands; /**< Request to unset current commands */ - vcpe_set_nlp_info set_nlp_info; /**< Set nlp info */ vcpe_get_nlp_info get_nlp_info; /**< Get nlp info */ /* Control recognition */ diff --git a/server/vcd_engine_agent.c b/server/vcd_engine_agent.c index cfa89ad..0100ac1 100644 --- a/server/vcd_engine_agent.c +++ b/server/vcd_engine_agent.c @@ -472,7 +472,6 @@ void __pre_result_cb(vcp_pre_result_event_e event, const char* pre_result, void* SLOG(LOG_DEBUG, TAG_VCD, "[Engine Agent ERROR] Result callback function is NOT valid"); } - return; } void __result_cb(vcp_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed, const char* msg, void *user_data)