Send synthesized PCM data from TTS engine to client
[platform/core/uifw/tts.git] / client / tts_core.h
index 7ef8756..2b843dc 100644 (file)
 #ifndef __TTS_CORE_H_
 #define __TTS_CORE_H_
 
+#include "tts_client.h"
+#include "tts_internal.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "tts_client.h"
-
 // common function
 int tts_core_notify_state_changed(tts_client_s* client, tts_state_e current_state);
-int tts_core_notify_state_changed_async(tts_client_s* client, tts_state_e current_state);
 int tts_core_notify_utt_started(tts_client_s* client, int utt_id);
 int tts_core_notify_utt_completeted(tts_client_s* client, int utt_id);
 int tts_core_notify_error_async(tts_client_s* client, tts_error_e reason, int utt_id, const char* err_msg);
 int tts_core_notify_default_voice_changed(tts_client_s* client, const char* before_lang, int before_voice_type, const char* language, int voice_type);
 int tts_core_notify_engine_changed(tts_client_s* client, const char* engine_id, const char* language, int voice_type, bool need_credential);
 int tts_core_notify_screen_reader_changed(tts_client_s* client, bool value);
+int tts_core_notify_service_state_changed(tts_client_s* client, tts_service_state_e before_state, tts_service_state_e current_state);
+int tts_core_notify_synthesized_pcm(tts_client_s* client, int utt_id, tts_synthesized_pcm_event_e event, const char* pcm_data, int pcm_data_size, tts_audio_type_e audio_type, int sample_rate);
 
 bool tts_core_is_valid_text(const char* text);
 bool tts_core_check_screen_reader(tts_client_s* client);
+bool tts_core_check_credential(tts_client_s* client);
 
 const char* tts_core_covert_error_code(tts_error_e err);
 
 // called by tts.c
 int tts_core_initialize();
 int tts_core_deinitialize();
-const char* tts_core_get_engine_name();
 
 int tts_core_prepare(tts_client_s* client);
 int tts_core_prepare_sync(tts_client_s* client);
@@ -62,7 +64,9 @@ int tts_core_stop_pcm(tts_client_s* client);
 int tts_core_set_private_data(tts_client_s* client, const char* key, const char* data);
 int tts_core_get_private_data(tts_client_s* client, const char* key, char** data);
 
-int tts_core_receive_hello(unsigned int uid, int ret, int credential_needed);
+int tts_core_get_service_state(tts_client_s* client, tts_service_state_e* service_state);
+
+int tts_core_receive_hello(unsigned int uid, int ret, tts_service_state_e service_state, int credential_needed);
 int tts_core_handle_service_reset();
 
 #ifdef __cplusplus