Merge "Reset waiting flag when recognition starts by widget" into tizen
authorWonnam Jang <wn.jang@samsung.com>
Thu, 25 Jan 2018 06:25:01 +0000 (06:25 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 25 Jan 2018 06:25:01 +0000 (06:25 +0000)
client/vc.c
client/vc_mgr.c
client/vc_widget.c
common/vc_config_parser.c
server/vcd_server.c

index c942050..da52879 100644 (file)
@@ -566,7 +566,6 @@ static void __start_prepare_thread(void *data, Ecore_Thread *thread)
 
        /* Send hello */
        while (0 != ret) {
-
                if (retry_count == 10) {
                        SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to request hello !!");
                        return;
@@ -655,7 +654,7 @@ int vc_prepare_sync(void)
 
        /* check state */
        if (state != VC_STATE_INITIALIZED) {
-               SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Invalid State: Current state is not 'CREATED'");
+               SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Invalid State: Current state is not 'INITIALIZED'");
                SLOG(LOG_DEBUG, TAG_VCC, "@@@");
                return VC_ERROR_INVALID_STATE;
        }
@@ -913,11 +912,17 @@ int vc_get_system_command_list(vc_cmd_list_h* vc_sys_cmd_list)
        bool is_sys_cmd_valid = false;
        int count = 0;
        int ret = -1;
-
+       bool is_prepared = false;
        do {
                ret = vc_dbus_request_is_system_command_valid(g_vc->handle, &is_sys_cmd_valid);
                if (0 != ret) {
-                       if (VC_ERROR_TIMED_OUT != ret) {
+                       if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                               vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                               if (0 == vc_prepare_sync()) {
+                                       is_prepared = true;
+                                       SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                               }
+                       } else if (VC_ERROR_TIMED_OUT != ret) {
                                SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to ask system command is : %s", __vc_get_error_code(ret));
                                break;
                        } else {
@@ -1150,10 +1155,17 @@ int vc_set_command_list(vc_cmd_list_h vc_cmd_list, int type)
                SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to save command list : %s", __vc_get_error_code(ret));
        } else {
                int count = 0;
+               bool is_prepared = false;
                do {
                        ret = vc_dbus_request_set_command(g_vc->handle, (vc_cmd_type_e)type);
                        if (0 != ret) {
-                               if (VC_ERROR_TIMED_OUT != ret) {
+                               if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                                       vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                                       if (0 == vc_prepare_sync()) {
+                                               is_prepared = true;
+                                               SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                                       }
+                               } else if (VC_ERROR_TIMED_OUT != ret) {
                                        SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to request set command to daemon : %s", __vc_get_error_code(ret));
                                        break;
                                } else {
@@ -1209,10 +1221,17 @@ int vc_unset_command_list(int type)
 
        int count = 0;
        int ret = -1;
+       bool is_prepared = false;
        while (0 != ret) {
                ret = vc_dbus_request_unset_command(g_vc->handle, (vc_cmd_type_e)type);
                if (0 != ret) {
-                       if (VC_ERROR_TIMED_OUT != ret) {
+                       if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                               vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                               if (0 == vc_prepare_sync()) {
+                                       is_prepared = true;
+                                       SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                               }
+                       } else if (VC_ERROR_TIMED_OUT != ret) {
                                SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to request unset command to daemon : %s", __vc_get_error_code(ret));
                                break;
                        } else {
@@ -1289,10 +1308,17 @@ int vc_set_command_list_from_file(const char* file_path, int type)
                SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to set commands from file : %s", __vc_get_error_code(ret));
        } else {
                int count = 0;
+               bool is_prepared = false;
                do {
                        ret = vc_dbus_request_set_command(g_vc->handle, (vc_cmd_type_e)type);
                        if (0 != ret) {
-                               if (VC_ERROR_TIMED_OUT != ret) {
+                               if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                                       vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                                       if (0 == vc_prepare_sync()) {
+                                               is_prepared = true;
+                                               SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                                       }
+                               } else if (VC_ERROR_TIMED_OUT != ret) {
                                        SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to request set command to daemon : %s", __vc_get_error_code(ret));
                                        break;
                                } else {
@@ -2411,15 +2437,20 @@ int vc_auth_start(void)
                return VC_ERROR_OPERATION_FAILED;
        }
 
-       int ret;
+       int ret = -1;
        int count = 0;
+       bool is_prepared = false;
        /* Request */
-       ret = -1;
-       count = 0;
        while (0 != ret) {
                ret = vc_dbus_request_auth_start(g_vc->handle, mgr_pid);
                if (0 != ret) {
-                       if (VC_ERROR_TIMED_OUT != ret) {
+                       if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                               vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                               if (0 == vc_prepare_sync()) {
+                                       is_prepared = true;
+                                       SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                               }
+                       } else if (VC_ERROR_TIMED_OUT != ret) {
                                SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to request auth start : %s", __vc_get_error_code(ret));
                                break;
                        } else {
@@ -2489,11 +2520,18 @@ int vc_auth_stop(void)
 
        int ret = -1;
        int count = 0;
+       bool is_prepared = false;
        /* do request */
        while (0 != ret) {
                ret = vc_dbus_request_auth_stop(g_vc->handle, mgr_pid);
                if (0 != ret) {
-                       if (VC_ERROR_TIMED_OUT != ret) {
+                       if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                               vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                               if (0 == vc_prepare_sync()) {
+                                       is_prepared = true;
+                                       SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                               }
+                       } else if (VC_ERROR_TIMED_OUT != ret) {
                                SLOG(LOG_DEBUG, TAG_VCC, "[ERROR] Fail to request auth stop: %s", __vc_get_error_code(ret));
                                break;
                        } else {
@@ -2563,10 +2601,17 @@ int vc_auth_cancel(void)
 
        int ret = -1;
        int count = 0;
+       bool is_prepared = false;
        while (0 != ret) {
                ret = vc_dbus_request_auth_cancel(g_vc->handle, mgr_pid);
                if (0 != ret) {
-                       if (VC_ERROR_TIMED_OUT != ret) {
+                       if (VC_ERROR_INVALID_PARAMETER == ret && false == is_prepared) {
+                               vc_client_set_client_state(g_vc, VC_STATE_INITIALIZED);
+                               if (0 == vc_prepare_sync()) {
+                                       is_prepared = true;
+                                       SLOG(LOG_INFO, TAG_VCC, "[INFO] Success vc_prepare_sync");
+                               }
+                       } else if (VC_ERROR_TIMED_OUT != ret) {
                                SLOG(LOG_DEBUG, TAG_VCC, "[ERROR] Fail to request auth cancel: %s", __vc_get_error_code(ret));
                                break;
                        } else {
index 5e33f6a..2ed9ab5 100644 (file)
@@ -123,7 +123,7 @@ static int __vc_mgr_get_feature_enabled()
 
 int vc_mgr_initialize()
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Initialize");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Initialize");
 
 
        if (0 != __vc_mgr_get_feature_enabled()) {
@@ -170,7 +170,7 @@ int vc_mgr_initialize()
                return ret;
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "[Success] pid(%d)", g_vc_m->handle);
+       SLOG(LOG_ERROR, TAG_VCM, "[Success] pid(%d)", g_vc_m->handle);
 
        SLOG(LOG_DEBUG, TAG_VCM, "@@@");
 
@@ -190,7 +190,7 @@ static void __vc_mgr_internal_unprepare()
 
 int vc_mgr_deinitialize()
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Deinitialize");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Deinitialize");
 
        if (false == vc_mgr_client_is_valid(g_vc_m)) {
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] NOT initialized");
@@ -242,7 +242,7 @@ int vc_mgr_deinitialize()
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to close connection");
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@");
 
        return VC_ERROR_NONE;
 }
@@ -280,7 +280,7 @@ static Eina_Bool __vc_mgr_connect_daemon(void *data)
        /* Set foreground */
        vc_mgr_client_set_foreground(g_vc_m, foreground, true);
 
-       SLOG(LOG_DEBUG, TAG_VCM, "[SUCCESS] Connected daemon");
+       SLOG(LOG_ERROR, TAG_VCM, "[SUCCESS] Connected daemon");
 
        vc_mgr_client_set_client_state(g_vc_m, VC_STATE_READY);
 
@@ -354,7 +354,7 @@ static void __end_prepare_thread(void *data, Ecore_Thread *thread)
 
 int vc_mgr_prepare()
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Prepare");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Prepare");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -379,7 +379,7 @@ int vc_mgr_prepare()
 
 int vc_mgr_unprepare()
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Unprepare");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Unprepare");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -453,7 +453,7 @@ int vc_mgr_get_current_language(char** language)
                ret = vc_config_convert_error_code((vc_config_error_e)ret);
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to get current languages : %s", __vc_mgr_get_error_code(ret));
        } else {
-               SLOG(LOG_DEBUG, TAG_VCM, "[Get current language] language : %s", *language);
+               SLOG(LOG_ERROR, TAG_VCM, "[Get current language] language : %s", *language);
        }
 
        return ret;
@@ -597,7 +597,7 @@ int vc_mgr_unset_demandable_client_rule()
 
 int vc_mgr_is_command_format_supported(vc_cmd_format_e format, bool* support)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Is command type supported");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Is command type supported");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -630,7 +630,7 @@ int vc_mgr_is_command_format_supported(vc_cmd_format_e format, bool* support)
 
 int vc_mgr_enable_command_type(int cmd_type)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Enable Command Type");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Enable Command Type, cmd_type(%d)", cmd_type);
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -675,14 +675,14 @@ int vc_mgr_enable_command_type(int cmd_type)
                }
        } while (0 != ret);
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
 
        return ret;
 }
 
 int vc_mgr_disable_command_type(int cmd_type)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Disable Command Type");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Disable Command Type, cmd_type(%d)", cmd_type);
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -727,14 +727,14 @@ int vc_mgr_disable_command_type(int cmd_type)
                }
        } while (0 != ret);
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
 
        return ret;
 }
 
 int vc_mgr_set_command_list(vc_cmd_list_h vc_cmd_list)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Set Command list");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Set Command list");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -814,14 +814,14 @@ int vc_mgr_set_command_list(vc_cmd_list_h vc_cmd_list)
                } while (0 != ret);
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
 
        return ret;
 }
 
 int vc_mgr_unset_command_list()
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Unset Command list");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Unset Command list");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -862,14 +862,14 @@ int vc_mgr_unset_command_list()
                        SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to delete file, type(%d), ret(%d)", i, ret);
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@");
 
        return 0;
 }
 
 int vc_mgr_set_command_list_from_file(const char* file_path, int type)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Set Command list from file");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Set Command list from file, type(%d)", type);
 
        if (NULL == file_path) {
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid parameter!!");
@@ -933,14 +933,14 @@ int vc_mgr_set_command_list_from_file(const char* file_path, int type)
                } while (0 != ret);
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
 
        return ret;
 }
 
 int vc_mgr_set_preloaded_commands_from_file(const char* file_path)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Set preloaded command list");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Set preloaded command list");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -967,13 +967,13 @@ int vc_mgr_set_preloaded_commands_from_file(const char* file_path)
        if (0 != ret)
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to insert preloaded commands into db");
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
        return ret;
 }
 
 int vc_mgr_set_audio_type(const char* audio_id)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Set audio type");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Set audio type, audio_id(%s)", audio_id);
 
        if (NULL == audio_id) {
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Input parameter is NULL");
@@ -1029,14 +1029,14 @@ int vc_mgr_set_audio_type(const char* audio_id)
                }
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
 
        return ret;
 }
 
 int vc_mgr_get_audio_type(char** audio_id)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Get audio type");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Get audio type");
 
        if (NULL == audio_id) {
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Input parameter is NULL");
@@ -1090,7 +1090,7 @@ int vc_mgr_get_audio_type(char** audio_id)
                                        }
                                }
                        } else {
-                               SLOG(LOG_DEBUG, TAG_VCM, "[SUCCESS] Get audio type : %s", temp);
+                               SLOG(LOG_ERROR, TAG_VCM, "[SUCCESS] Get audio type : %s", temp);
                                /* Save */
                                vc_mgr_client_set_audio_type(g_vc_m, temp);
                        }
