]>
Commit | Line | Data |
---|---|---|
db137867 AC |
1 | /* |
2 | * ircd-ratbox: A slightly useful ircd. | |
3 | * rawbuf.h: A header for rawbuf.c | |
4 | * | |
5 | * Copyright (C) 2007 Aaron Sethman <androsyn@ratbox.org> | |
6 | * Copyright (C) 2007 ircd-ratbox development team | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2 of the License, or | |
11 | * (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program; if not, write to the Free Software | |
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | |
21 | * USA | |
22 | * | |
db137867 AC |
23 | */ |
24 | ||
25 | #ifndef RB_LIB_H | |
3202e249 | 26 | # error "Do not use rawbuf.h directly" |
db137867 AC |
27 | #endif |
28 | ||
29 | #ifndef INCLUDED_RAWBUF_H__ | |
30 | #define INCLUDED_RAWBUF_H__ | |
31 | ||
32 | ||
33 | ||
34 | typedef struct _rawbuf rawbuf_t; | |
35 | typedef struct _rawbuf_head rawbuf_head_t; | |
36 | ||
37 | void rb_init_rawbuffers(int heapsize); | |
38 | void rb_free_rawbuffer(rawbuf_head_t *); | |
39 | rawbuf_head_t *rb_new_rawbuffer(void); | |
40 | int rb_rawbuf_get(rawbuf_head_t *, void *data, int len); | |
41 | void rb_rawbuf_append(rawbuf_head_t *, void *data, int len); | |
42 | int rb_rawbuf_flush(rawbuf_head_t *, rb_fde_t *F); | |
3202e249 | 43 | int rb_rawbuf_length(rawbuf_head_t * rb); |
db137867 AC |
44 | |
45 | #endif |