return TTSD_ERROR_OPERATION_FAILED;
}
- /* 2. increse ref count */
+ /* 2. increase ref count */
data->client_ref_count++;
/* 3. if ref count change 0 to 1 and not default, load voice */
return TTSD_ERROR_OPERATION_FAILED;
}
- /* 2. Decrese ref count */
+ /* 2. Decrease ref count */
data->client_ref_count--;
/* 3. if ref count change 0 and not default, load voice */
return ret;
}
+int ttsd_engine_check_app_agreed(const char* appid, bool* is_agreed)
+{
+ if (false == g_agent_init) {
+ SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Not Initialized");
+ return TTSD_ERROR_OPERATION_FAILED;
+ }
+
+ if (false == g_engine_info->is_loaded) {
+ SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] No loaded engine");
+ return TTSD_ERROR_ENGINE_NOT_FOUND;
+ }
+
+ if (NULL == appid || NULL == is_agreed) {
+ SLOG(LOG_WARN, tts_tag(), "[Engine Agent WARNING] Invalid parameter, appid is NULL");
+ return TTSD_ERROR_NONE;
+ }
+
+
+ if (NULL == g_engine_info->callbacks->check_app_agreed) {
+ SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Not supported feature");
+ return TTSD_ERROR_NOT_SUPPORTED_FEATURE;
+ }
+
+ int ret = 0;
+ bool tmp = true; // default value is true until now
+ ret = g_engine_info->callbacks->check_app_agreed(appid, &tmp);
+ if (0 != ret) {
+ SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to check app agreed(%d)", ret);
+ return TTSD_ERROR_OPERATION_FAILED;
+ }
+
+ *is_agreed = tmp;
+
+ return ret;
+}
+
void __free_voice_list(GList* voice_list)
{
GList *iter = NULL;