@@ -1108,7 +1108,7 @@ int vc_mgr_get_audio_type(char** audio_id)
 
 int vc_mgr_get_current_commands(vc_cmd_list_h* vc_cmd_list)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Foreach current commands");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Foreach current commands");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -1294,7 +1294,7 @@ int vc_mgr_get_current_commands(vc_cmd_list_h* vc_cmd_list)
                SLOG(LOG_DEBUG, TAG_VCM, "[Manager] No background commands");
        }
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@");
 
        return 0;
 }
@@ -1587,7 +1587,7 @@ int vc_mgr_do_action(vc_send_event_type_e type, char* send_event)
 
 int vc_mgr_start(bool exclusive_command_option)
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Request start");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Request start");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
@@ -1665,14 +1665,14 @@ int vc_mgr_start(bool exclusive_command_option)
        g_prev_volume_db = 0;
        g_cur_volume_db = 0;
 
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@, ret(%d)", ret);
 
        return ret;
 }
 
 int vc_mgr_stop()
 {
-       SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Request stop");
+       SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Request stop");
 
        vc_state_e state;
        if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
index 7fd9c4a..89426e1 100644 (file)
@@ -256,6 +256,11 @@ int vc_widget_deinitialize(vc_h vc_w)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Deinitialize");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (false == vc_widget_client_is_valid(vc_w)) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] NOT initialized");
                SLOG(LOG_DEBUG, TAG_VCW, "@@@");
