blob: 7f0b33d3b3499cb6d87f63bf01855c86699e2601 [file] [log] [blame]
Benny Prijono4766ffe2005-11-01 17:56:59 +00001/* $Id$
2 *
3 */
Benny Prijonodd859a62005-11-01 16:42:51 +00004
5#ifndef __PJ_FIFOBUF_H__
6#define __PJ_FIFOBUF_H__
7
8#include <pj/types.h>
9
10PJ_BEGIN_DECL
11
12typedef struct pj_fifobuf_t pj_fifobuf_t;
13struct pj_fifobuf_t
14{
15 char *first, *last;
16 char *ubegin, *uend;
17 int full;
18};
19
20PJ_DECL(void) pj_fifobuf_init (pj_fifobuf_t *fb, void *buffer, unsigned size);
21PJ_DECL(unsigned) pj_fifobuf_max_size (pj_fifobuf_t *fb);
22PJ_DECL(void*) pj_fifobuf_alloc (pj_fifobuf_t *fb, unsigned size);
23PJ_DECL(pj_status_t) pj_fifobuf_unalloc (pj_fifobuf_t *fb, void *buf);
24PJ_DECL(pj_status_t) pj_fifobuf_free (pj_fifobuf_t *fb, void *buf);
25
26PJ_END_DECL
27
28#endif /* __PJ_FIFOBUF_H__ */
29