tizen beta release
[platform/core/uifw/stt.git] / server / sttd_server.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 __STTD_SERVER_H_
16 #define __STTD_SERVER_H_
17
18 #include "sttd_main.h"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24
25 /** Daemon initialize */
26 int sttd_initialize();
27
28 /*
29 * API for client
30 */
31
32 int sttd_server_initialize(int pid, int uid);
33
34 int sttd_server_finalize(const int uid);
35
36 int sttd_server_get_supported_languages(const int uid, GList** lang_list);
37
38 int sttd_server_get_current_langauage(const int uid, char** current_lang);
39
40 int sttd_server_set_engine_data(int uid, const char* key, const char* value);
41
42 int sttd_server_is_partial_result_supported(int uid, int* partial_result);
43
44 int sttd_server_get_audio_volume(const int uid, float* current_volume);
45
46 int sttd_server_start(const int uid, const char* lang, const char* recognition_type, 
47                         int profanity, int punctuation, int silence);
48
49 int sttd_server_stop(const int uid);
50
51 int sttd_server_cancel(const int uid);
52
53 /*
54 * API for setting
55 */
56
57 int sttd_server_setting_initialize(int uid);
58
59 int sttd_server_setting_finalize(int uid);
60
61 int sttd_server_setting_get_engine_list(int uid, GList** engine_list);
62
63 int sttd_server_setting_get_engine(int uid, char** engine_id);
64
65 int sttd_server_setting_set_engine(const int uid, const char* engine_id);
66
67 int sttd_server_setting_get_lang_list(int uid, char** engine_id, GList** lang_list);
68
69 int sttd_server_setting_get_default_language(int uid, char** language);
70
71 int sttd_server_setting_set_default_language(int uid, const char* language);
72
73 int sttd_server_setting_get_profanity_filter(int uid, bool* value);
74
75 int sttd_server_setting_set_profanity_filter(int uid, bool value);
76
77 int sttd_server_setting_get_punctuation_override(int uid, bool* value);
78
79 int sttd_server_setting_set_punctuation_override(int uid, bool value);
80
81 int sttd_server_setting_get_silence_detection(int uid, bool* value);
82
83 int sttd_server_setting_set_silence_detection(int uid, bool value);
84
85 int sttd_server_setting_get_engine_setting(int uid, char** engine_id, GList** lang_list);
86
87 int sttd_server_setting_set_engine_setting(int uid, const char* key, const char* value);
88
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /* __STTD_SERVER_H_ */