In that code, the parameter 'user_data' is used as 'engine_id'.
However if it changed to 'engine_id' or stayed 'user_data', it can be entered wrong engine name from the engine's set.
So, it removed parameter sent from engine, and it finds itself what is current engine.
Change-Id: Ic4e0b05c5d46d1c85718246af3d5a1f2770a88f8
* @brief Sends the personal voice's information to the engine service user.
* @since_tizen 9.0
* @remarks This API is called when TTS engine sends the personal voice's information to the engine service user.
-* The personal voice's information and @a user_data must be transferred to the engine service user through this function.
+* The personal voice's information must be transferred to the engine service user through this function.
* @param[in] language The language is specified as an ISO 3166 alpha-2 two-letter country code
* followed by ISO 639-1 for the two-letter language code.
* For example, "ko_KR" for Korean, "en_US" for American English
* @param[in] unique_id The unique_id is used as ptts_id.
* @param[in] display_name The display_name is saved from user. It can be used client's side.
* @param[in] device_name The device_name is the name of the device where personal voice is stored.
-* @param[in] user_data The user data which contains TTS engine name or NULL
* @return @c 0 on success,
* otherwise a negative error value
* @retval #TTSE_ERROR_NONE Successful
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
* @pre The ttse_main() function doesn't have to be invoked before this function is called.
*/
-int ttse_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data);
+int ttse_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name);
#ifdef __cplusplus
return TTSD_ERROR_NONE;
}
-int ttsd_config_update_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data)
+int ttsd_config_update_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name)
{
int ret = 0;
char current_engine[1024] = {'\0', };
- if (user_data) {
- strncpy(current_engine, (char*)user_data, sizeof(current_engine) - 1);
- } else {
- if (0 != aul_app_get_appid_bypid(getpid(), current_engine, sizeof(current_engine) - 1)) {
- SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get callee appid by pid");
- }
+ if (0 != aul_app_get_appid_bypid(getpid(), current_engine, sizeof(current_engine) - 1)) {
+ SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get callee appid by pid");
}
SLOG(LOG_DEBUG, tts_tag(), "[Server] TTS Current Engine(%s)", current_engine);
return TTSD_ERROR_OPERATION_FAILED;
}
+ SLOG(LOG_DEBUG, tts_tag(), "[Server] TTS Current Engine(%s), matched(%d)", current_engine, matched);
+
if (!matched) {
ret = tts_config_mgr_update_personal_voice(current_engine, language, unique_id, display_name, device_name);
if (0 != ret) {
int ttsd_config_set_instant_reprepare_client(const unsigned int uid);
-int ttsd_config_update_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data);
+int ttsd_config_update_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name);
int ttsd_config_get_personal_voices_list(ttsd_config_supported_personal_voice_cb personal_voice_cb, void* user_data);
return ret;
}
-int ttsd_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data)
+int ttsd_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name)
{
SLOG(LOG_DEBUG, tts_tag(), "[Server] Set private data requested cb");
- int ret = ttsd_config_update_personal_voice(language, unique_id, display_name, device_name, user_data);
+ int ret = ttsd_config_update_personal_voice(language, unique_id, display_name, device_name);
if (0 != ret) {
SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to update personal voice");
}
int ttsd_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback);
-int ttsd_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data);
+int ttsd_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name);
/*
return is_test_app;
}
-int ttse_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data)
+int ttse_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name)
{
SLOG(LOG_INFO, tts_tag(), "[INFO] TTS Engine send personal voices list : language(%s), unique_id(%s), display_name(%s), device_name(%s)", language, unique_id, display_name, device_name);
- int ret = ttsd_send_personal_voice(language, unique_id, display_name, device_name, user_data);
+ int ret = ttsd_send_personal_voice(language, unique_id, display_name, device_name);
if (0 != ret) {
SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to send personal voice");
}