* This callback function is called when the activated TTS modes are changed.
* @since_tizen 7.0
* @remarks This callback function is optional and is registered using ttse_set_activated_mode_changed_cb().
-* @param[in] activated_mode The activated TTS modes by connected clients, values of ttse_mode_mask_e combined with bitwise 'or'.
+* @param[in] activated_mode The activated TTS modes by connected clients, values of #ttse_mode_mask_e combined with bitwise 'or'.
* @see ttse_set_activated_mode_changed_cb()
* @see ttse_get_activated_mode()
*/
* @return This function returns zero on success,
* or negative with error code on failure
* @retval #TTSE_ERROR_NONE Successful
+* @retval #TTSE_ERROR_NOT_SUPPORTED Not supported
* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
-* @retval #TTSE_ERROR_NOT_SUPPORTED Not supported
* @see ttse_request_callback_s
* @code
#include <ttse.h>
* @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_NOT_SUPPORTED Not supported
+* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
*/
int ttse_get_speed_range(int* min, int* normal, int* max);
* @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_NOT_SUPPORTED Not supported
+* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
*/
int ttse_get_pitch_range(int* min, int* normal, int* max);
* @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_NOT_SUPPORTED Not supported
+* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
* @pre The ttse_main() function should be invoked before this function is called.
* ttse_start_synthesis_cb() will invoke this function.
* @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_NOT_SUPPORTED Not supported
+* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
* @pre The ttse_main() function should be invoked before this function is called.
*/
* @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_NOT_SUPPORTED Not supported
+* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
* @pre The ttse_main() function should be invoked before this function is called.
* @see ttse_private_data_set_cb()
* @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_NOT_SUPPORTED Not supported
+* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure
* @pre The ttse_main() function should be invoked before this function is called.
* @see ttse_private_data_requested_cb()
* @a activated_mode has the same bit sequence as '#TTSE_MODE_MASK_DEFAULT | #TTSE_MODE_MASK_SCREEN_READER'.
* Using this API, the engine can get the activated TTS modes information.
* @since_tizen 7.0
-* @param[out] activated_mode The activated TTS mode by connected clients, values of ttse_mode_mask_e combined with bitwise 'or'.
+* @param[out] activated_mode The activated TTS mode by connected clients, values of #ttse_mode_mask_e combined with bitwise 'or'.
* @return @c 0 on success,
* otherwise a negative error value
* @retval #TTSE_ERROR_NONE Successful
return "ttsd";
}
-static bool __is_feature_enabled()
+static bool is_feature_enabled()
{
if (1 == g_feature_enabled) {
return true;
int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
g_is_terminated = false;
if (!ecore_init()) {
int ttse_terminate(void)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
if (true == g_is_terminated) {
SLOG(LOG_INFO, tts_tag(), "[INFO] ttse_terminate() is already invoked.");
return TTSE_ERROR_NONE;
int ttse_get_speed_range(int* min, int* normal, int* max)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
if (NULL == min || NULL == normal || NULL == max) {
SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is null");
return TTSE_ERROR_INVALID_PARAMETER;
int ttse_get_pitch_range(int* min, int* normal, int* max)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
if (NULL == min || NULL == normal || NULL == max) {
SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is null");
return TTSE_ERROR_INVALID_PARAMETER;
int ttse_send_result(ttse_result_event_e event, const void* data, unsigned int data_size, ttse_audio_type_e audio_type, int rate, void* user_data)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
int ret;
if (NULL == data) {
int ttse_send_error(ttse_error_e error, const char* msg)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
int ret;
ret = ttsd_send_error(error, msg);
int ttse_set_private_data_set_cb(ttse_private_data_set_cb callback_func)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
if (NULL == callback_func) {
SLOG(LOG_ERROR, tts_tag(), "[ERROR] Invalid parameter");
return TTSE_ERROR_INVALID_PARAMETER;
int ttse_set_private_data_requested_cb(ttse_private_data_requested_cb callback_func)
{
+ if (false == is_feature_enabled()) {
+ return TTSE_ERROR_NOT_SUPPORTED;
+ }
+
if (NULL == callback_func) {
SLOG(LOG_ERROR, tts_tag(), "[ERROR] Invalid parameter");
return TTSE_ERROR_INVALID_PARAMETER;
int ttse_get_activated_mode(int* activated_mode)
{
- if (false == __is_feature_enabled()) {
+ if (false == is_feature_enabled()) {
return TTSE_ERROR_NOT_SUPPORTED;
}
int ttse_set_activated_mode_changed_cb(ttse_activated_mode_changed_cb callback)
{
- if (false == __is_feature_enabled()) {
+ if (false == is_feature_enabled()) {
return TTSE_ERROR_NOT_SUPPORTED;
}