const char* stt_tag()
{
+ //LCOV_EXCL_START
return "sttc";
+ //LCOV_EXCL_STOP
}
static int __stt_get_feature_enabled()
{
if (0 == g_feature_enabled) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] STT NOT supported");
return STT_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
} else if (-1 == g_feature_enabled) {
bool stt_supported = false;
bool mic_supported = false;
if (0 == system_info_get_platform_bool(STT_FEATURE_PATH, &stt_supported)) {
if (0 == system_info_get_platform_bool(STT_MIC_FEATURE_PATH, &mic_supported)) {
if (false == stt_supported || false == mic_supported) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] STT NOT supported");
g_feature_enabled = 0;
return STT_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
g_feature_enabled = 1;
} else {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get feature value");
return STT_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
} else {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get feature value");
return STT_ERROR_NOT_SUPPORTED;
+ //LCOV_EXCL_STOP
}
}
{
int ret = cynara_initialize(&p_cynara, NULL);
if (CYNARA_API_SUCCESS != ret)
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to initialize");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to initialize"); //LCOV_EXCL_LINE
return ret == CYNARA_API_SUCCESS;
}
fp = fopen(label_path, "r");
if (fp != NULL) {
if (0 >= fread(smack_label, 1, sizeof(smack_label), fp))
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread"); //LCOV_EXCL_LINE
fclose(fp);
}
char uid[16];
if (0 == g_privilege_allowed) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied"); //LCOV_EXCL_LINE
return STT_ERROR_PERMISSION_DENIED;
} else if (-1 == g_privilege_allowed) {
if (false == __check_privilege_initialize()) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] privilege initialize is failed");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] privilege initialize is failed"); //LCOV_EXCL_LINE
return STT_ERROR_PERMISSION_DENIED;
}
snprintf(uid, 16, "%d", getuid());
if (false == __check_privilege(uid, STT_PRIVILEGE_RECORDER)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied"); //LCOV_EXCL_LINE
g_privilege_allowed = 0;
__check_privilege_deinitialize();
return STT_ERROR_PERMISSION_DENIED;
char uid[16];
if (0 == g_privilege_applaunch_allowed) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission for applaunch is denied");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission for applaunch is denied"); //LCOV_EXCL_LINE
return STT_ERROR_PERMISSION_DENIED;
} else if (-1 == g_privilege_applaunch_allowed) {
if (false == __check_privilege_initialize()) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] privilege initialize is failed (applaunch)");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] privilege initialize is failed (applaunch)"); //LCOV_EXCL_LINE
return STT_ERROR_PERMISSION_DENIED;
}
snprintf(uid, 16, "%d", getuid());
if (false == __check_privilege(uid, STT_PRIVILEGE_APPLAUNCH)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied : appmanager.launch");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied : appmanager.launch"); //LCOV_EXCL_LINE
g_privilege_applaunch_allowed = 0;
__check_privilege_deinitialize();
return STT_ERROR_PERMISSION_DENIED;
static const char* __stt_get_error_code(stt_error_e err)
{
+ //LCOV_EXCL_START
switch (err) {
case STT_ERROR_NONE: return "STT_ERROR_NONE";
case STT_ERROR_OUT_OF_MEMORY: return "STT_ERROR_OUT_OF_MEMORY";
default:
return "Invalid error code";
}
+ //LCOV_EXCL_STOP
}
static int __stt_convert_config_error_code(stt_config_error_e code)
{
+ //LCOV_EXCL_START
if (code == STT_CONFIG_ERROR_NONE) return STT_ERROR_NONE;
if (code == STT_CONFIG_ERROR_OUT_OF_MEMORY) return STT_ERROR_OUT_OF_MEMORY;
if (code == STT_CONFIG_ERROR_IO_ERROR) return STT_ERROR_IO_ERROR;
if (code == STT_CONFIG_ERROR_OPERATION_FAILED) return STT_ERROR_OPERATION_FAILED;
return code;
+ //LCOV_EXCL_STOP
}
void __stt_config_lang_changed_cb(const char* before_language, const char* current_language, void* user_data)
if (0 == stt_client_get_size()) {
if (0 != stt_dbus_open_connection()) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to open connection");
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
}
if (0 != stt_client_new(stt)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to create client!");
return STT_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
}
stt_client_s* client = stt_client_get(*stt);
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to create client");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to create client"); //LCOV_EXCL_LINE
stt_client_destroy(*stt);
return STT_ERROR_OPERATION_FAILED;
}
int ret = stt_config_mgr_initialize(client->uid);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to init config manager : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to init config manager : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
stt_client_destroy(*stt);
return ret;
}
ret = stt_config_mgr_set_callback(client->uid, __stt_config_engine_changed_cb, __stt_config_lang_changed_cb, NULL, client->stt);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to set config changed : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to set config changed : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
stt_client_destroy(*stt);
return ret;
}
case STT_STATE_READY:
ret = stt_dbus_request_finalize(client->uid);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to request finalize : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to request finalize : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
}
case STT_STATE_CREATED:
if (NULL != g_connect_timer) {
if (0 == stt_client_get_size()) {
if (0 != stt_dbus_close_connection()) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to close connection");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to close connection"); //LCOV_EXCL_LINE
}
}
stt_client_s* client = stt_client_get(stt);
if (NULL == client) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[WARNING] A handle is not valid");
return false;
+ //LCOV_EXCL_STOP
}
/* call callback function */
if (NULL != client->supported_engine_cb) {
return client->supported_engine_cb(stt, engine_id, engine_name, client->supported_engine_user_data);
} else {
- SLOG(LOG_WARN, TAG_STTC, "No registered callback function of supported engine");
+ SLOG(LOG_WARN, TAG_STTC, "No registered callback function of supported engine"); //LCOV_EXCL_LINE
}
return false;
SLOG(LOG_DEBUG, TAG_STTC, "===== Foreach Supported engine");
if (NULL == callback) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
ret = stt_config_mgr_get_engine_list(__stt_config_supported_engine_cb, client->stt);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get engines : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get engines : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
}
client->supported_engine_cb = NULL;
SLOG(LOG_DEBUG, TAG_STTC, "===== Get current engine");
if (NULL == engine_id) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
ret = stt_config_mgr_get_engine(engine_id);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to request get current engine : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to request get current engine : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Current engine uuid = %s", *engine_id);
}
int ret = buxton_open(&bux_cli, NULL, NULL);
if (0 != ret) {
- SLOG(LOG_ERROR, stt_tag(), "[DBUS-BUXTON2] Fail to open buxton client");
+ SLOG(LOG_ERROR, stt_tag(), "[DBUS-BUXTON2] Fail to open buxton client"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
}
SLOG(LOG_DEBUG, stt_tag(), "[DBUS-BUXTON2] buxton_open: %d", ret);
bux_layer = buxton_create_layer("system");
if (NULL == bux_layer) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[DBUS-BUXTON2] buxton_create_layer FAIL");
buxton_close(bux_cli);
bux_cli = NULL;
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
bux_val = buxton_value_create_string(engine_id);
if (NULL == bux_val) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[DBUS-BUXTON2] buxton_value_create_string FAIL");
buxton_free_layer(bux_layer);
buxton_close(bux_cli);
bux_layer = NULL;
bux_cli = NULL;
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
ret = buxton_set_value_sync(bux_cli, bux_layer, STT_ENGINE_DB_CUSTOM, bux_val);
if (0 != ret) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[DBUS-BUXTON2] Fail to set value sync");
buxton_value_free(bux_val);
buxton_free_layer(bux_layer);
bux_layer = NULL;
bux_val = NULL;
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
SLOG(LOG_DEBUG, stt_tag(), "[DBUS-BUXTON2] buxton_set_value_sync: %d, %s", ret, STT_ENGINE_DB_CUSTOM);
SLOG(LOG_DEBUG, TAG_STTC, "===== Set current engine");
if (NULL == engine_id) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
/* Set vconfkey */
int ret = __stt_set_buxtonkey(engine_id);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] set buxtonkey Failed!!!");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] set buxtonkey Failed!!!"); //LCOV_EXCL_LINE
return ret;
}
/* check state */
if (client->current_state != STT_STATE_CREATED && client->current_state != STT_STATE_READY) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State: Current state(%d) is not CREATED or READY", client->current_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State: Current state(%d) is not CREATED or READY", client->current_state); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_STATE;
}
}
if (true != client->internal && (0 == strcmp(key, "server") || 0 == strcmp(key, "rampcode") || 0 == strcmp(key, "epd"))) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] This is not an internal app");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] This is not an internal app"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
while (0 != ret) {
ret = stt_dbus_request_set_private_data(client->uid, key, data);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to set private data : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
}
}
while (0 != ret) {
ret = stt_dbus_request_get_private_data(client->uid, key, data);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get private data : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
}
}
return STT_ERROR_NONE;
}
+//LCOV_EXCL_START
int stt_set_server_stt(stt_h stt, const char* key, char* user_data)
{
int ret = -1;
return ret;
}
+//LCOV_EXCL_STOP
static Eina_Bool __stt_connect_daemon(void *data)
{
int ret = -1;
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] A handle is not available");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] A handle is not available"); //LCOV_EXCL_LINE
g_connect_timer = NULL;
return EINA_FALSE;
}
if (0 == stt_client_get_size() || NULL == stt_client_get_by_uid(client->uid)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Client has been already destroyed");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Client has been already destroyed"); //LCOV_EXCL_LINE
return EINA_FALSE;
}
if (1 == g_privilege_applaunch_allowed && NULL != client->current_engine_id) {
/* Set vconfkey */
ret = __stt_set_buxtonkey(client->current_engine_id);
+ //LCOV_EXCL_START
if (0 != ret) {
SLOG(LOG_DEBUG, TAG_STTC, "[DEBUG] set buxtonkey Failed!!! (inside __stt_connect_daemon)");
return EINA_TRUE;
}
+ //LCOV_EXCL_STOP
}
/* Send hello */
ret = stt_dbus_request_initialize(client->uid, &silence_supported, &credential_needed);
if (STT_ERROR_ENGINE_NOT_FOUND == ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to initialize : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to initialize : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
client->reason = STT_ERROR_ENGINE_NOT_FOUND;
ecore_main_loop_thread_safe_call_async(__stt_notify_error, (void*)client);
return EINA_FALSE;
} else if (STT_ERROR_NONE != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[WARNING] Fail to connection. Retry to connect");
+ SLOG(LOG_ERROR, TAG_STTC, "[WARNING] Fail to connection. Retry to connect"); //LCOV_EXCL_LINE
return EINA_TRUE;
} else {
/* success to connect stt-service */
SLOG(LOG_DEBUG, TAG_STTC, "Supported options : silence(%s), credential(%s)", silence_supported ? "support" : "no support", credential_needed ? "need" : "no need");
}
+//LCOV_EXCL_START
#ifdef __UNUSED_CODES__
if (NULL != client->current_engine_id) {
ret = -1;
}
}
#endif
+//LCOV_EXCL_STOP
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] uid(%d)", client->uid);
client->before_state = client->current_state;
while (0 != ret) {
ret = stt_dbus_request_finalize(client->uid);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to request finalize : %s", __stt_get_error_code(ret));
break;
break;
}
}
+ //LCOV_EXCL_STOP
}
}
stt_client_s* client = stt_client_get(stt);
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[WARNING] A handle is not valid");
+ SLOG(LOG_ERROR, TAG_STTC, "[WARNING] A handle is not valid"); //LCOV_EXCL_LINE
return false;
}
if (NULL != client->supported_lang_cb) {
return client->supported_lang_cb(stt, language, client->supported_lang_user_data);
} else {
- SLOG(LOG_WARN, TAG_STTC, "No registered callback function of supported languages");
+ SLOG(LOG_WARN, TAG_STTC, "No registered callback function of supported languages"); //LCOV_EXCL_LINE
}
return false;
SLOG(LOG_DEBUG, TAG_STTC, "===== Foreach Supported Language");
if (NULL == callback) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
ret = stt_config_mgr_get_engine(¤t_engine_id);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get default engine id : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get default engine id : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
return ret;
}
} else {
current_engine_id = strdup(client->current_engine_id);
+ //LCOV_EXCL_START
if (NULL == current_engine_id) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory");
return STT_ERROR_OUT_OF_MEMORY;
}
+ //LCOV_EXCL_STOP
}
client->supported_lang_cb = callback;
ret = stt_config_mgr_get_language_list(current_engine_id, __stt_config_supported_language_cb, client->stt);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get languages : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get languages : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
}
if (NULL != current_engine_id) {
SLOG(LOG_DEBUG, TAG_STTC, "===== Get Default Language");
if (NULL == language) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
ret = stt_config_mgr_get_default_language(language);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get default language : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get default language : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Current language = %s", *language);
}
}
if (NULL == state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
if (NULL != client->err_msg) {
*err_msg = strdup(client->err_msg);
- SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Error msg (%s)", *err_msg);
+ SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Error msg (%s)", *err_msg); //LCOV_EXCL_LINE
} else {
- SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Error msg (NULL)");
+ SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Error msg (NULL)"); //LCOV_EXCL_LINE
}
- SLOG(LOG_DEBUG, TAG_STTC, "=====");
- SLOG(LOG_DEBUG, TAG_STTC, " ");
+ SLOG(LOG_DEBUG, TAG_STTC, "====="); //LCOV_EXCL_LINE
+ SLOG(LOG_DEBUG, TAG_STTC, " "); //LCOV_EXCL_LINE
return STT_ERROR_NONE;
}
}
if (NULL == type || NULL == support) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
while (0 != ret) {
ret = stt_dbus_request_is_recognition_type_supported(client->uid, type, support);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get recognition type supported : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] recognition type is %s", *support ? "true " : "false");
break;
SLOG(LOG_DEBUG, TAG_STTC, "===== STT SET START SOUND");
if (NULL == filename) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
if (0 != access(filename, F_OK)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] File does not exist");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] File does not exist"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
/* check state */
if (client->current_state != STT_STATE_READY) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State: Current state(%d) is not READY", client->current_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State: Current state(%d) is not READY", client->current_state); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_STATE;
}
while (0 != ret) {
ret = stt_dbus_request_set_start_sound(client->uid, filename);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to set start sound : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Set start sound : %s", filename);
break;
while (0 != ret) {
ret = stt_dbus_request_unset_start_sound(client->uid);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to unset start sound : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Unset start sound");
break;
SLOG(LOG_DEBUG, TAG_STTC, "===== STT SET STOP SOUND");
if (NULL == filename) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
if (0 != access(filename, F_OK)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] File does not exist");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] File does not exist"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
/* check state */
if (client->current_state != STT_STATE_READY) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State: Current state(%d) is not READY", client->current_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State: Current state(%d) is not READY", client->current_state); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_STATE;
}
while (0 != ret) {
ret = stt_dbus_request_set_stop_sound(client->uid, filename);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to set stop sound : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Set stop sound : %s", filename);
break;
while (0 != ret) {
ret = stt_dbus_request_unset_stop_sound(client->uid);
if (0 != ret) {
+ //LCOV_EXCL_START
if (STT_ERROR_TIMED_OUT != ret) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to unset stop sound : %s", __stt_get_error_code(ret));
return ret;
return ret;
}
}
+ //LCOV_EXCL_STOP
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Unset stop sound");
break;
}
if (STT_INTERNAL_STATE_NONE != client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is NOT none : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is NOT none : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_RECORDING;
}
ret = aul_app_get_appid_bypid(getpid(), appid, sizeof(appid) - 1);
if ((AUL_R_OK != ret) || (0 == strlen(appid))) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get application ID");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get application ID"); //LCOV_EXCL_LINE
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[DEBUG] Current app id is %s", appid);
}
}
if (true == client->credential_needed && NULL == client->credential) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Do not have app credential for this engine(%s)", client->current_engine_id);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Do not have app credential for this engine(%s)", client->current_engine_id); //LCOV_EXCL_LINE
free(temp);
temp = NULL;
return STT_ERROR_PERMISSION_DENIED;
client->internal_state = STT_INTERNAL_STATE_STARTING;
ret = stt_dbus_request_start(client->uid, temp, type, client->silence, appid, client->credential);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to start : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to start : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
client->internal_state = STT_INTERNAL_STATE_NONE;
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Start is successful but not done");
/* check state */
if (client->current_state != STT_STATE_RECORDING) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Current state(%d) is NOT RECORDING", client->current_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Current state(%d) is NOT RECORDING", client->current_state); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_STATE;
}
if (STT_INTERNAL_STATE_STARTING == client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STARTING : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STARTING : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_RECORDING;
} else if (STT_INTERNAL_STATE_CANCELING == client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is CANCELING : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is CANCELING : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_READY;
} else if (STT_INTERNAL_STATE_STOPPING == client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STOPPING : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STOPPING : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_PROCESSING;
}
client->internal_state = STT_INTERNAL_STATE_STOPPING;
int ret = stt_dbus_request_stop(client->uid);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to stop : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to stop : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
client->internal_state = STT_INTERNAL_STATE_NONE;
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Stop is successful but not done");
/* check state */
if (STT_STATE_RECORDING != client->current_state && STT_STATE_PROCESSING != client->current_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid state : Current state(%d) is 'Ready'", client->current_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid state : Current state(%d) is 'Ready'", client->current_state); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_STATE;
}
if (STT_INTERNAL_STATE_STARTING == client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STARTING : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STARTING : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_RECORDING;
} else if (STT_INTERNAL_STATE_STOPPING == client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STOPPING : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is STOPPING : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_PROCESSING;
} else if (STT_INTERNAL_STATE_CANCELING == client->internal_state) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is CANCELING : %d", client->internal_state);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid State : Internal state is CANCELING : %d", client->internal_state); //LCOV_EXCL_LINE
return STT_ERROR_IN_PROGRESS_TO_READY;
}
client->internal_state = STT_INTERNAL_STATE_CANCELING;
int ret = stt_dbus_request_cancel(client->uid);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to cancel : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to cancel : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
client->internal_state = STT_INTERNAL_STATE_NONE;
} else {
SLOG(LOG_DEBUG, TAG_STTC, "[SUCCESS] Cancel is successful but not done");
client = stt_client_get_by_uid(uid);
if (NULL == client) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "Handle is NOT valid");
return STT_ERROR_INVALID_PARAMETER;
+ //LCOV_EXCL_STOP
}
if (STT_STATE_RECORDING != client->current_state) {
+ //LCOV_EXCL_START
SLOG(LOG_DEBUG, TAG_STTC, "[ERROR] Invalid state : NO 'Recording' state, cur(%d)", client->current_state);
return STT_ERROR_INVALID_STATE;
+ //LCOV_EXCL_STOP
}
g_volume_db = volume;
}
if (NULL == volume) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
if (STT_STATE_RECORDING != client->current_state) {
- SLOG(LOG_DEBUG, TAG_STTC, "[ERROR] Invalid state : NO 'Recording' state, cur(%d)", client->current_state);
+ SLOG(LOG_DEBUG, TAG_STTC, "[ERROR] Invalid state : NO 'Recording' state, cur(%d)", client->current_state); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_STATE;
}
return STT_ERROR_NONE;
}
+//LCOV_EXCL_START
bool __stt_result_time_cb(int index, int event, const char* text, long start_time, long end_time, void* user_data)
{
stt_client_s* client = (stt_client_s*)user_data;
return true;
}
+//LCOV_EXCL_STOP
int stt_foreach_detailed_result(stt_h stt, stt_result_time_cb callback, void* user_data)
{
SLOG(LOG_DEBUG, TAG_STTC, "===== STT FOREACH DETAILED RESULT");
if (NULL == callback) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
ret = stt_config_mgr_foreach_time_info(__stt_result_time_cb, client);
ret = __stt_convert_config_error_code(ret);
if (0 != ret) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to foreach time info : %s", __stt_get_error_code(ret));
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to foreach time info : %s", __stt_get_error_code(ret)); //LCOV_EXCL_LINE
}
client->result_time_cb = NULL;
/* check handle */
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid"); //LCOV_EXCL_LINE
return;
}
stt_client_not_use_callback(client);
SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is called : reason [%d]", client->reason);
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is null");
+ SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is null"); //LCOV_EXCL_LINE
}
return;
int __stt_cb_error(int uid, int reason, char* err_msg)
{
+ //LCOV_EXCL_START
if (-1 == uid) {
GList* client_list = NULL;
client_list = stt_client_get_client_list();
iter = g_list_next(iter);
}
}
+ //LCOV_EXCL_STOP
} else {
stt_client_s* client = stt_client_get_by_uid(uid);
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "Handle not found");
+ SLOG(LOG_ERROR, TAG_STTC, "Handle not found"); //LCOV_EXCL_LINE
return -1;
}
}
if (STT_ERROR_SERVICE_RESET == reason) {
- SLOG(LOG_WARN, TAG_STTC, "[WARNING] Service reset");
+ SLOG(LOG_WARN, TAG_STTC, "[WARNING] Service reset"); //LCOV_EXCL_LINE
client->current_state = STT_STATE_CREATED;
if (0 != stt_prepare(client->stt)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to prepare");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to prepare"); //LCOV_EXCL_LINE
}
}
}
/* check handle */
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid"); //LCOV_EXCL_LINE
return;
}
stt_client_not_use_callback(client);
SLOG(LOG_DEBUG, TAG_STTC, "State changed callback is called, State(%d)", client->current_state);
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARNING] State changed callback is null, State(%d)", client->current_state);
+ SLOG(LOG_WARN, TAG_STTC, "[WARNING] State changed callback is null, State(%d)", client->current_state); //LCOV_EXCL_LINE
}
return;
/* check handle */
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify error : A handle is not valid"); //LCOV_EXCL_LINE
return EINA_FALSE;
}
free(temp[i]);
temp[i] = NULL;
} else {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Result data is error");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Result data is error"); //LCOV_EXCL_LINE
}
}
free(client->data_list);
if (NULL != client->state_changed_cb) {
ecore_main_loop_thread_safe_call_async(__stt_notify_state_changed, client);
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARNING] State changed callback is null");
+ SLOG(LOG_WARN, TAG_STTC, "[WARNING] State changed callback is null"); //LCOV_EXCL_LINE
}
}
client = stt_client_get_by_uid(uid);
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "Handle is NOT valid");
+ SLOG(LOG_ERROR, TAG_STTC, "Handle is NOT valid"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
char **temp = NULL;
temp = (char**)calloc(data_count, sizeof(char*));
if (NULL == temp) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory"); //LCOV_EXCL_LINE
return STT_ERROR_OUT_OF_MEMORY;
}
if (NULL != data[i])
temp[i] = strdup(data[i]);
else
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Result data is error");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Result data is error"); //LCOV_EXCL_LINE
}
client->data_list = temp;
{
stt_client_s* client = stt_client_get_by_uid(uid);
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "Handle not found");
+ SLOG(LOG_ERROR, TAG_STTC, "Handle not found"); //LCOV_EXCL_LINE
return -1;
}
/* check handle */
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify speech status : A handle is not valid");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to notify speech status : A handle is not valid"); //LCOV_EXCL_LINE
return;
}
stt_client_use_callback(client);
client->speech_status_cb(client->stt, client->speech_status, client->speech_status_user_data);
stt_client_not_use_callback(client);
- SLOG(LOG_DEBUG, TAG_STTC, "Speech status callback is called");
+ SLOG(LOG_DEBUG, TAG_STTC, "Speech status callback is called"); //LCOV_EXCL_LINE
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARNING] Speech status callback is null");
+ SLOG(LOG_WARN, TAG_STTC, "[WARNING] Speech status callback is null"); //LCOV_EXCL_LINE
}
return;
{
stt_client_s* client = stt_client_get_by_uid(uid);
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "Handle not found");
+ SLOG(LOG_ERROR, TAG_STTC, "Handle not found"); //LCOV_EXCL_LINE
return -1;
}
return 0;
}
+//LCOV_EXCL_START
int stt_set_speech_status_cb(stt_h stt, stt_speech_status_cb callback, void* user_data)
{
stt_client_s* client = NULL;
return ret;
}
-
+//LCOV_EXCL_STOP
client = (stt_client_s*)calloc(1, sizeof(stt_client_s));
if (NULL == client) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory"); //LCOV_EXCL_LINE
return STT_ERROR_OUT_OF_MEMORY;
}
stt_h temp = (stt_h)calloc(1, sizeof(struct stt_s));
if (NULL == temp) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory"); //LCOV_EXCL_LINE
free(client);
return STT_ERROR_OUT_OF_MEMORY;
}
int stt_client_destroy(stt_h stt)
{
if (stt == NULL) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return 0;
}
}
}
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] client Not founded");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] client Not founded"); //LCOV_EXCL_LINE
return -1;
}
stt_client_s* stt_client_get(stt_h stt)
{
if (NULL == stt) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return NULL;
}
stt_client_s* stt_client_get_by_uid(const int uid)
{
if (uid < 0) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] out of range : handle");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] out of range : handle"); //LCOV_EXCL_LINE
return NULL;
}
}
}
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get client by uid");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to get client by uid"); //LCOV_EXCL_LINE
return NULL;
}
extern int __stt_cb_speech_status(int uid, int status);
+//LCOV_EXCL_START
char* __stt_get_service_name(char* engine_id)
{
char* service_name = NULL;
return service_interface;
}
-
+//LCOV_EXCL_STOP
static Eina_Bool listener_event_callback(void* data, Ecore_Fd_Handler *fd_handler)
{
msg = dbus_connection_pop_message(g_conn_listener);
if (true != dbus_connection_get_is_connected(g_conn_listener)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Connection is disconnected");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Connection is disconnected"); //LCOV_EXCL_LINE
break;
}
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message); //LCOV_EXCL_LINE
dbus_error_free(&err);
}
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set state : uid(%d), state(%d)", uid, state);
__stt_cb_set_state(uid, state);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set state : invalid uid or state");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set state : invalid uid or state"); //LCOV_EXCL_LINE
}
SLOG(LOG_DEBUG, TAG_STTC, "=====");
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message); //LCOV_EXCL_LINE
dbus_error_free(&err);
}
temp_result = (char**)calloc(temp_count, sizeof(char*));
if (NULL == temp_result) {
- SLOG(LOG_ERROR, TAG_STTC, "Fail : memory allocation error");
+ SLOG(LOG_ERROR, TAG_STTC, "Fail : memory allocation error"); //LCOV_EXCL_LINE
} else {
int i = 0;
for (i = 0; i < temp_count; i++) {
}
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt get result : invalid uid");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt get result : invalid uid"); //LCOV_EXCL_LINE
}
SLOG(LOG_DEBUG, TAG_STTC, "=====");
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt Get Error message : Get arguments error (%s)", err.message);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt Get Error message : Get arguments error (%s)", err.message); //LCOV_EXCL_LINE
dbus_error_free(&err);
} else {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt Get Error message : uid(%d), reason(%d), err_msg(%s)", uid, reason, (NULL == err_msg) ? "NULL" : err_msg);
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message);
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message); //LCOV_EXCL_LINE
dbus_error_free(&err);
}
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt speech status : uid(%d), status(%d)", uid, status);
__stt_cb_speech_status(uid, status);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set status : invalid uid or status");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set status : invalid uid or status"); //LCOV_EXCL_LINE
}
SLOG(LOG_DEBUG, TAG_STTC, "=====");
} /* STTD_METHOD_SPEECH_STATUS */
else if (dbus_message_is_signal(msg, "org.freedesktop.DBus", "NameOwnerChanged")) {
+ //LCOV_EXCL_START
SLOG(LOG_DEBUG, TAG_STTC, "===== Owner Changed");
DBusError err;
dbus_error_init(&err);
__stt_cb_error(-1, STT_ERROR_SERVICE_RESET, "Daemon Reset");
SLOG(LOG_DEBUG, TAG_STTC, "=====");
SLOG(LOG_DEBUG, TAG_STTC, " ");
+ //LCOV_EXCL_STOP
} /* NameOwnerChanged */
else {
int stt_dbus_open_connection()
{
if (NULL != g_conn_sender && NULL != g_conn_listener) {
- SLOG(LOG_WARN, TAG_STTC, "already existed connection ");
+ SLOG(LOG_WARN, TAG_STTC, "already existed connection "); //LCOV_EXCL_LINE
return 0;
}
if (NULL == g_conn_sender) {
g_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Dbus Connection Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
}
if (NULL == g_conn_sender) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to get dbus connection");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to get dbus connection"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
}
dbus_connection_set_exit_on_disconnect(g_conn_listener, false);
- dbus_connection_set_exit_on_disconnect(g_conn_listener, false);
-
int pid = getpid();
char service_name[64];
dbus_bus_request_name(g_conn_listener, service_name, DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "Name Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
char rule[128] = {0, };
dbus_connection_flush(g_conn_listener);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "Match Error (%s)", err.message);
dbus_error_free(&err);
__stt_dbus_connection_free();
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
int fd = 0;
if (true != dbus_connection_get_unix_fd(g_conn_listener, &fd)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "Fail to get fd from dbus");
__stt_dbus_connection_free();
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
} else {
SLOG(LOG_DEBUG, TAG_STTC, "Get fd from dbus : %d", fd);
}
g_fd_handler = ecore_main_fd_handler_add(fd, ECORE_FD_READ, (Ecore_Fd_Cb)listener_event_callback, g_conn_listener, NULL, NULL);
if (NULL == g_fd_handler) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "fail to get fd handler from ecore");
__stt_dbus_connection_free();
return STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
return 0;
dbus_bus_release_name(g_conn_listener, service_name, &err);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Release name Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
}
/* Default engine */
g_server_service_name = strdup(STT_SERVER_SERVICE_NAME);
if (NULL == g_server_service_name) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory"); //LCOV_EXCL_LINE
return STT_ERROR_OUT_OF_MEMORY;
}
g_server_service_object = strdup(STT_SERVER_SERVICE_OBJECT_PATH);
STT_METHOD_HELLO);
} else {
/* Get service name, object, interface */
- SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] current_engine_id: %s", client->current_engine_id);
+ SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] current_engine_id: %s", client->current_engine_id); //LCOV_EXCL_LINE
g_server_service_name = __stt_get_service_name(client->current_engine_id);
g_server_service_object = __stt_get_service_object(client->current_engine_id);
g_server_service_interface = __stt_get_service_interface(client->current_engine_id);
if (NULL == g_server_service_name || NULL == g_server_service_object || NULL == g_server_service_interface) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] dbus service info invalid");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] dbus service info invalid"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
}
- SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] service name: %s, object path: %s, interface: %s", g_server_service_name, g_server_service_object, g_server_service_interface);
+ SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] service name: %s, object path: %s, interface: %s", g_server_service_name, g_server_service_object, g_server_service_interface); //LCOV_EXCL_LINE
/* Custom engine */
is_exist = dbus_bus_name_has_owner(g_conn_sender, g_server_service_name, &err);
- SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] is there dbus name has owner??: %s (g_server_service_name: %s)", (is_exist == TRUE) ? "True" : "False", g_server_service_name);
+ SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] is there dbus name has owner??: %s (g_server_service_name: %s)", (is_exist == TRUE) ? "True" : "False", g_server_service_name); //LCOV_EXCL_LINE
if (TRUE == is_exist) {
- SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] dbus: is_exist: True");
+ SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] dbus: is_exist: True"); //LCOV_EXCL_LINE
msg = dbus_message_new_method_call(
g_server_service_name,
g_server_service_object,
g_server_service_interface,
STT_METHOD_HELLO);
} else {
- SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] dbus: is_exist: False");
+ SLOG(LOG_DEBUG, TAG_STTC, "[DBUS] dbus: is_exist: False"); //LCOV_EXCL_LINE
msg = dbus_message_new_method_call(
STT_SERVER_CUSTOM_SERVICE_NAME,
STT_SERVER_CUSTOM_SERVICE_OBJECT_PATH,
dbus_message_unref(result_msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt hello");
} else {
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
result = STT_ERROR_TIMED_OUT;
}
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_OPERATION_FAILED;
}
STT_METHOD_INITIALIZE);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt initialize : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt initialize : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt initialize : uid(%d)", uid);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
*credential_needed = (bool)(int_credential_needed);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
if (0 == result) {
}
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt initialize : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt initialize : result = %d", result); //LCOV_EXCL_LINE
}
dbus_message_unref(result_msg);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender); //LCOV_EXCL_LINE
result = STT_ERROR_OPERATION_FAILED;
}
dbus_bus_remove_match(g_conn_listener, rule_err, &err);
dbus_connection_flush(g_conn_listener);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "Match Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
SLOG(LOG_DEBUG, TAG_STTC, "[dbus_info] service name: %s, service object: %s, service interface: %s", g_server_service_name, g_server_service_object, g_server_service_interface);
STT_METHOD_FINALIZE);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt finalize : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt finalize : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt finalize : uid(%d)", uid);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_short_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt finalize : result = %d", result);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt finalize : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt finalize : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
return result;
}
+//LCOV_EXCL_START
int stt_dbus_request_set_current_engine(int uid, const char* engine_id, bool* silence_supported, bool* credential_needed)
{
DBusMessage* msg;
return result;
}
+//LCOV_EXCL_STOP
int stt_dbus_request_set_private_data(int uid, const char* key, const char* data)
{
if (NULL == key || NULL == data) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
STT_METHOD_SET_PRIVATE_DATA);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt set private data : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt set private data : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt set private data : uid(%d)", uid);
DBUS_TYPE_STRING, &key,
DBUS_TYPE_STRING, &data,
DBUS_TYPE_INVALID)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to append args");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to append args"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
}
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set private data : result = %d", result);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set private data : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set private data : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
int stt_dbus_request_get_private_data(int uid, const char* key, char** data)
{
if (NULL == key || NULL == data) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
STT_METHOD_GET_PRIVATE_DATA);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt get private data : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt get private data : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt get private data : uid(%d)", uid);
DBUS_TYPE_INT32, &uid,
DBUS_TYPE_STRING, &key,
DBUS_TYPE_INVALID)) {
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to append args");
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to append args"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
}
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
char* temp = NULL;
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
*data = strdup(temp);
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt get private data : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt get private data : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
int stt_dbus_request_is_recognition_type_supported(int uid, const char* type, bool* support)
{
if (NULL == support || NULL == type) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
STT_METHOD_IS_TYPE_SUPPORTED);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt is partial result supported : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt is partial result supported : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt is recognition type supported : uid(%d) type(%s)", uid, type);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
*support = (bool)result_support;
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt is recognition type supported : result = %d, support = %s", result, *support ? "true" : "false");
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt is recognition type supported : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt is recognition type supported : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
int stt_dbus_request_set_start_sound(int uid, const char* file)
{
if (NULL == file) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
STT_METHOD_SET_START_SOUND);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt set start sound : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt set start sound : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt set start sound : uid(%d) file(%s)", uid, file);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set start sound : result = %d", result);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set start sound : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set start sound : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
STT_METHOD_UNSET_START_SOUND);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt unset start sound : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt unset start sound : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt unset start sound : uid(%d)", uid);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt unset start sound : result = %d", result);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt unset start sound : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt unset start sound : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
int stt_dbus_request_set_stop_sound(int uid, const char* file)
{
if (NULL == file) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
STT_METHOD_SET_STOP_SOUND);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt set stop sound : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt set stop sound : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt set stop sound : uid(%d) file(%s)", uid, file);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set stop sound : result = %d", result);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set stop sound : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt set stop sound : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
STT_METHOD_UNSET_STOP_SOUND);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt unset stop sound : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt unset stop sound : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt unset stop sound : uid(%d)", uid);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
+ //LCOV_EXCL_STOP
}
if (NULL != result_msg) {
DBUS_TYPE_INVALID);
if (dbus_error_is_set(&err)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "<<<< Get arguments error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt unset stop sound : result = %d", result);
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< stt unset stop sound : result = %d", result);
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< stt unset stop sound : result = %d", result); //LCOV_EXCL_LINE
}
} else {
- SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_TIMED_OUT;
}
int stt_dbus_request_start(int uid, const char* lang, const char* type, int silence, const char* appid, const char* credential)
{
if (NULL == lang || NULL == type || NULL == appid) {
- SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL");
+ SLOG(LOG_ERROR, TAG_STTC, "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_ERROR_INVALID_PARAMETER;
}
STT_METHOD_START);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt start : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt start : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt start : uid(%d), language(%s), type(%s)", uid, lang, type);
dbus_message_set_no_reply(msg, TRUE);
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt start message : Out Of Memory !");
if (NULL != temp) {
free(temp);
temp = NULL;
}
return STT_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
} else {
dbus_connection_flush(g_conn_sender);
}
dbus_message_unref(msg);
} else {
- SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender); //LCOV_EXCL_LINE
if (NULL != temp) {
free(temp);
temp = NULL;
STT_METHOD_STOP);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt stop : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt stop : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt stop : uid(%d)", uid);
dbus_message_set_no_reply(msg, TRUE);
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt stop message : Out Of Memory !");
return STT_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
} else {
dbus_connection_flush(g_conn_sender);
}
STT_METHOD_CANCEL);
if (NULL == msg) {
- SLOG(LOG_ERROR, TAG_STTC, ">>>> stt cancel : Fail to make message");
+ SLOG(LOG_ERROR, TAG_STTC, ">>>> stt cancel : Fail to make message"); //LCOV_EXCL_LINE
return STT_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_STTC, ">>>> stt cancel : uid(%d)", uid);
dbus_message_set_no_reply(msg, TRUE);
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt stop message : Out Of Memory !");
return STT_ERROR_OUT_OF_MEMORY;
+ //LCOV_EXCL_STOP
} else {
dbus_connection_flush(g_conn_sender);
}
#endif
}
+//LCOV_EXCL_START
int stt_dbus_request_start_file(int uid, const char* lang, const char* type, int silence, const char* appid, const char* credential, const char* filepath, stt_audio_type_e audio_type, int sample_rate)
{
if (NULL == lang || NULL == type || NULL == appid) {
return 0;
}
-
+//LCOV_EXCL_STOP
length = read(g_fd_noti, &event, sizeof(struct inotify_event));
if (0 > length) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty Inotify event");
- SLOG(LOG_DEBUG, stt_tag(), "=====");
- SLOG(LOG_DEBUG, stt_tag(), " ");
- return ECORE_CALLBACK_PASS_ON;
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty Inotify event"); //LCOV_EXCL_LINE
+ SLOG(LOG_DEBUG, stt_tag(), "====="); //LCOV_EXCL_LINE
+ SLOG(LOG_DEBUG, stt_tag(), " "); //LCOV_EXCL_LINE
+ return ECORE_CALLBACK_PASS_ON; //LCOV_EXCL_LINE
}
if (IN_MODIFY == event.mask) {
if (NULL != setting) free(setting);
if (NULL != lang) free(lang);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Undefined event");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Undefined event"); //LCOV_EXCL_LINE
}
SLOG(LOG_DEBUG, stt_tag(), "=====");
fd = inotify_init();
if (fd < 0) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail get inotify fd");
- return -1;
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail get inotify fd"); //LCOV_EXCL_LINE
+ return -1; //LCOV_EXCL_LINE
}
g_fd_noti = fd;
g_fd_handler_noti = ecore_main_fd_handler_add(fd, ECORE_FD_READ, (Ecore_Fd_Cb)stt_config_mgr_inotify_event_cb, NULL, NULL, NULL);
if (NULL == g_fd_handler_noti) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to get handler_noti");
- return -1;
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to get handler_noti"); //LCOV_EXCL_LINE
+ return -1; //LCOV_EXCL_LINE
}
return 0;
value = vconf_get_str(VCONFKEY_LANGSET);
if (NULL == value) {
- SLOG(LOG_ERROR, stt_tag(), "[Config ERROR] Fail to get display language");
+ SLOG(LOG_ERROR, stt_tag(), "[Config ERROR] Fail to get display language"); //LCOV_EXCL_LINE
return -1;
}
/* Check current config info */
if (NULL == g_config_info) {
- SLOG(LOG_ERROR, stt_tag(), "Current config info is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "Current config info is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OPERATION_FAILED;
}
/* Check current language */
if (NULL == g_config_info->language) {
- SLOG(LOG_ERROR, stt_tag(), "Current config language is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "Current config language is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OPERATION_FAILED;
}
SLOG(LOG_DEBUG, stt_tag(), "[Config] Language is auto. STT language(%s) is same with display lang", g_config_info->language);
return 0;
} else {
- SLOG(LOG_DEBUG, stt_tag(), "[Config] Display language : %s", candidate_lang);
+ SLOG(LOG_DEBUG, stt_tag(), "[Config] Display language : %s", candidate_lang); //LCOV_EXCL_LINE
}
if (true == __stt_config_mgr_check_lang_is_valid(g_config_info->engine_id, candidate_lang)) {
int __stt_config_mgr_check_engine_is_valid(const char* engine_id)
{
if (NULL == engine_id) {
- SLOG(LOG_ERROR, stt_tag(), "Input parameter is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "Input parameter is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_INVALID_PARAMETER;
}
stt_engine_info_s *engine_info = NULL;
if (0 >= g_slist_length(g_engine_list)) {
- SLOG(LOG_ERROR, stt_tag(), "There is no engine!!");
+ SLOG(LOG_ERROR, stt_tag(), "There is no engine!!"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_ENGINE_NOT_FOUND;
}
engine_info = iter->data;
if (NULL == engine_info) {
- SLOG(LOG_ERROR, stt_tag(), "engine info is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "engine info is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_ENGINE_NOT_FOUND;
}
/* Change default engine */
iter = g_slist_nth(g_engine_list, 0);
if (NULL == iter) {
- SLOG(LOG_ERROR, stt_tag(), "Operation failed - false engine");
+ SLOG(LOG_ERROR, stt_tag(), "Operation failed - false engine"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OPERATION_FAILED;
}
engine_info = iter->data;
if (NULL == engine_info) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Engine info is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Engine info is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_ENGINE_NOT_FOUND;
}
bool is_valid_lang = false;
if (0 >= g_slist_length(engine_info->languages)) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty supported language");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty supported language"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_ENGINE_NOT_FOUND;
}
g_config_info->silence_detection = false;
}
+ //LCOV_EXCL_START
SLOG(LOG_DEBUG, stt_tag(), "[Config] Engine changed");
SLOG(LOG_DEBUG, stt_tag(), " Engine : %s", g_config_info->engine_id);
SLOG(LOG_DEBUG, stt_tag(), " Setting : %s", g_config_info->setting);
SLOG(LOG_DEBUG, stt_tag(), " language : %s", g_config_info->language);
SLOG(LOG_DEBUG, stt_tag(), " Silence detection : %s", g_config_info->silence_detection ? "on" : "off");
SLOG(LOG_DEBUG, stt_tag(), " Credential : %s", g_config_info->credential ? "true" : "false");
+ //LCOV_EXCL_STOP
if (0 != stt_parser_set_engine(g_config_info->engine_id, g_config_info->setting, g_config_info->language,
g_config_info->silence_detection, g_config_info->credential)) {
- SLOG(LOG_ERROR, stt_tag(), "Fail to save config");
+ SLOG(LOG_ERROR, stt_tag(), "Fail to save config"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OPERATION_FAILED;
}
struct dirent *dirp = NULL;
if (NULL == directory) {
- SLOG(LOG_ERROR, stt_tag(), "[Directory ERROR] Directory is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[Directory ERROR] Directory is NULL"); //LCOV_EXCL_LINE
return;
} else {
SLOG(LOG_DEBUG, stt_tag(), "[Directory DEBUG] Directory: %s", directory);
if (NULL != filepath) {
snprintf(filepath, filesize, "%s/%s", directory, dirp->d_name);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[Config ERROR] Memory not enough!!");
+ SLOG(LOG_ERROR, stt_tag(), "[Config ERROR] Memory not enough!!"); //LCOV_EXCL_LINE
continue;
}
temp_client = (stt_config_client_s*)calloc(1, sizeof(stt_config_client_s));
if (NULL == temp_client) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to allocate memory");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to allocate memory"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OUT_OF_MEMORY;
}
temp_client->uid = uid;
}
if (0 < g_slist_length(g_config_client_list)) {
- SLOG(LOG_DEBUG, stt_tag(), "Client count (%d)", g_slist_length(g_config_client_list));
+ SLOG(LOG_DEBUG, stt_tag(), "Client count (%d)", g_slist_length(g_config_client_list)); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_NONE;
}
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_START
int stt_config_mgr_unset_callback(int uid)
{
GSList *iter = NULL;
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int stt_config_mgr_get_engine_list(stt_config_supported_engine_cb callback, void* user_data)
{
int stt_config_mgr_get_engine(char** engine)
{
if (0 >= g_slist_length(g_config_client_list)) {
- SLOG(LOG_ERROR, stt_tag(), "Not initialized");
+ SLOG(LOG_ERROR, stt_tag(), "Not initialized"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_INVALID_STATE;
}
if (NULL != g_config_info->engine_id) {
*engine = strdup(g_config_info->engine_id);
} else {
- SLOG(LOG_ERROR, stt_tag(), " Engine id is NULL");
+ SLOG(LOG_ERROR, stt_tag(), " Engine id is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_ENGINE_NOT_FOUND;
}
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_START
int __stt_config_set_buxtonkey(const char* engine)
{
/* Set vconfkey */
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int stt_config_mgr_get_language_list(const char* engine_id, stt_config_supported_langauge_cb callback, void* user_data)
{
if (0 >= g_slist_length(g_config_client_list)) {
- SLOG(LOG_ERROR, stt_tag(), "Not initialized");
+ SLOG(LOG_ERROR, stt_tag(), "Not initialized"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_INVALID_STATE;
}
if (0 >= g_slist_length(g_engine_list)) {
- SLOG(LOG_ERROR, stt_tag(), "There is no engine");
+ SLOG(LOG_ERROR, stt_tag(), "There is no engine"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_ENGINE_NOT_FOUND;
}
engine_info = iter->data;
if (NULL == engine_info) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] engine info is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] engine info is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OPERATION_FAILED;
}
int stt_config_mgr_get_default_language(char** language)
{
if (0 >= g_slist_length(g_config_client_list)) {
- SLOG(LOG_ERROR, stt_tag(), "Not initialized");
+ SLOG(LOG_ERROR, stt_tag(), "Not initialized"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_INVALID_STATE;
}
if (NULL != g_config_info->language) {
*language = strdup(g_config_info->language);
} else {
- SLOG(LOG_ERROR, stt_tag(), " language is NULL");
+ SLOG(LOG_ERROR, stt_tag(), " language is NULL"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_OPERATION_FAILED;
}
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_START
int stt_config_mgr_set_default_language(const char* language)
{
if (0 >= g_slist_length(g_config_client_list)) {
return false;
}
+//LCOV_EXCL_STOP
int __stt_config_mgr_print_engine_info()
{
stt_engine_info_s *engine_info = NULL;
if (0 >= g_slist_length(g_engine_list)) {
- SLOG(LOG_DEBUG, stt_tag(), "-------------- engine list -----------------");
- SLOG(LOG_DEBUG, stt_tag(), " No Engine in engine directory");
- SLOG(LOG_DEBUG, stt_tag(), "--------------------------------------------");
+ SLOG(LOG_DEBUG, stt_tag(), "-------------- engine list -----------------"); //LCOV_EXCL_LINE
+ SLOG(LOG_DEBUG, stt_tag(), " No Engine in engine directory"); //LCOV_EXCL_LINE
+ SLOG(LOG_DEBUG, stt_tag(), "--------------------------------------------"); //LCOV_EXCL_LINE
return 0;
}
j++;
}
} else {
- SLOG(LOG_ERROR, stt_tag(), " language is NONE");
+ SLOG(LOG_ERROR, stt_tag(), " language is NONE"); //LCOV_EXCL_LINE
}
SLOG(LOG_DEBUG, stt_tag(), " silence support : %s",
engine_info->support_silence_detection ? "true" : "false");
*/
static GSList* g_time_list = NULL;
+//LCOV_EXCL_START
int stt_config_mgr_reset_time_info()
{
/* Remove time info */
return 0;
}
+//LCOV_EXCL_STOP
int stt_config_mgr_foreach_time_info(stt_config_result_time_cb callback, void* user_data)
{
if (NULL == callback) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input paramter is NULL : callback function");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input paramter is NULL : callback function"); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_INVALID_PARAMETER;
}
int ret;
ret = stt_parser_get_time_info(&temp_time);
if (0 != ret) {
- SLOG(LOG_WARN, stt_tag(), "[WARNING] Fail to get time info : %d", ret);
+ SLOG(LOG_WARN, stt_tag(), "[WARNING] Fail to get time info : %d", ret); //LCOV_EXCL_LINE
return STT_CONFIG_ERROR_NONE;
}
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_START
int stt_config_mgr_save_time_info_file()
{
if (0 == g_slist_length(g_time_list)) {
return STT_CONFIG_ERROR_NONE;
}
+//LCOV_EXCL_STOP
int stt_parser_get_engine_info(const char* path, stt_engine_info_s** engine_info)
{
if (NULL == path || NULL == engine_info) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return -1;
}
cur = xmlDocGetRootElement(doc);
if (cur == NULL) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
if (xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_ENGINE_BASE_TAG)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] The wrong type, root node is NOT 'stt-engine'");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
cur = cur->xmlChildrenNode;
if (cur == NULL) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
/* alloc engine info */
stt_engine_info_s* temp;
temp = (stt_engine_info_s*)calloc(1, sizeof(stt_engine_info_s));
if (NULL == temp) {
+ //LCOV_EXCL_START
xmlFreeDoc(doc);
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to allocate memory");
return -1;
+ //LCOV_EXCL_STOP
}
temp->name = NULL;
temp->name = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_NAME);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_NAME); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_ENGINE_ID)) {
key = xmlNodeGetContent(cur);
temp->uuid = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_ID);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_ID); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_ENGINE_SETTING)) {
key = xmlNodeGetContent(cur);
temp->setting = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_SETTING);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_SETTING); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_ENGINE_AGREEMENT)) {
key = xmlNodeGetContent(cur);
temp->agreement = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_AGREEMENT);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_AGREEMENT); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_ENGINE_DEFAULT)) {
key = xmlNodeGetContent(cur);
}
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_LANGUAGE);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_LANGUAGE); //LCOV_EXCL_LINE
}
}
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_SILENCE_SUPPORT);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_ENGINE_SILENCE_SUPPORT); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_ENGINE_CREDENTIAL_NEED)) {
key = xmlNodeGetContent(cur);
int stt_parser_free_engine_info(stt_engine_info_s* engine_info)
{
if (NULL == engine_info) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return -1;
}
return 0;
}
+//LCOV_EXCL_START
int stt_parser_print_engine_info(stt_engine_info_s* engine_info)
{
if (NULL == engine_info)
return 0;
}
+//LCOV_EXCL_STOP
int stt_parser_load_config(stt_config_s** config_info)
{
if (NULL == config_info) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return -1;
}
if (0 != access(STT_CONFIG, F_OK)) {
doc = xmlParseFile(STT_DEFAULT_CONFIG);
if (doc == NULL) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to parse file error : %s", STT_DEFAULT_CONFIG);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to parse file error : %s", STT_DEFAULT_CONFIG); //LCOV_EXCL_LINE
xmlCleanupParser();
return -1;
}
cur = xmlDocGetRootElement(doc);
if (cur == NULL) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document"); //LCOV_EXCL_LINE
xmlFreeDoc(doc);
return -1;
}
if (xmlStrcmp(cur->name, (const xmlChar *) STT_TAG_CONFIG_BASE_TAG)) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] The wrong type, root node is NOT %s", STT_TAG_CONFIG_BASE_TAG);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] The wrong type, root node is NOT %s", STT_TAG_CONFIG_BASE_TAG); //LCOV_EXCL_LINE
xmlFreeDoc(doc);
return -1;
}
cur = cur->xmlChildrenNode;
if (cur == NULL) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document"); //LCOV_EXCL_LINE
xmlFreeDoc(doc);
return -1;
}
temp = (stt_config_s*)calloc(1, sizeof(stt_config_s));
if (NULL == temp) {
xmlFreeDoc(doc);
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to allocate memory");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Fail to allocate memory"); //LCOV_EXCL_LINE
return -1;
}
temp->engine_id = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] engine id is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] engine id is NULL"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_CONFIG_ENGINE_SETTING)) {
key = xmlNodeGetContent(cur);
temp->setting = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] setting path is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] setting path is NULL"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_CONFIG_AUTO_LANGUAGE)) {
} else if (0 == xmlStrcmp(key, (const xmlChar *)"off")) {
temp->auto_lang = false;
} else {
- SLOG(LOG_ERROR, stt_tag(), "Auto voice is wrong");
+ SLOG(LOG_ERROR, stt_tag(), "Auto voice is wrong"); //LCOV_EXCL_LINE
temp->auto_lang = true;
}
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] auto langauge is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] auto langauge is NULL"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_CONFIG_LANGUAGE)) {
key = xmlNodeGetContent(cur);
temp->language = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] language is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] language is NULL"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_CONFIG_SILENCE_DETECTION)) {
key = xmlNodeGetContent(cur);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] silence-detection is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] silence-detection is NULL"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_CONFIG_CREDENTIAL)) {
key = xmlNodeGetContent(cur);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] credential is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] credential is NULL"); //LCOV_EXCL_LINE
}
} else {
return 0;
}
+//LCOV_EXCL_START
int stt_parser_set_auto_lang(bool value)
{
if (NULL == g_config_doc)
return 0;
}
+//LCOV_EXCL_STOP
int stt_parser_find_config_changed(char** engine, char** setting, int* auto_lang, char** language, int* silence, int* credential)
{
if (NULL == engine || NULL == language || NULL == silence || NULL == credential) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Input parameter is NULL"); //LCOV_EXCL_LINE
return -1;
}
cur_new = xmlDocGetRootElement(doc);
cur_old = xmlDocGetRootElement(g_config_doc);
if (cur_new == NULL || cur_old == NULL) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
if (xmlStrcmp(cur_new->name, (const xmlChar*)STT_TAG_CONFIG_BASE_TAG) || xmlStrcmp(cur_old->name, (const xmlChar*)STT_TAG_CONFIG_BASE_TAG)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] The wrong type, root node is NOT %s", STT_TAG_CONFIG_BASE_TAG);
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
cur_new = cur_new->xmlChildrenNode;
cur_old = cur_old->xmlChildrenNode;
if (cur_new == NULL || cur_old == NULL) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
*engine = NULL;
xmlFree(key_old);
}
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Old config and new config are different");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Old config and new config are different"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)STT_TAG_CONFIG_ENGINE_SETTING)) {
if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)STT_TAG_CONFIG_ENGINE_SETTING)) {
key_new = xmlNodeGetContent(cur_new);
if (NULL != key_new) {
if (0 != xmlStrcmp(key_old, key_new)) {
- SLOG(LOG_DEBUG, stt_tag(), "Old engine setting(%s), New engine setting(%s)", (char*)key_old, (char*)key_new);
+ SLOG(LOG_DEBUG, stt_tag(), "Old engine setting(%s), New engine setting(%s)", (char*)key_old, (char*)key_new); //LCOV_EXCL_LINE
if (NULL != *setting) free(*setting);
*setting = strdup((char*)key_new);
}
xmlFree(key_old);
}
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Old config and new config are different");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Old config and new config are different"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)STT_TAG_CONFIG_AUTO_LANGUAGE)) {
if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)STT_TAG_CONFIG_AUTO_LANGUAGE)) {
key_new = xmlNodeGetContent(cur_new);
if (NULL != key_new) {
if (0 != xmlStrcmp(key_old, key_new)) {
- SLOG(LOG_DEBUG, stt_tag(), "Old auto lang(%s), New auto lang(%s)", (char*)key_old, (char*)key_new);
+ SLOG(LOG_DEBUG, stt_tag(), "Old auto lang(%s), New auto lang(%s)", (char*)key_old, (char*)key_new); //LCOV_EXCL_LINE
if (0 == xmlStrcmp((const xmlChar*)"on", key_new)) {
*auto_lang = (int)true;
} else {
xmlFree(key_old);
}
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)STT_TAG_CONFIG_LANGUAGE)) {
if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)STT_TAG_CONFIG_LANGUAGE)) {
key_new = xmlNodeGetContent(cur_new);
if (NULL != key_new) {
if (0 != xmlStrcmp(key_old, key_new)) {
- SLOG(LOG_DEBUG, stt_tag(), "Old language(%s), New language(%s)", (char*)key_old, (char*)key_new);
+ SLOG(LOG_DEBUG, stt_tag(), "Old language(%s), New language(%s)", (char*)key_old, (char*)key_new); //LCOV_EXCL_LINE
if (NULL != *language) free(*language);
*language = strdup((char*)key_new);
}
xmlFree(key_old);
}
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)STT_TAG_CONFIG_SILENCE_DETECTION)) {
if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)STT_TAG_CONFIG_SILENCE_DETECTION)) {
key_new = xmlNodeGetContent(cur_new);
if (NULL != key_new) {
if (0 != xmlStrcmp(key_old, key_new)) {
- SLOG(LOG_DEBUG, stt_tag(), "Old silence(%s), New silence(%s)", (char*)key_old, (char*)key_new);
+ SLOG(LOG_DEBUG, stt_tag(), "Old silence(%s), New silence(%s)", (char*)key_old, (char*)key_new); //LCOV_EXCL_LINE
if (0 == xmlStrcmp(key_new, (const xmlChar*)"on")) {
*silence = 1;
} else {
xmlFree(key_old);
}
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different"); //LCOV_EXCL_LINE
}
} else if (0 == xmlStrcmp(cur_new->name, (const xmlChar*)STT_TAG_CONFIG_CREDENTIAL)) {
if (0 == xmlStrcmp(cur_old->name, (const xmlChar*)STT_TAG_CONFIG_CREDENTIAL)) {
key_new = xmlNodeGetContent(cur_new);
if (NULL != key_new) {
if (0 != xmlStrcmp(key_old, key_new)) {
- SLOG(LOG_DEBUG, stt_tag(), "Old credential(%s), New credential(%s)", (char*)key_old, (char*)key_new);
+ SLOG(LOG_DEBUG, stt_tag(), "Old credential(%s), New credential(%s)", (char*)key_old, (char*)key_new); //LCOV_EXCL_LINE
if (0 == xmlStrcmp(key_new, (const xmlChar*)"true")) {
*credential = 1;
} else {
xmlFree(key_old);
}
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] old config and new config are different"); //LCOV_EXCL_LINE
}
} else {
/**
* time function
*/
-
+//LCOV_EXCL_START
int stt_parser_set_time_info(GSList* time_list)
{
if (0 == g_slist_length(time_list)) {
xmlFreeDoc(doc);
return 0;
}
+//LCOV_EXCL_STOP
void __stt_parser_time_info_free(void* data)
{
int stt_parser_get_time_info(GSList** time_list)
{
if (NULL == time_list) {
- SLOG(LOG_ERROR, stt_tag(), "Invalid paramter : text is NULL");
+ SLOG(LOG_ERROR, stt_tag(), "Invalid paramter : text is NULL"); //LCOV_EXCL_LINE
return -1;
}
doc = xmlParseFile(STT_TIME_INFO_PATH);
if (doc == NULL) {
- SLOG(LOG_WARN, stt_tag(), "[WARNING] File is not exist");
+ SLOG(LOG_WARN, stt_tag(), "[WARNING] File is not exist"); //LCOV_EXCL_LINE
return -1;
}
cur = xmlDocGetRootElement(doc);
if (cur == NULL) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
if (xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_TIME_BASE_TAG)) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] The wrong type, root node is NOT '%s'", STT_TAG_TIME_BASE_TAG);
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
cur = cur->xmlChildrenNode;
if (cur == NULL) {
+ //LCOV_EXCL_START
SLOG(LOG_ERROR, stt_tag(), "[ERROR] Empty document");
xmlFreeDoc(doc);
return -1;
+ //LCOV_EXCL_STOP
}
/* alloc time info */
if (0 == xmlStrcmp(cur->name, (const xmlChar *)STT_TAG_TIME_INDEX)) {
key = xmlGetProp(cur, (const xmlChar*)STT_TAG_TIME_COUNT);
if (NULL == key) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_COUNT);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_COUNT); //LCOV_EXCL_LINE
if (NULL != temp_time_list) {
g_slist_free_full(temp_time_list, __stt_parser_time_info_free);
xmlFree(key);
if (count <= 0) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] count is invalid : %d", count);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] count is invalid : %d", count); //LCOV_EXCL_LINE
break;
}
temp_info = (stt_result_time_info_s*)calloc(1, sizeof(stt_result_time_info_s));
if (NULL == temp_info) {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] Memory alloc error!!");
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] Memory alloc error!!"); //LCOV_EXCL_LINE
if (NULL != temp_time_list) {
g_slist_free_full(temp_time_list, __stt_parser_time_info_free);
if (0 == xmlStrcmp(time_node->name, (const xmlChar *)STT_TAG_TIME_TEXT)) {
key = xmlNodeGetContent(time_node);
if (NULL != key) {
- SLOG(LOG_DEBUG, stt_tag(), "text : %s", (char *)key);
+ SLOG(LOG_DEBUG, stt_tag(), "text : %s", (char *)key); //LCOV_EXCL_LINE
temp_info->text = strdup((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_TEXT);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_TEXT); //LCOV_EXCL_LINE
free(temp_info);
break;
}
if (0 == xmlStrcmp(time_node->name, (const xmlChar *)STT_TAG_TIME_START)) {
key = xmlNodeGetContent(time_node);
if (NULL != key) {
- SLOG(LOG_DEBUG, stt_tag(), "Start time : %s", (char *)key);
+ SLOG(LOG_DEBUG, stt_tag(), "Start time : %s", (char *)key); //LCOV_EXCL_LINE
temp_info->start_time = atoi((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_START);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_START); //LCOV_EXCL_LINE
if (NULL != temp_info->text) free(temp_info->text);
free(temp_info);
break;
if (0 == xmlStrcmp(time_node->name, (const xmlChar *)STT_TAG_TIME_END)) {
key = xmlNodeGetContent(time_node);
if (NULL != key) {
- SLOG(LOG_DEBUG, stt_tag(), "End time : %s", (char *)key);
+ SLOG(LOG_DEBUG, stt_tag(), "End time : %s", (char *)key); //LCOV_EXCL_LINE
temp_info->end_time = atoi((char*)key);
xmlFree(key);
} else {
- SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_END);
+ SLOG(LOG_ERROR, stt_tag(), "[ERROR] <%s> has no content", STT_TAG_TIME_END); //LCOV_EXCL_LINE
if (NULL != temp_info->text) free(temp_info->text);
free(temp_info);
break;