[Code Review] Fix codes 98/73698/2 accepted/tizen/common/20160609.151345 accepted/tizen/ivi/20160610.011837 accepted/tizen/mobile/20160610.012051 accepted/tizen/tv/20160610.011901 accepted/tizen/wearable/20160610.011946 submit/tizen/20160609.115018
authorsooyeon.kim <sooyeon.kim@samsung.com>
Thu, 9 Jun 2016 07:57:35 +0000 (16:57 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Thu, 9 Jun 2016 10:26:49 +0000 (19:26 +0900)
Change-Id: I276d19b41172aa86c94b281c412a2b9dd499a334
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
client/vc_mgr.c
include/voice_control_manager.h
include/voice_control_plugin_engine.h
server/vcd_engine_agent.c

index b0ae203..0623886 100644 (file)
@@ -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, &current_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");
index 8909b57..47e2ff0 100644 (file)
@@ -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);
index 3d257a2..5649ace 100644 (file)
@@ -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 */
index cfa89ad..0100ac1 100644 (file)
@@ -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)