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