* otherwise a negative error value
* @retval #TTS_ERROR_NONE Successful
* @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_NOT_SUPPORTED_FEATURE Not supported feature.
* @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTS_ERROR_INVALID_STATE Invalid state
* @retval #TTS_ERROR_OPERATION_FAILED Operation failure
* otherwise a negative error value
* @retval #TTS_ERROR_NONE Successful
* @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_PERMISSION_DENIED Permission denied
* @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTS_ERROR_INVALID_STATE Invalid state
* @retval #TTS_ERROR_INVALID_VOICE Invalid voice about language, voice type
* @since_tizen 9.0
* @remarks This callback function is optional and is registered using ttse_set_personal_tts_id_set_cb().
* @param[in] ptts_id The personal tts id
+* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success,
* otherwise a negative error value
* @retval #TTSE_ERROR_NONE Successful
* @retval #TTSE_ERROR_INVALID_STATE Not initialized
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
*/
-typedef int (*ttse_set_personal_tts_id_cb)(const char* ptts_id);
+typedef int (*ttse_personal_tts_id_set_cb)(const char* ptts_id, void* user_data);
/**
/**
* @brief Sets a callback function to be called when a personal TTS id is set.
* @since_tizen 9.0
-* @remarks The ttse_set_personal_tts_id_cb() function is called when the engine service user sends the ptts_id.
+* @remarks The ttse_personal_tts_id_set_cb() function is called when the engine service user sends the ptts_id.
* @param[in] callback ttse_set_personal_tts_id event callback function
+* @param[in] user_data The user data passed from engine
* @return @c 0 on success,
* otherwise a negative error value
* @retval #TTSE_ERROR_NONE Successful
* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_INVALID_STATE Not initialized
* @pre The ttse_main() function should be invoked before this function is called.
-* @see ttse_set_personal_tts_id_cb()
+* @see ttse_personal_tts_id_set_cb()
*/
-int ttse_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback);
+int ttse_set_personal_tts_id_set_cb(ttse_personal_tts_id_set_cb callback, void* user_data);
/**
return TTSD_ERROR_NOT_SUPPORTED_FEATURE;
}
- ret = g_engine_info->callbacks->set_personal_tts_id(ptts_id);
+ ret = g_engine_info->callbacks->set_personal_tts_id(ptts_id, NULL);
if (0 != ret) {
SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to set personal tts id : ptts_id(%s), result(%s)",
ptts_id, __ttsd_get_engine_error_code(ret));
return TTSD_ERROR_NONE;
}
-int ttsd_engine_agent_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback)
+int ttsd_engine_agent_set_personal_tts_id_set_cb(ttse_personal_tts_id_set_cb callback)
{
if (false == __is_agent_initialized()) {
SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Not Initialized");
int ttsd_engine_agent_set_private_data_set_cb(ttse_private_data_set_cb callback);
int ttsd_engine_agent_set_private_data_requested_cb(ttse_private_data_requested_cb callback);
int ttsd_engine_agent_set_activated_mode_changed_cb(ttse_activated_mode_changed_cb callback);
-int ttsd_engine_agent_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback);
+int ttsd_engine_agent_set_personal_tts_id_set_cb(ttse_personal_tts_id_set_cb callback);
/** Unload current engine */
int ttsd_engine_agent_unload_current_engine();
ttse_private_data_set_cb private_data_set;
ttse_private_data_requested_cb private_data_requested;
ttse_activated_mode_changed_cb activated_mode_changed;
- ttse_set_personal_tts_id_cb set_personal_tts_id;
+ ttse_personal_tts_id_set_cb set_personal_tts_id;
} tts_engine_callback_s;
return ret;
}
-int ttsd_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback)
+int ttsd_set_personal_tts_id_set_cb(ttse_personal_tts_id_set_cb callback, void* user_data)
{
int ret = ttsd_engine_agent_set_personal_tts_id_set_cb(callback);
if (TTSD_ERROR_NONE != ret) {
int ttsd_get_activated_mode(int* activated_mode);
int ttsd_set_activated_mode_changed_cb(ttse_activated_mode_changed_cb callback);
-int ttsd_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback);
+int ttsd_set_personal_tts_id_set_cb(ttse_personal_tts_id_set_cb callback, void* user_data);
int ttsd_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data);
return ret;
}
-int ttse_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback)
+int ttse_set_personal_tts_id_set_cb(ttse_personal_tts_id_set_cb callback, void* user_data)
{
if (false == is_feature_enabled()) {
return TTSE_ERROR_NOT_SUPPORTED;
return TTSE_ERROR_INVALID_STATE;
}
- int ret = ttsd_set_personal_tts_id_set_cb(callback);
+ int ret = ttsd_set_personal_tts_id_set_cb(callback, user_data);
if (TTSD_ERROR_NONE != ret) {
SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to set personal tts id set cb. ret(%d/%s)", ret, get_error_message(ret));
}