3f517d65a2e834e8fc0ba264818a1df90f300611
[platform/core/uifw/tts.git] / common / tts_defs.h
1 /*
2 *  Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved 
3 *  Licensed under the Apache License, Version 2.0 (the "License");
4 *  you may not use this file except in compliance with the License.
5 *  You may obtain a copy of the License at
6 *  http://www.apache.org/licenses/LICENSE-2.0
7 *  Unless required by applicable law or agreed to in writing, software
8 *  distributed under the License is distributed on an "AS IS" BASIS,
9 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 *  See the License for the specific language governing permissions and
11 *  limitations under the License.
12 */
13
14
15 #ifndef _TTS_DEFS_H__
16 #define _TTS_DEFS_H__
17
18 /* For multi-user support */
19 #include <tzplatform_config.h>
20 #include <vconf.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /******************************************************************************************
27 * Definition for IPC
28 *******************************************************************************************/
29
30 #define TTS_CLIENT_SERVICE_NAME         "org.tizen.tts"
31 #define TTS_CLIENT_SERVICE_OBJECT_PATH  "/org/tizen/tts"
32 #define TTS_CLIENT_SERVICE_INTERFACE    "org.tizen.tts"
33
34 #define TTS_SERVER_SERVICE_NAME         "org.tizen.voice.ttsserver"
35 #define TTS_SERVER_SERVICE_OBJECT_PATH  "/org/tizen/voice/ttsserver"
36 #define TTS_SERVER_SERVICE_INTERFACE    "org.tizen.voice.ttsserver"
37
38 #define TTS_NOTI_SERVER_SERVICE_NAME            "org.tizen.voice.ttsnotiserver"
39 #define TTS_NOTI_SERVER_SERVICE_OBJECT_PATH     "/org/tizen/voice/ttsnotiserver"
40 #define TTS_NOTI_SERVER_SERVICE_INTERFACE       "org.tizen.voice.ttsnotiserver"
41
42 #define TTS_SR_SERVER_SERVICE_NAME              "org.tizen.voice.ttssrserver"
43 #define TTS_SR_SERVER_SERVICE_OBJECT_PATH       "/org/tizen/voice/ttssrserver"
44 #define TTS_SR_SERVER_SERVICE_INTERFACE         "org.tizen.voice.ttssrserver"
45
46 /******************************************************************************************
47 * Message Definition for APIs
48 *******************************************************************************************/
49
50 #define TTS_METHOD_HELLO                "tts_method_hello"
51 #define TTS_METHOD_INITIALIZE           "tts_method_initialize"
52 #define TTS_METHOD_FINALIZE             "tts_method_finalilze"
53 #define TTS_METHOD_GET_SUPPORT_VOICES   "tts_method_get_support_voices"
54 #define TTS_METHOD_GET_CURRENT_VOICE    "tts_method_get_current_voice"
55 #define TTS_METHOD_ADD_QUEUE            "tts_method_add_queue"
56 #define TTS_METHOD_PLAY                 "tts_method_play"
57 #define TTS_METHOD_STOP                 "tts_method_stop"
58 #define TTS_METHOD_PAUSE                "tts_method_pause"
59
60 #define TTSD_METHOD_HELLO               "ttsd_method_hello"
61 #define TTSD_METHOD_UTTERANCE_STARTED   "ttsd_method_utterance_started"
62 #define TTSD_METHOD_UTTERANCE_COMPLETED "ttsd_method_utterance_completed"
63 #define TTSD_METHOD_ERROR               "ttsd_method_error"
64 #define TTSD_METHOD_SET_STATE           "ttsd_method_set_state"
65
66
67 /******************************************************************************************
68 * Defines for configuration
69 *******************************************************************************************/
70
71 #ifdef LIB64
72 #define TTS_USR_BASE                    "/usr/lib64/voice/tts/1.0"
73 #else
74 #define TTS_USR_BASE                    "/usr/lib/voice/tts/1.0"
75 #endif
76 #define TTS_OPT_BASE                    "/opt/usr/data/voice/tts/1.0"
77
78 #define TTS_DEFAULT_CONFIG              TTS_USR_BASE"/tts-config.xml"
79 #define TTS_CONFIG                      tzplatform_mkpath(TZ_USER_HOME, ".voice/tts-config.xml")
80
81 #define MESSAGE_FILE_PATH_ROOT          tzplatform_mkpath(TZ_USER_HOME, ".voice/")
82
83 #define TTS_DEFAULT_ENGINE              TTS_USR_BASE"/engine"
84 #define TTS_DOWNLOAD_ENGINE             TTS_OPT_BASE"/engine"
85
86 #define TTS_DEFAULT_ENGINE_INFO         TTS_USR_BASE"/engine-info"
87 #define TTS_DOWNLOAD_ENGINE_INFO        TTS_OPT_BASE"/engine-info"
88
89 #define TTS_DEFAULT_ENGINE_SETTING      TTS_USR_BASE"/engine-setting"
90 #define TTS_DOWNLOAD_ENGINE_SETTING     TTS_OPT_BASE"/engine-setting"
91
92 #define TTS_BASE_LANGUAGE               "en_US"
93
94 #define TTS_RETRY_COUNT         5
95
96 #define TTS_SPEED_MIN           1
97 #define TTS_SPEED_NORMAL        8
98 #define TTS_SPEED_MAX           15
99
100 #define TTS_PITCH_MIN           1
101 #define TTS_PITCH_NORMAL        8
102 #define TTS_PITCH_MAX           15
103
104 #define TTS_MAX_TEXT_SIZE       2000
105
106 #define TTS_FEATURE_PATH        "tizen.org/feature/speech.synthesis"
107
108 /******************************************************************************************
109 * Defines for vconf key
110 *******************************************************************************************/
111
112 #define TTS_ACCESSIBILITY_KEY           VCONFKEY_SETAPPL_ACCESSIBILITY_TTS
113
114 #define TTS_LANGSET_KEY                 VCONFKEY_LANGSET
115
116
117 #ifdef __cplusplus
118 }
119 #endif
120
121 #endif  /* _TTS_DEFS_H__ */