5330b99b4129a7d1d7b1bd4916d5b4b25ba59151
[platform/core/uifw/stt.git] / client / stt_dbus.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 __STT_DBUS_H_
16 #define __STT_DBUS_H_
17
18 #include "stt.h"
19 #include "stt_main.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 int stt_dbus_open_connection();
26
27 int stt_dbus_close_connection();
28
29
30 int stt_dbus_request_hello();
31
32 int stt_dbus_request_initialize(int uid, bool* silence_supported, bool* credential_needed);
33
34 int stt_dbus_request_finalize(int uid);
35
36 int stt_dbus_request_set_current_engine(int uid, const char* engine_id, bool* silence_supported, bool* credential_needed);
37
38 int stt_dbus_request_check_app_agreed(int uid, const char* appid, bool* value);
39
40 int stt_dbus_request_get_support_langs(int uid, stt_h stt, stt_supported_language_cb callback, void* user_data);
41
42 int stt_dbus_request_get_default_lang(int uid, char** language);
43
44 int stt_dbus_request_set_private_data(int uid, const char* key, const char* data);
45
46 int stt_dbus_request_get_private_data(int uid, const char* key, char** data);
47
48 int stt_dbus_request_is_recognition_type_supported(int uid, const char* type, bool* support);
49
50 int stt_dbus_request_set_start_sound(int uid, const char* file);
51
52 int stt_dbus_request_unset_start_sound(int uid);
53
54 int stt_dbus_request_set_stop_sound(int uid, const char* file);
55
56 int stt_dbus_request_unset_stop_sound(int uid);
57
58
59 int stt_dbus_request_start(int uid, const char* lang, const char* type, int silence, const char* appid, const char* credential);
60
61 int stt_dbus_request_stop(int uid);
62
63 int stt_dbus_request_cancel(int uid);
64
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif /* __STT_DBUS_H_ */