@@ -411,6 +416,11 @@ int vc_widget_prepare(vc_h vc_w)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Prepare");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        vc_state_e state;
        if (0 != vc_widget_client_get_state(vc_w, &state)) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] A handle is not available");
@@ -443,6 +453,11 @@ int vc_widget_unprepare(vc_h vc_w)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Unprepare");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        vc_state_e state;
        if (0 != vc_widget_client_get_state(vc_w, &state)) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] A handle is not available");
@@ -471,6 +486,11 @@ int vc_widget_enable_asr_result(vc_h vc_w, bool enable)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Enable asr result");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        vc_state_e state;
        if (0 != vc_widget_client_get_state(vc_w, &state)) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] A handle is not available");
@@ -517,6 +537,11 @@ int vc_widget_foreach_supported_languages(vc_h vc_w, vc_supported_language_cb ca
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Foreach Supported Language");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == callback) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                SLOG(LOG_DEBUG, TAG_VCW, "@@@");
@@ -546,6 +571,11 @@ int vc_widget_get_current_language(vc_h vc_w, char** language)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Get Current Language");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == language) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                SLOG(LOG_DEBUG, TAG_VCW, "@@@");
@@ -575,6 +605,11 @@ int vc_widget_get_state(vc_h vc_w, vc_state_e* state)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Get State");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == state) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -605,6 +640,11 @@ int vc_widget_get_service_state(vc_h vc_w, vc_service_state_e* state)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Get Service State");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == state) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -649,6 +689,11 @@ int vc_widget_set_foreground(vc_h vc_w, bool value)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Set foreground state");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        vc_state_e state;
        if (0 != vc_widget_client_get_state(vc_w, &state)) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] A handle is not valid");
