Move unreleased definitions to the internal header 17/291517/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Tue, 18 Apr 2023 02:39:17 +0000 (11:39 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 18 Apr 2023 02:39:38 +0000 (11:39 +0900)
Change-Id: I4746d219d5385713b278bca58abf9115061837c3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_client.h
client/tts_dbus.h
client/tts_tidl.h
include/tts.h
include/tts_internal.h

index b4e5bc1c60326aba1506e644a39cf43ba3d168c4..9e4c73a342cb4de7d8fec4e231aac4e07769fde3 100644 (file)
@@ -18,6 +18,7 @@
 #include <Ecore.h>
 
 #include "tts.h"
+#include "tts_internal.h"
 #include "tts_config_mgr.h"
 #include "tts_main.h"
 
index 63844dc5f39a112b669b4462a69d9551ca0ab115..15f227131f4af6a51ab5490a548ca263cf322f4a 100644 (file)
@@ -16,6 +16,7 @@
 #define __TTS_DBUS_H_
 
 #include "tts.h"
+#include "tts_internal.h"
 
 #ifdef __cplusplus
 extern "C" {
index e4740d403c01008c091a039b3e6ff45a4f76100f..a8aa34b29f07160571a406b6492ffaca2cb6ed20 100644 (file)
@@ -14,7 +14,8 @@
 #ifndef __TTS_TIDL_H_
 #define __TTS_TIDL_H_
 
-#include <tts.h>
+#include "tts.h"
+#include "tts_internal.h"
 
 #ifdef __cplusplus
 extern "C" {
index 63fb7c2710281f34143f68fb4a69fb8fbac14414..f36eb8291451c1b9d0662095ade4d74502eceb63 100644 (file)
@@ -98,28 +98,6 @@ typedef enum {
 } tts_service_state_e;
 
 
-/**
- * @brief Enumeration for synthesized pcm event.
- * @since_tizen 7.5
-*/
-typedef enum {
-       TTS_SYNTHESIZED_PCM_EVENT_FAIL = -1, /**< 'Error' event */
-       TTS_SYNTHESIZED_PCM_EVENT_START, /**< 'Started' event */
-       TTS_SYNTHESIZED_PCM_EVENT_CONTINUE, /**< 'Finished' event */
-       TTS_SYNTHESIZED_PCM_EVENT_FINISH, /**< 'Finished' event */
-} tts_synthesized_pcm_event_e;
-
-
-/**
- * @brief Enumration for playing mode of TTS.
- * @since_tizen 7.5
-*/
-typedef enum {
-       TTS_PLAYING_MODE_BY_SERVICE = 0, /**< Mode for TTS playing on TTS service */
-       TTS_PLAYING_MODE_BY_CLIENT = 1, /**< Mode for TTS playing on TTS client */
-} tts_playing_mode_e;
-
-
 /**
  * @brief Definition for automatic speaking speed.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -293,22 +271,6 @@ typedef void (*tts_screen_reader_changed_cb)(tts_h tts, bool is_on, void* user_d
 typedef void (*tts_service_state_changed_cb)(tts_h tts, tts_service_state_e previous, tts_service_state_e current, void* user_data);
 
 
-/**
- * @brief Called when the synthesized pcm data is come from the engine.
- * @since_tizen 7.5
- * @remarks The @a tts handle should not be destroyed in the callback.
- * @param[in] tts The TTS handle, the same handle for which the callback was set.
- * @param[in] event The event type
- * @param[in] buffer The synthesized pcm data
- * @param[in] buffer_size The size of the buffer
- * @param[in] user_data The user data passed from the callback registration function
- * @pre An application registers this callback using tts_set_synthesized_pcm_cb() to get pcm data.
- * @see tts_set_synthesized_pcm_cb()
- * @see tts_unset_synthesized_pcm_cb()
- */
-typedef void (*tts_synthesized_pcm_cb)(tts_h tts, tts_synthesized_pcm_event_e event, char* buffer, int buffer_size, void *user_data);
-
-
 /**
  * @brief Creates a handle for TTS.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -378,24 +340,6 @@ int tts_set_mode(tts_h tts, tts_mode_e mode);
 int tts_get_mode(tts_h tts, tts_mode_e* mode);
 
 
-/**
- * @brief Sets the TTS playing mode.
- * @since_tizen 7.5
- * @param[in] tts The TTS handle
- * @param[in] mode The mode
- * @return @c 0 on success,
- *        otherwise a negative error value
- * @retval #TTS_ERROR_NONE Successful
- * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #TTS_ERROR_INVALID_STATE Invalid state
- * @pre The state should be #TTS_STATE_CREATED.
- * @see tts_get_playing_mode()
- * @see tts_play()
- */
-int tts_set_playing_mode(tts_h tts, tts_playing_mode_e mode);
-
-
 /**
  * @brief Sets the app credential.
  * @details Using this API, the application can set a credential.
@@ -1072,41 +1016,6 @@ int tts_set_service_state_changed_cb(tts_h tts, tts_service_state_changed_cb cal
 */
 int tts_unset_service_state_changed_cb(tts_h tts);
 
-
-/**
- * @brief Sets the default to be called when the synthesized pcm data is recieved.
- * @since_tizen 7.5
- * @param[in] tts The TTS handle
- * @param callback The callback function to register
- * @param user_data The user data to be passed to the callback function
- * @return @c 0 on success,
- *                otherwise a negative error value
- * @retval #TTS_ERROR_NONE Successful
- * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #TTS_ERROR_INVALID_STATE Invalid state
- * @pre The TTS state should be #TTS_STATE_CREATED.
- * @see tts_synthesized_pcm_cb()
- * @see tts_unset_synthesized_pcm_cb()
- */
-int tts_set_synthesized_pcm_cb(tts_h tts, tts_synthesized_pcm_cb callback, void* user_data);
-
-
-/**
- * @brief Unsets the callback function.
- * @since_tizen 7.5
- * @param tts The TTS handle
- * @return @c 0 on success,
- *                otherwise a negative error value
- * @retval #TTS_ERROR_NONE Successful
- * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #TTS_ERROR_INVALID_STATE Invalid state
- * @pre The TTS state should be #TTS_STATE_CREATED.
- * @see tts_set_synthesized_pcm_cb()
-  */
-int tts_unset_synthesized_pcm_cb(tts_h tts);
-
 #ifdef __cplusplus
 }
 #endif
index ab07e2452c2545adc535055f0d3a1c4ad8dc033d..a08a977f66e98c70b7097b5b74845f04577a7dee 100644 (file)
@@ -27,11 +27,51 @@ extern "C"
 {
 #endif
 
+
+/**
+ * @brief Enumration for playing mode of TTS.
+ * @since_tizen 7.5
+*/
+typedef enum {
+       TTS_PLAYING_MODE_BY_SERVICE = 0, /**< Mode for TTS playing on TTS service */
+       TTS_PLAYING_MODE_BY_CLIENT = 1, /**< Mode for TTS playing on TTS client */
+} tts_playing_mode_e;
+
+
+/**
+ * @brief Enumeration for synthesized pcm event.
+ * @since_tizen 7.5
+*/
+typedef enum {
+       TTS_SYNTHESIZED_PCM_EVENT_FAIL = -1, /**< 'Error' event */
+       TTS_SYNTHESIZED_PCM_EVENT_START, /**< 'Started' event */
+       TTS_SYNTHESIZED_PCM_EVENT_CONTINUE, /**< 'Finished' event */
+       TTS_SYNTHESIZED_PCM_EVENT_FINISH, /**< 'Finished' event */
+} tts_synthesized_pcm_event_e;
+
+
 /**
  * @brief Definition for TTS interrupt mode
  */
 #define TTS_MODE_INTERRUPT             3
 
+
+/**
+ * @brief Called when the synthesized pcm data is come from the engine.
+ * @since_tizen 7.5
+ * @remarks The @a tts handle should not be destroyed in the callback.
+ * @param[in] tts The TTS handle, the same handle for which the callback was set.
+ * @param[in] event The event type
+ * @param[in] buffer The synthesized pcm data
+ * @param[in] buffer_size The size of the buffer
+ * @param[in] user_data The user data passed from the callback registration function
+ * @pre An application registers this callback using tts_set_synthesized_pcm_cb() to get pcm data.
+ * @see tts_set_synthesized_pcm_cb()
+ * @see tts_unset_synthesized_pcm_cb()
+ */
+typedef void (*tts_synthesized_pcm_cb)(tts_h tts, tts_synthesized_pcm_event_e event, char* buffer, int buffer_size, void *user_data);
+
+
 /**
  * @brief Sets server tts.
  * @details Using this API, the application can ask server tts with a credential.
@@ -121,6 +161,59 @@ int tts_play_pcm(tts_h tts);
 int tts_stop_pcm(tts_h tts);
 
 
+/**
+ * @brief Sets the TTS playing mode.
+ * @since_tizen 7.5
+ * @param[in] tts The TTS handle
+ * @param[in] mode The mode
+ * @return @c 0 on success,
+ *        otherwise a negative error value
+ * @retval #TTS_ERROR_NONE Successful
+ * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
+ * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TTS_ERROR_INVALID_STATE Invalid state
+ * @pre The state should be #TTS_STATE_CREATED.
+ * @see tts_get_playing_mode()
+ * @see tts_play()
+ */
+int tts_set_playing_mode(tts_h tts, tts_playing_mode_e mode);
+
+
+/**
+ * @brief Sets the default to be called when the synthesized pcm data is recieved.
+ * @since_tizen 7.5
+ * @param[in] tts The TTS handle
+ * @param callback The callback function to register
+ * @param user_data The user data to be passed to the callback function
+ * @return @c 0 on success,
+ *                otherwise a negative error value
+ * @retval #TTS_ERROR_NONE Successful
+ * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
+ * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TTS_ERROR_INVALID_STATE Invalid state
+ * @pre The TTS state should be #TTS_STATE_CREATED.
+ * @see tts_synthesized_pcm_cb()
+ * @see tts_unset_synthesized_pcm_cb()
+ */
+int tts_set_synthesized_pcm_cb(tts_h tts, tts_synthesized_pcm_cb callback, void* user_data);
+
+
+/**
+ * @brief Unsets the callback function.
+ * @since_tizen 7.5
+ * @param tts The TTS handle
+ * @return @c 0 on success,
+ *                otherwise a negative error value
+ * @retval #TTS_ERROR_NONE Successful
+ * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
+ * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TTS_ERROR_INVALID_STATE Invalid state
+ * @pre The TTS state should be #TTS_STATE_CREATED.
+ * @see tts_set_synthesized_pcm_cb()
+  */
+int tts_unset_synthesized_pcm_cb(tts_h tts);
+
+
 
 #ifdef __cplusplus
 }