Fix dbus delay when requesting hello
[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 #include "stte.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26
27 /*
28 * Daemon functions
29 */
30 int sttd_initialize(stte_request_callback_s *callback);
31
32 int sttd_finalize();
33
34 Eina_Bool sttd_cleanup_client(void *data);
35
36 Eina_Bool sttd_get_daemon_exist();
37
38 /*
39 * API for client
40 */
41
42 int sttd_server_initialize(int pid, int uid, bool* silence, bool* credential);
43
44 int sttd_server_finalize(int uid);
45
46 int sttd_server_get_supported_engines(int uid, GSList** engine_list);
47
48 int sttd_server_set_current_engine(int uid, const char* engine_id, bool* silence, bool* credential);
49
50 int sttd_server_get_current_engine(int uid, char** engine_id);
51
52 int sttd_server_check_app_agreed(int uid, const char* appid, bool* available);
53
54 int sttd_server_get_supported_languages(int uid, GSList** lang_list);
55
56 int sttd_server_get_current_langauage(int uid, char** current_lang);
57
58 int sttd_server_set_private_data(int uid, const char* key, const char* data);
59
60 int sttd_server_get_private_data(int uid, const char* key, char** data);
61
62 int sttd_server_set_engine_data(int uid, const char* key, const char* value);
63
64 int sttd_server_is_recognition_type_supported(int uid, const char* type, int* support);
65
66 int sttd_server_set_start_sound(int uid, const char* file);
67
68 int sttd_server_set_stop_sound(int uid, const char* file);
69
70
71 int sttd_server_get_audio_volume(int uid, float* current_volume);
72
73 int sttd_server_start(int uid, const char* lang, const char* recognition_type, int silence, const char* appid, const char* credential);
74
75 int sttd_server_stop(int uid);
76
77 int sttd_server_cancel(int uid);
78
79 int sttd_server_start_file(int uid, const char* lang, const char* recognition_type, int silence, const char* appid, const char* credential, const char* filepath, stte_audio_type_e audio_type, int sample_rate);
80
81 int sttd_server_cancel_file(int uid);
82
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif /* __STTD_SERVER_H_ */