ec77117ef0db183a1f681f947f4c460cc0809c0a
[platform/core/uifw/stt.git] / server / sttd_server.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 __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 Eina_Bool sttd_get_daemon_exist();
36
37 /*
38 * API for client
39 */
40
41 int sttd_server_initialize(int pid, int uid, bool* silence, bool* credential);
42
43 int sttd_server_finalize(int uid);
44
45 int sttd_server_get_supported_engines(int uid, GSList** engine_list);
46
47 int sttd_server_set_current_engine(int uid, const char* engine_id, bool* silence, bool* credential);
48
49 int sttd_server_get_current_engine(int uid, char** engine_id);
50
51 int sttd_server_check_app_agreed(int uid, const char* appid, bool* available);
52
53 int sttd_server_get_supported_languages(int uid, GSList** lang_list);
54
55 int sttd_server_get_current_langauage(int uid, char** current_lang);
56
57 int sttd_server_set_private_data(int uid, const char* key, const char* data);
58
59 int sttd_server_get_private_data(int uid, const char* key, char** data);
60
61 int sttd_server_set_engine_data(int uid, const char* key, const char* value);
62
63 int sttd_server_is_recognition_type_supported(int uid, const char* type, int* support);
64
65 int sttd_server_set_start_sound(int uid, const char* file);
66
67 int sttd_server_set_stop_sound(int uid, const char* file);
68
69
70 int sttd_server_get_audio_volume(int uid, float* current_volume);
71
72 int sttd_server_start(int uid, const char* lang, const char* recognition_type, int silence, const char* appid, const char* credential);
73
74 int sttd_server_stop(int uid);
75
76 int sttd_server_cancel(int uid);
77
78
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif /* __STTD_SERVER_H_ */