Add new flag variable for checking state
[platform/core/uifw/tts.git] / client / tts_ipc.h
1 /* *  Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
2 *  Licensed under the Apache License, Version 2.0 (the "License");
3 *  you may not use this file except in compliance with the License.
4 *  You may obtain a copy of the License at
5 *  http://www.apache.org/licenses/LICENSE-2.0
6 *  Unless required by applicable law or agreed to in writing, software
7 *  distributed under the License is distributed on an "AS IS" BASIS,
8 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 *  See the License for the specific language governing permissions and
10 *  limitations under the License.
11 */
12
13 #ifndef __TTS_IPC_H_
14 #define __TTS_IPC_H_
15
16 #include "tts_client.h"
17 #include "tts_ipc_method.h"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 int tts_ipc_set_method(tts_ipc_method_e method);
24
25 bool tts_ipc_is_method_set();
26
27 int tts_ipc_open_connection(unsigned int uid);
28
29 int tts_ipc_close_connection(unsigned int uid);
30
31 int tts_ipc_stop_listening(unsigned int uid);
32
33 int tts_ipc_request_hello(unsigned int uid, tts_mode_e mode);
34
35 int tts_ipc_request_hello_sync(unsigned int uid);
36
37 int tts_ipc_request_initialize(unsigned int uid, tts_mode_e mode, bool* credential_needed);
38
39 int tts_ipc_request_finalize(unsigned int uid);
40
41 int tts_ipc_request_add_text(unsigned int uid, const char* text, const char* lang, int vctype, int speed, int uttid, const char* credential);
42
43 int tts_ipc_request_play(unsigned int uid, const char* credential);
44
45 int tts_ipc_request_stop(unsigned int uid);
46
47 int tts_ipc_request_pause(unsigned int uid);
48
49 int tts_ipc_request_set_private_data(unsigned int uid, const char* key, const char* data);
50
51 int tts_ipc_request_get_private_data(unsigned int uid, const char* key, char** data);
52
53 int tts_ipc_request_play_pcm(unsigned int uid);
54
55 int tts_ipc_request_stop_pcm(unsigned int uid);
56
57 int tts_ipc_request_add_pcm(unsigned int uid, int event, const char* data, int data_size, int audio_type, int rate);
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif /* __TTS_IPC_H_ */