@@ -881,6 +926,11 @@ int vc_widget_cancel(vc_h vc_w)
 {
        SLOG(LOG_DEBUG, TAG_VCW, "@@@ [Widget] Cancel Recognition");
 
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        vc_state_e state;
        if (0 != vc_widget_client_get_state(vc_w, &state)) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] A handle is not available");
@@ -1270,6 +1320,11 @@ static Eina_Bool __vc_widget_notify_state_changed(void *data)
 
 int vc_widget_set_result_cb(vc_h vc_w, vc_result_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1297,6 +1352,11 @@ int vc_widget_set_result_cb(vc_h vc_w, vc_result_cb callback, void* user_data)
 
 int vc_widget_unset_result_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1322,6 +1382,11 @@ int vc_widget_unset_result_cb(vc_h vc_w)
 
 int vc_widget_set_show_tooltip_cb(vc_h vc_w, vc_widget_show_tooltip_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1350,6 +1415,11 @@ int vc_widget_set_show_tooltip_cb(vc_h vc_w, vc_widget_show_tooltip_cb callback,
 
 int vc_widget_unset_show_tooltip_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1375,6 +1445,11 @@ int vc_widget_unset_show_tooltip_cb(vc_h vc_w)
 
 int vc_widget_set_send_current_command_list_cb(vc_h vc_w, vc_widget_send_current_command_list_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1400,6 +1475,11 @@ int vc_widget_set_send_current_command_list_cb(vc_h vc_w, vc_widget_send_current
 
 int vc_widget_unset_send_current_command_list_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1471,6 +1551,11 @@ int __vc_widget_cb_service_state(int state)
 
 int vc_widget_set_service_state_changed_cb(vc_h vc_w, vc_service_state_changed_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1496,6 +1581,11 @@ int vc_widget_set_service_state_changed_cb(vc_h vc_w, vc_service_state_changed_c
 
 int vc_widget_unset_service_state_changed_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1521,6 +1611,11 @@ int vc_widget_unset_service_state_changed_cb(vc_h vc_w)
 
 int vc_widget_set_state_changed_cb(vc_h vc_w, vc_state_changed_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1549,6 +1644,11 @@ int vc_widget_set_state_changed_cb(vc_h vc_w, vc_state_changed_cb callback, void
 
 int vc_widget_unset_state_changed_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1574,6 +1674,11 @@ int vc_widget_unset_state_changed_cb(vc_h vc_w)
 
 int vc_widget_set_asr_result_cb(vc_h vc_w, vc_asr_result_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1602,6 +1707,11 @@ int vc_widget_set_asr_result_cb(vc_h vc_w, vc_asr_result_cb callback, void* user
 
 int vc_widget_unset_asr_result_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1627,6 +1737,11 @@ int vc_widget_unset_asr_result_cb(vc_h vc_w)
 
 int vc_widget_set_current_language_changed_cb(vc_h vc_w, vc_current_language_changed_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1655,6 +1770,11 @@ int vc_widget_set_current_language_changed_cb(vc_h vc_w, vc_current_language_cha
 
 int vc_widget_unset_current_language_changed_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1680,6 +1800,11 @@ int vc_widget_unset_current_language_changed_cb(vc_h vc_w)
 
 int vc_widget_set_error_cb(vc_h vc_w, vc_error_cb callback, void* user_data)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
@@ -1708,6 +1833,11 @@ int vc_widget_set_error_cb(vc_h vc_w, vc_error_cb callback, void* user_data)
 
 int vc_widget_unset_error_cb(vc_h vc_w)
 {
+       if (0 != __vc_widget_get_feature_enabled()) {
+               SLOG(LOG_INFO, TAG_VCW, "@@@ [Widget] not supported");
+               return VC_ERROR_NONE;
+       }
+
        if (NULL == vc_w) {
                SLOG(LOG_ERROR, TAG_VCW, "[ERROR] Input parameter is NULL");
                return VC_ERROR_INVALID_PARAMETER;
index 0048a05..ac89c5a 100644 (file)
@@ -322,7 +322,14 @@ int vc_parser_load_config(vc_config_s** config_info)
 
                        if (VC_RETRY_COUNT == retry_count) {
                                SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Fail to parse file error : %s", VC_CONFIG);
-                               return -1;
+                               doc = xmlParseFile(VC_CONFIG_DEFAULT);
+                               if (NULL == doc) {
+                                       SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Fail to parse file error : %s", VC_CONFIG_DEFAULT);
+                                       xmlCleanupParser();
+                                       return -1;
+                               }
+                               is_default_open = true;
+                               break;
                        }
                }
        }
@@ -426,9 +433,25 @@ int vc_parser_load_config(vc_config_s** config_info)
        g_config_doc = doc;
 
        if (is_default_open) {
-               xmlSaveFile(VC_CONFIG, g_config_doc);
+               int retry_count = 0;
+               int ret = -1;
+               do {
+                       ret = xmlSaveFile(VC_CONFIG, g_config_doc);
+                       if (0 < ret)
+                               break;
+                       retry_count++;
+                       usleep(10000);
+
+                       if (VC_RETRY_COUNT == retry_count) {
+                               SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Fail to save config file: %d", ret);
+                               return -1;
+                       }
+               } while (0 != ret);
+
                if (0 != __vc_config_parser_set_file_mode(VC_CONFIG))
                        SLOG(LOG_ERROR, vc_config_tag(), "[ERROR] Fail to set file mode - %s", VC_CONFIG);
+
+               SLOG(LOG_ERROR, vc_config_tag(), "Default config is changed : pid(%d)", getpid());
        }
 
        return 0;
index d6646f2..65fb25b 100755 (executable)
@@ -400,7 +400,7 @@ static Eina_Bool __vcd_send_selected_result(void *data)
                                                        SLOG(LOG_WARN, TAG_VCD, "[Server WARNING] Fail to send result, ret(%d)", ret);
                                                        break;
                                                } else {
-                                                       SLOG(LOG_DEBUG, TAG_VCD, "[Server] Send result : pid(%d) type(%d)", temp_cmd->pid, temp_cmd->type);
+                                                       SLOG(LOG_ERROR, TAG_VCD, "[Server] Send result : pid(%d) type(%d)", temp_cmd->pid, temp_cmd->type);
                                                        pre_pid = temp_cmd->pid;
                                                        pre_type = temp_cmd->type;
                                                }
@@ -440,6 +440,7 @@ int vcd_send_nlg_result(const char* nlg_result, void *user_data)
                return ret;
        }
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] send dialog : mgr_pid(%d), nlg_result(%s)", vcd_client_manager_get_pid(), nlg_result);
        ret = vcdc_send_dialog(vcd_client_manager_get_pid(), -1, nlg_result, NULL, 0); //0: VC_DIALOG_END
        if (0 != ret)
                SECURE_SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send dialog : mgr_pid(%d), nlg_result(%s)", vcd_client_manager_get_pid(), nlg_result);
@@ -469,6 +470,8 @@ int vcd_send_result(vce_result_event_e event, int* result_id, int count, const c
        SECURE_SLOG(LOG_INFO, TAG_VCD, "[Server] Event(%d), Text(%s) Nonfixed(%s) Msg(%s) Result count(%d)",
                event, all_result, non_fixed_result, msg, count);
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] NLU result(%s)", nlu_result);
+
        if (VCD_RECOGNITION_MODE_RESTART_AFTER_REJECT == vcd_client_get_recognition_mode()) {
                if (VCE_RESULT_EVENT_REJECTED == event) {
                        SLOG(LOG_DEBUG, TAG_VCD, "[Server] Restart by no or rejected result");
@@ -572,7 +575,7 @@ int vcd_send_result(vce_result_event_e event, int* result_id, int count, const c
                                                if (true == is_consumed) {
                                                        if (NULL != user_info) {
                                                                *user_info = 0x01;
-                                                               SLOG(LOG_DEBUG, TAG_VCD, "[Server] Send whether ASR result is consumed or not (%d)", *user_info);
+                                                               SLOG(LOG_ERROR, TAG_VCD, "[Server] Send whether ASR result is consumed or not (%d)", *user_info);
                                                        }
                                                        vcdc_send_show_tooltip(pid, false);
                                                        if (-1 != vcd_client_manager_get_pid()) {
@@ -1024,7 +1027,7 @@ int vcd_initialize(vce_request_callback_s *callback)
        vcd_config_set_service_state(VCD_STATE_READY);
        vcdc_send_service_state(VCD_STATE_READY);
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server SUCCESS] initialize");
+       SLOG(LOG_ERROR, TAG_VCD, "[Server SUCCESS] initialize");
 
        return 0;
 }
@@ -1069,7 +1072,7 @@ void vcd_finalize()
        vcd_config_set_service_state(VCD_STATE_NONE);
        vcdc_send_service_state(VCD_STATE_NONE);
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server] mode finalize");
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] mode finalize");
 
        return;
 }
@@ -1325,7 +1328,7 @@ int vcd_server_mgr_initialize(int pid)
        if (0 != vcdc_send_manager_pid(pid))
                SLOG(LOG_WARN, TAG_VCD, "[Server WARNING] Fail to send manager pid");
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server Success] Manager initialize : pid(%d)", pid);
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] Manager initialize : pid(%d)", pid);
 
        return VCD_ERROR_NONE;
 }
@@ -1354,7 +1357,7 @@ int vcd_server_mgr_finalize(int pid)
                ecore_timer_add(0, __finalize_quit_ecore_loop, NULL);
        }
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server Success] Manager Finalize : pid(%d)", pid);
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] Manager Finalize : pid(%d)", pid);
 
        return VCD_ERROR_NONE;
 }
@@ -1487,7 +1490,7 @@ static int __start_internal_recognition()
                return VCD_ERROR_OPERATION_FAILED;
        }
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server Success] Set command");
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] Set command");
 
        bool stop_by_silence = true;
        if (VCD_RECOGNITION_MODE_MANUAL == vcd_client_get_recognition_mode()) {
@@ -1507,7 +1510,7 @@ static int __start_internal_recognition()
                return VCD_ERROR_OPERATION_FAILED;
        }
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server Success] Start engine");
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] Start engine");
 
 #if 1
        /* 5. recorder start */
