Add and update info logs
[platform/core/uifw/stt.git] / server / sttd_server.c
index ebd6df0..c31d6a6 100644 (file)
@@ -680,6 +680,8 @@ static Eina_Bool __quit_ecore_loop(void *data)
 
 int sttd_server_finalize(int uid)
 {
+       SLOG(LOG_INFO, TAG_STTD, "[Server INFO] Enter Finalize");
+
        /* check if uid is valid */
        app_state_e state;
        if (0 != sttd_client_get_state(uid, &state)) {
@@ -703,6 +705,8 @@ int sttd_server_finalize(int uid)
                        }
                }
 
+               SLOG(LOG_INFO, TAG_STTD, "[Server INFO] stt_cancel is invoked while state is (%d)", state);
+
                if (0 != sttd_engine_agent_recognize_cancel(uid)) {
                        SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to cancel recognition");
                }
@@ -721,6 +725,8 @@ int sttd_server_finalize(int uid)
                ecore_timer_add(0, __quit_ecore_loop, NULL);
        }
 
+       SLOG(LOG_INFO, TAG_STTD, "[Server INFO] End Finalize");
+
        return STTD_ERROR_NONE;
 }
 
@@ -1285,10 +1291,14 @@ Eina_Bool __time_out_for_processing(void *data)
                g_processing_timer = NULL;
        }
 
+       SLOG(LOG_INFO, TAG_STTD, "[Server INFO] Enter __time_out_for_processing");
+
        /* current uid */
        int uid = stt_client_get_current_recognition();
        if (0 == uid)   return EINA_FALSE;
 
+       SLOG(LOG_INFO, TAG_STTD, "[Server Info] stt cancel is invoked by timeout for processing");
+
        /* Cancel engine */
        int ret = sttd_engine_agent_recognize_cancel();
        if (0 != ret) {
@@ -1310,6 +1320,8 @@ Eina_Bool __time_out_for_processing(void *data)
 
        stt_client_unset_current_recognition();
 
+       SLOG(LOG_INFO, TAG_STTD, "[Server INFO] End __time_out_for_processing");
+
        return EINA_FALSE;
 }
 
@@ -1457,6 +1469,8 @@ int sttd_server_stop(int uid)
 
 int sttd_server_cancel(int uid)
 {
+       SLOG(LOG_INFO, TAG_STTD, "[Server INFO] Enter sttd_server_cancel");
+
        /* check if uid is valid */
        app_state_e state;
        if (0 != sttd_client_get_state(uid, &state)) {
@@ -1494,6 +1508,8 @@ int sttd_server_cancel(int uid)
        /* change uid state */
        sttd_client_set_state(uid, APP_STATE_READY);
 
+       SLOG(LOG_INFO, TAG_STTD, "[Server Info] stt cancel is invoked by app's request");
+
        /* cancel engine recognition */
        int ret = sttd_engine_agent_recognize_cancel();
        if (0 != ret) {
@@ -1504,6 +1520,8 @@ int sttd_server_cancel(int uid)
        /* Notify uid state change */
        sttdc_send_set_state(uid, APP_STATE_READY);
 
+       SLOG(LOG_INFO, TAG_STTD, "[Server INFO] End sttd_server_cancel");
+
        return STTD_ERROR_NONE;
 }