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