Clear data when AUDIO_POLICY_BLOCKED is occurred
[platform/core/uifw/tts.git] / server / ttsd_config.h
1 /*
2 *  Copyright (c) 2011-2016 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_CONFIG_H_
16 #define __TTSD_CONFIG_H_
17
18 #include <stdbool.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 typedef enum {
25         TTS_CONFIG_TYPE_ENGINE,
26         TTS_CONFIG_TYPE_VOICE,
27         TTS_CONFIG_TYPE_SPEED,
28         TTS_CONFIG_TYPE_PITCH
29 } tts_config_type_e;
30
31 typedef void (*ttsd_config_changed_cb)(tts_config_type_e type, const char* str_param, int int_param);
32
33 typedef void (*ttsd_config_screen_reader_changed_cb)(bool value);
34
35 int ttsd_config_initialize(ttsd_config_changed_cb config_cb);
36
37 int ttsd_config_finalize();
38
39 int ttsd_config_set_screen_reader_callback(ttsd_config_screen_reader_changed_cb sr_cb);
40
41 int ttsd_config_get_default_engine(char** engine_id);
42
43 int ttsd_config_set_default_engine(const char* engine_id);
44
45 int ttsd_config_get_default_voice(char** language, int* type);
46
47 int ttsd_config_get_default_speed(int* speed);
48
49 int ttsd_config_get_default_pitch(int* pitch);
50
51 int ttsd_config_save_error(int uid, int uttid, const char* lang, int vctype, const char* text, 
52                            const char* func, int line, const char* message);
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif /* __TTSD_CONFIG_H_ */