@@ -1526,7 +1529,7 @@ static int __start_internal_recognition()
        vcd_config_set_service_state(VCD_STATE_RECORDING);
        vcdc_send_service_state(VCD_STATE_RECORDING);
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server Success] Start recognition(%d)", stop_by_silence);
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] Start recognition(%d)", stop_by_silence);
 
        return 0;
 }
@@ -1535,7 +1538,7 @@ static Eina_Bool __vcd_request_show_tooltip(void *data)
 {
        int pid = vcd_client_widget_get_foreground_pid();
        if (-1 != pid) {
-               SLOG(LOG_DEBUG, TAG_VCD, "[Server] Request tooltip show and widget command");
+               SLOG(LOG_ERROR, TAG_VCD, "[Server] Request tooltip show and widget command, show(%d)", (bool)data);
                vcdc_send_show_tooltip(pid, (bool)data);
        }
 
@@ -1557,7 +1560,7 @@ int vcd_server_mgr_start(vcd_recognition_mode_e recognition_mode, bool exclusive
        }
        vcd_client_widget_set_waiting_for_recording(-1, false);
 
-       SLOG(LOG_DEBUG, TAG_VCD, "[Server] set recognition mode = %d", recognition_mode);
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] set recognition mode = %d", recognition_mode);
        vcd_client_set_recognition_mode(recognition_mode);
 
        if (false == exclusive_cmd) {
@@ -1566,7 +1569,7 @@ int vcd_server_mgr_start(vcd_recognition_mode_e recognition_mode, bool exclusive
                if (1 == vcd_config_get_command_type_enabled(VC_COMMAND_TYPE_WIDGET)) {
                        int pid = vcd_client_widget_get_foreground_pid();
                        if (-1 != pid) {
-                               SLOG(LOG_INFO, TAG_VCD, "[Server] Request tooltip show and widget command");
+                               SLOG(LOG_ERROR, TAG_VCD, "[Server] Request tooltip show and widget command");
                                ecore_timer_add(0, __vcd_request_show_tooltip, (void*)true);
                                vcd_client_widget_set_waiting_for_recording(pid, true);
                                return 0;
@@ -1589,6 +1592,8 @@ int vcd_server_mgr_start(vcd_recognition_mode_e recognition_mode, bool exclusive
                }
        }
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] start internal recognition");
+
        int ret = __start_internal_recognition();
        if (0 != ret) {
                SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to start recongition : %d", ret);
@@ -1599,6 +1604,7 @@ int vcd_server_mgr_start(vcd_recognition_mode_e recognition_mode, bool exclusive
                vcd_client_unset_exclusive_command(fg_pid);
        }
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] start internal recognition");
        return VCD_ERROR_NONE;
 }
 
@@ -1613,6 +1619,7 @@ int vcd_server_mgr_stop()
                SLOG(LOG_DEBUG, TAG_VCD, "[Server] Manager is NOT available.");
                return VCD_ERROR_OPERATION_FAILED;
        }
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] stop internal recognition");
 
 #if 1
        /* 2. Stop recorder */
