Fix dbus delay when requesting hello
[platform/core/uifw/stt.git] / client / stt_file_client.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_FILE_CLIENT_H_
16 #define __STT_FILE_CLIENT_H_
17
18
19 #include "stt_file.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #define TAG_STTFC "sttfile"
26
27 typedef struct {
28         /* callback functions */
29         stt_file_recognition_result_cb  recognition_result_cb;
30         void*                           recognition_result_user_data;
31
32         stt_file_result_time_cb         result_time_cb;
33         void*                           result_time_user_data;
34
35         stt_file_state_changed_cb       state_changed_cb;
36         void*                           state_changed_user_data;
37
38         stt_file_supported_language_cb  supported_lang_cb;
39         void*                           supported_lang_user_data;
40
41         /* current engine */
42         int     current_engine_id;
43
44         /* state */
45         stt_file_state_e        before_state;
46         stt_file_state_e        current_state;
47
48         /* mutex */
49         int     cb_ref_count;
50
51         /* result data */
52         void*   time_info;
53
54         /* error data */
55         int     reason;
56 } stt_file_client_s;
57
58
59 int stt_file_client_new();
60
61 int stt_file_client_destroy();
62
63 stt_file_client_s* stt_file_client_get();
64
65 int stt_file_client_use_callback(stt_file_client_s* client);
66
67 int stt_file_client_not_use_callback(stt_file_client_s* client);
68
69 int stt_file_client_get_use_callback(stt_file_client_s* client);
70
71
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif /* __STT_FILE_CLIENT_H_ */