static int g_feature_enabled = -1;
static bool g_is_terminated = false;
+static bool g_is_started = false;
const char* tts_tag()
/* Register vconfkey callback to detect engine change */
vconf_notify_key_changed(TTS_ENGINE_DB_DEFAULT, __engine_changed_cb, NULL);
+ g_is_started = true;
+
SLOG(LOG_DEBUG, tts_tag(), "@@@");
return TTSE_ERROR_NONE;
vconf_ignore_key_changed(TTS_ENGINE_DB_DEFAULT, __engine_changed_cb);
g_is_terminated = true;
+ g_is_started = false;
return TTSE_ERROR_NONE;
}
return TTSE_ERROR_INVALID_PARAMETER;
}
- if (g_is_terminated) {
- SLOG(LOG_ERROR, tts_tag(), "[ERROR] Service engine is terminated.");
+ if (false == g_is_started) {
+ SLOG(LOG_ERROR, tts_tag(), "[ERROR] Service engine is not started.");
return TTSE_ERROR_INVALID_STATE;
}
return TTSE_ERROR_INVALID_PARAMETER;
}
- if (g_is_terminated) {
- SLOG(LOG_ERROR, tts_tag(), "[ERROR] Service engine is terminated.");
+ if (false == g_is_started) {
+ SLOG(LOG_ERROR, tts_tag(), "[ERROR] Service engine is not started.");
return TTSE_ERROR_INVALID_STATE;
}