2 * Copyright (c) 2012, 2013 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.
15 #ifndef __TTSD_MAIN_H_
16 #define __TTSD_MAIN_H_
27 /* For multi-user support */
28 #include <tzplatform_config.h>
37 /* TTS Daemon Define */
38 #define BASE_DIRECTORY_DEFAULT "/usr/lib/voice/tts/1.0"
39 #define ENGINE_DIRECTORY_DEFAULT "/usr/lib/voice/tts/1.0/engine"
40 #define ENGINE_DIRECTORY_DEFAULT_SETTING "/usr/lib/voice/tts/1.0/setting"
42 #define CONFIG_DIRECTORY tzplatform_mkpath(TZ_USER_HOME, ".voice")
44 #define ENGINE_DIRECTORY_DOWNLOAD tzplatform_mkpath(TZ_USER_HOME, ".voice/tts/1.0/engine")
45 #define ENGINE_DIRECTORY_DOWNLOAD_SETTING tzplatform_mkpath(TZ_USER_HOME, ".voice/tts/1.0/setting")
47 #define CONFIG_DEFAULT BASE_DIRECTORY_DEFAULT"/ttsd.conf"
48 #define DEFAULT_CONFIG_FILE_NAME tzplatform_mkpath(TZ_USER_HOME, ".voice/ttsd_default.conf")
50 /* for debug message */
54 TTSD_ERROR_NONE = 0, /**< Successful */
55 TTSD_ERROR_OUT_OF_MEMORY = -ENOMEM, /**< Out of Memory */
56 TTSD_ERROR_IO_ERROR = -EIO, /**< I/O error */
57 TTSD_ERROR_INVALID_PARAMETER = -EINVAL, /**< Invalid parameter */
58 TTSD_ERROR_OUT_OF_NETWORK = -ENETDOWN, /**< Out of network */
59 TTSD_ERROR_INVALID_STATE = -0x0100000 | 0x21, /**< Invalid state */
60 TTSD_ERROR_INVALID_VOICE = -0x0100000 | 0x22, /**< Invalid voice */
61 TTSD_ERROR_ENGINE_NOT_FOUND = -0x0100000 | 0x23, /**< No available engine */
62 TTSD_ERROR_TIMED_OUT = -0x0100000 | 0x24, /**< No answer from the daemon */
63 TTSD_ERROR_OPERATION_FAILED = -0x0100000 | 0x25, /**< Operation failed */
64 TTSD_ERROR_AUDIO_POLICY_BLOCKED = -0x0100000 | 0x26 /**< Audio policy blocked */
68 TTSD_MODE_DEFAULT = 0, /**< Default mode for normal application */
69 TTSD_MODE_NOTIFICATION, /**< Notification mode */
70 TTSD_MODE_SCREEN_READER /**< Screen reader mode */
74 TTSD_INTERRUPTED_PAUSED = 0, /**< Current state change 'Pause' */
75 TTSD_INTERRUPTED_STOPPED /**< Current state change 'Ready' */
76 }ttsd_interrupted_code_e;
87 ttsp_voice_type_e type;
95 /* get daemon mode : default, notification or screen reader */
96 ttsd_mode_e ttsd_get_mode();
98 /* Get log tag : default, notification, screen reader */
105 #endif /* __TTSD_MAIN_H_ */