1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 
5 #ifndef __UVOICE_MESSAGE_H__
6 #define __UVOICE_MESSAGE_H__
7 
8 
9 typedef struct {
10 	char *filename;
11 	int id;
12 	int qid;
13 	int recv_waiting;
14 	os_sem_t recv_sem;
15 	os_mutex_t lock;
16 } uvoice_msgqueue_t;
17 
18 int uvoice_msgqueue_recv(uvoice_msgqueue_t *msgqueue, int type, void *msg, int size, int timeout);
19 int uvoice_msgqueue_send(uvoice_msgqueue_t *msgqueue, void *msg, int size, int block);
20 uvoice_msgqueue_t *uvoice_msgqueue_create(char *filename, int id);
21 int uvoice_msgqueue_release(uvoice_msgqueue_t *msgqueue);
22 
23 
24 #endif /* __UVOICE_MESSAGE_H__ */
25