@@ -1629,6 +1636,7 @@ int vcd_server_mgr_stop()
        vcd_config_set_service_state(VCD_STATE_PROCESSING);
        vcdc_send_service_state(VCD_STATE_PROCESSING);
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] stop internal recognition");
        return VCD_ERROR_NONE;
 }
 
@@ -1664,6 +1672,7 @@ int vcd_server_mgr_cancel()
                vcdc_send_service_state(VCD_STATE_READY);
                return VCD_ERROR_NONE;
        }
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] cancel internal recognition");
 
 #if 1
        /* 2. Stop recorder */
@@ -1692,6 +1701,7 @@ int vcd_server_mgr_cancel()
        vcd_config_set_service_state(VCD_STATE_READY);
        vcdc_send_service_state(VCD_STATE_READY);
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server Success] cancel internal recognition");
        return VCD_ERROR_NONE;
 }
 
@@ -1832,7 +1842,7 @@ int vcd_server_mgr_enable_command_type(int pid, int cmd_type)
        if (0 != ret) {
                SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to enable command type");
        } else {
-               SLOG(LOG_DEBUG, TAG_VCD, "[Server] Enable command type(%d)", cmd_type);
+               SLOG(LOG_ERROR, TAG_VCD, "[Server] Enable command type(%d)", cmd_type);
        }
 
        return ret;
@@ -1858,7 +1868,7 @@ int vcd_server_mgr_disable_command_type(int pid, int cmd_type)
        if (0 != ret) {
                SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to disable command type");
        } else {
-               SLOG(LOG_DEBUG, TAG_VCD, "[Server] Disable command type(%d)", cmd_type);
+               SLOG(LOG_ERROR, TAG_VCD, "[Server] Disable command type(%d)", cmd_type);
        }
 
        return ret;
@@ -2251,6 +2261,7 @@ int vcd_server_widget_start_recording(int pid, bool widget_command)
                SLOG(LOG_WARN, TAG_VCD, "[Server] widget command is NOT available");
        }
 
+       SLOG(LOG_ERROR, TAG_VCD, "[Server] start internal recongition : %d", widget_command);
        int ret = __start_internal_recognition();
        if (0 != ret) {
                SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to start recongition : %d", ret);