Delete processing timer at main thread
[platform/core/uifw/stt.git] / common / stt_engine.c
index ab6a4bc..57944a2 100644 (file)
@@ -149,6 +149,8 @@ int stt_engine_initialize(bool is_from_lib)
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to initialize");
+
        ret = g_engine->callback->initialize();
        if (0 != ret) {
                SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Fail to initialize : %s", __stt_get_engine_error_code(ret));
@@ -174,6 +176,8 @@ int stt_engine_deinitialize()
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to deinitialize");
+
        int ret;
        ret = g_engine->callback->deinitialize();
        if (0 != ret) {
@@ -391,6 +395,8 @@ int stt_engine_support_silence(bool* support)
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to support silence");
+
        if (NULL == g_engine->callback->support_silence) {
                SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Invalid engine");
                return STTE_ERROR_OPERATION_FAILED;
@@ -420,6 +426,8 @@ int stt_engine_need_app_credential(bool* need)
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to need app credential");
+
        if (NULL == g_engine->callback->need_app_credential) {
                SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Invalid engine");
                return STTE_ERROR_OPERATION_FAILED;
@@ -454,6 +462,8 @@ int stt_engine_support_recognition_type(const char* type, bool* support)
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to support recognition type, type(%s)", type);
+
        int ret = STTE_ERROR_NONE;
        ret = g_engine->callback->support_recognition_type(type, support);
        if (0 != ret) {
@@ -484,6 +494,8 @@ int stt_engine_get_audio_type(stte_audio_type_e* types, int* rate, int* channels
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to get audio format");
+
        int ret;
        ret = g_engine->callback->get_audio_format(types, rate, channels);
        if (0 != ret) {
@@ -511,6 +523,8 @@ int stt_engine_set_silence_detection(bool value)
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to set silence detection(%d)", value);
+
        int ret = g_engine->callback->set_silence_detection(value);
        if (STTE_ERROR_NOT_SUPPORTED_FEATURE == ret) {
                SLOG(LOG_WARN, stt_tag(), "[Engine WARNING] Not support silence detection");
@@ -543,6 +557,8 @@ int stt_engine_check_app_agreed(const char* appid, bool* is_agreed)
                return 0;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to app agreed, appid(%s), is_agreed(%d)", appid, *is_agreed);
+
        int ret = g_engine->callback->check_app_agreed(appid, is_agreed);
        if (0 != ret) {
                SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Fail to get app agreement : %s", __stt_get_engine_error_code(ret));
@@ -575,6 +591,8 @@ int stt_engine_recognize_start(const char* lang, const char* recognition_type, c
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to start, lang(%s), recognition_type(%s), credential(%s)", lang, recognition_type, credential);
+
        int ret = g_engine->callback->start(lang, recognition_type, appid, credential, user_param);
 
        if (0 != ret) {
@@ -632,6 +650,8 @@ int stt_engine_recognize_stop()
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to stop");
+
        int ret = g_engine->callback->stop();
        if (0 != ret) {
                SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Fail to stop : %s", __stt_get_engine_error_code(ret));
@@ -657,6 +677,8 @@ int stt_engine_recognize_cancel()
                return STTE_ERROR_OPERATION_FAILED;
        }
 
+       SLOG(LOG_INFO, stt_tag(), "[Engine Info] request to cancel");
+
        int ret = g_engine->callback->cancel();
        if (0 != ret) {
                SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Fail to cancel : %s", __stt_get_engine_error_code(ret));
@@ -781,10 +803,6 @@ int stt_engine_send_result(stte_result_event_e event, const char* type, const ch
 
 int stt_engine_send_error(stte_error_e error, const char* msg)
 {
-       if (NULL == msg) {
-               SLOG(LOG_ERROR, stt_tag(), "[Engine ERROR] Invalid parameter");
-       }
-
        int ret = STTE_ERROR_NONE;
        ret = sttd_engine_agent_send_error(error, msg);
        if (0 != ret) {