Remove dependency of openssl
[platform/core/uifw/tts.git] / server / ttsd_main.h
1 /*
2 *  Copyright (c) 2011 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 __TTSD_MAIN_H_
16 #define __TTSD_MAIN_H_
17
18 #include <stdio.h>
19 #include <stdbool.h>
20 #include <stdlib.h>
21 #include <unistd.h>
22 #include <string.h>
23 #include <glib.h>
24 #include <dlog.h>
25 #include <errno.h>
26
27 #include "ttsp.h"
28 #include "tts_defs.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /* TTS Daemon Define */ 
35 #define TAG_TTSD "ttsd"
36
37 #define BASE_DIRECTORY_DEFAULT                  "/usr/lib/voice/tts/1.0"
38 #define ENGINE_DIRECTORY_DEFAULT                "/usr/lib/voice/tts/1.0/engine"
39 #define ENGINE_DIRECTORY_DEFAULT_SETTING        "/usr/lib/voice/tts/1.0/setting"
40
41 #define BASE_DIRECTORY_DOWNLOAD                 "/opt/usr/voice/tts/1.0"
42 #define ENGINE_DIRECTORY_DOWNLOAD               "/opt/usr/voice/tts/1.0/engine"
43 #define ENGINE_DIRECTORY_DOWNLOAD_SETTING       "/opt/usr/voice/tts/1.0/setting"
44
45
46 /* for debug message */
47 #define DATA_DEBUG
48
49 typedef enum {
50         TTSD_ERROR_NONE                 = 0,                    /**< Successful */
51         TTSD_ERROR_OUT_OF_MEMORY        = -ENOMEM,              /**< Out of Memory */
52         TTSD_ERROR_IO_ERROR             = -EIO,                 /**< I/O error */
53         TTSD_ERROR_INVALID_PARAMETER    = -EINVAL,              /**< Invalid parameter */
54         TTSD_ERROR_OUT_OF_NETWORK       = -ENETDOWN,            /**< Out of network */
55         TTSD_ERROR_INVALID_STATE        = -0x0100000 | 0x21,    /**< Invalid state */
56         TTSD_ERROR_INVALID_VOICE        = -0x0100000 | 0x22,    /**< Invalid voice */
57         TTSD_ERROR_ENGINE_NOT_FOUND     = -0x0100000 | 0x23,    /**< No available engine  */
58         TTSD_ERROR_TIMED_OUT            = -0x0100000 | 0x24,    /**< No answer from the daemon */
59         TTSD_ERROR_OPERATION_FAILED     = -0x0100000 | 0x25     /**< Operation failed  */
60 }ttsd_error_e;
61
62
63 typedef enum {
64         TTSD_INTERRUPTED_PAUSED = 0,    /**< Current state change 'Pause' */
65         TTSD_INTERRUPTED_STOPPED        /**< Current state change 'Ready' */
66 }ttsd_interrupted_code_e;
67
68
69 typedef struct {
70         char* engine_id;
71         char* engine_name;
72         char* ug_name;
73 }engine_s;
74
75 typedef struct {
76         char* language;
77         ttsp_voice_type_e type;
78 }voice_s;
79
80 typedef struct {
81         char* key;
82         char* value;
83 }engine_setting_s;
84
85 #ifdef __cplusplus
86 }
87 #endif
88
89 #endif  /* __TTSD_MAIN_H_ */