Deallocate memory before setting new value
[platform/core/uifw/voice-control.git] / server / vcd_server_data.h
1 /*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef __VCD_SERVER_DATA_H__
19 #define __VCD_SERVER_DATA_H__
20
21 #include <tizen.h>
22 #include <voice_control_common.h>
23
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #define TAG_VCD     "vcd"       /* VC Daemon log tag */
30
31
32 typedef struct {
33         unsigned int uid;
34         int pid;
35         int     utt_id;
36         char* text;
37         char* language;
38 } vc_tts_text_data_s;
39
40
41 int vcd_data_add_tts_text_data(vc_tts_text_data_s* data);
42
43 int vcd_data_clear_tts_text_data(vc_tts_text_data_s** tts_text_data);
44
45 int vcd_data_get_tts_text_data(unsigned int tts_uid, vc_tts_text_data_s** data);
46
47 int vcd_data_get_first_tts_text_data(vc_tts_text_data_s** data);
48
49 int vcd_data_get_tts_text_data_size();
50
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #endif /* __VCD_SERVER_DATA_H__ */