/* Send hello */
while (0 != ret) {
-
if (retry_count == 10) {
SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to request hello !!");
return;
/* 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;
}
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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()) {
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, "@@@");
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");
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to close connection");
}
- SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+ SLOG(LOG_ERROR, TAG_VCM, "@@@");
return VC_ERROR_NONE;
}
/* 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);
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)) {
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)) {
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;
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)) {
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)) {
}
} 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)) {
}
} 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)) {
} 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)) {
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!!");
} 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)) {
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");
}
}
- 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");
}
}
} 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);
}
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)) {
SLOG(LOG_DEBUG, TAG_VCM, "[Manager] No background commands");
}
- SLOG(LOG_DEBUG, TAG_VCM, "@@@");
+ SLOG(LOG_ERROR, TAG_VCM, "@@@");
return 0;
}
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)) {
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)) {
{
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, "@@@");
{
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");
{
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");
{
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");
{
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, "@@@");
{
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, "@@@");
{
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;
{
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;
{
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");
{
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");
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
}
}
}
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;
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;
}
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);
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");
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()) {
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;
}
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;
}
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;
}
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;
}
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()) {
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 */
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;
}
{
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);
}
}
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) {
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;
}
}
+ 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);
vcd_client_unset_exclusive_command(fg_pid);
}
+ SLOG(LOG_ERROR, TAG_VCD, "[Server Success] start internal recognition");
return VCD_ERROR_NONE;
}
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 */
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;
}
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 */
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;
}
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;
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;
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);