/*
-* Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
+* Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
#include <dlog.h>
#include <errno.h>
-#include "ttsp.h"
+#include "ttse.h"
#include "tts_defs.h"
#ifdef __cplusplus
#endif
/* for debug message */
-#define DATA_DEBUG
#define ENGINE_AGENT_DEBUG
typedef enum {
TTSD_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_TTS | 0x03, /**< No available engine */
TTSD_ERROR_OPERATION_FAILED = TIZEN_ERROR_TTS | 0x04, /**< Operation failed */
TTSD_ERROR_AUDIO_POLICY_BLOCKED = TIZEN_ERROR_TTS | 0x05, /**< Audio policy blocked */
- TTSD_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_TTS | 0x06 /**< Not supported feature of current engine*/
+ TTSD_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_TTS | 0x06, /**< Not supported feature of current engine*/
+ TTSD_ERROR_SERVICE_RESET = TIZEN_ERROR_TTS | 0x07 /**< Service reset */
} ttsd_error_e;
typedef enum {
TTSD_MODE_DEFAULT = 0, /**< Default mode for normal application */
TTSD_MODE_NOTIFICATION, /**< Notification mode */
- TTSD_MODE_SCREEN_READER /**< Screen reader mode */
+ TTSD_MODE_SCREEN_READER, /**< Screen reader mode */
+ TTSD_MODE_INTERRUPT /**< Interrupt mode */
} ttsd_mode_e;
typedef enum {
+ TTSD_PLAYING_MODE_BY_SERVICE = 0, /**< Mode for TTS playing on TTS service */
+ TTSD_PLAYING_MODE_BY_CLIENT = 1, /**< Mode for TTS playing on TTS client */
+} ttsd_playing_mode_e;
+
+typedef enum {
TTSD_INTERRUPTED_PAUSED = 0, /**< Current state change 'Pause' */
TTSD_INTERRUPTED_STOPPED /**< Current state change 'Ready' */
} ttsd_interrupted_code_e;
+typedef enum {
+ TTSD_STATE_INVALID = -1,
+ TTSD_STATE_READY = 0, /**< 'Idle' state */
+ TTSD_STATE_SYNTHESIZING = 1, /**< 'Synthesizing' state */
+ TTSD_STATE_PLAYING = 2 /**< 'Playing' state */
+} ttsd_state_e;
+
typedef struct {
char* engine_id;
char* engine_name;
typedef struct {
char* language;
+ char* ptts_id;
int type;
} voice_s;
-/* get daemon mode : default, notification or screen reader */
-ttsd_mode_e ttsd_get_mode();
+typedef struct {
+ int version;
+
+ ttse_get_info_cb get_info;
+
+ ttse_initialize_cb initialize;
+ ttse_deinitialize_cb deinitialize;
+
+ ttse_foreach_supported_voices_cb foreach_voices;
+ ttse_is_valid_voice_cb is_valid_voice;
+ ttse_set_pitch_cb set_pitch;
+
+ ttse_load_voice_cb load_voice;
+ ttse_unload_voice_cb unload_voice;
+
+ ttse_start_synthesis_cb start_synth;
+ ttse_cancel_synthesis_cb cancel_synth;
+
+ ttse_check_app_agreed_cb check_app_agreed;
+ ttse_need_app_credential_cb need_app_credential;
+ 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;
+} tts_engine_callback_s;
+
/* Get log tag : default, notification, screen reader */
-const char* get_tag();
+//const char* get_tag();
+const char* tts_tag();
#ifdef __cplusplus
}