]> jfr.im git - irc/rqf/shadowircd.git/blame - libratbox/include/rb_rawbuf.h
Copied libratbox and related stuff from shadowircd upstream.
[irc/rqf/shadowircd.git] / libratbox / include / rb_rawbuf.h
CommitLineData
b57f37fb
WP
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 *
23 * $Id$
24 */
25
26#ifndef RB_LIB_H
94b4fbf9 27# error "Do not use rawbuf.h directly"
b57f37fb
WP
28#endif
29
30#ifndef INCLUDED_RAWBUF_H__
31#define INCLUDED_RAWBUF_H__
32
33
34
35typedef struct _rawbuf rawbuf_t;
36typedef struct _rawbuf_head rawbuf_head_t;
37
38void rb_init_rawbuffers(int heapsize);
39void rb_free_rawbuffer(rawbuf_head_t *);
40rawbuf_head_t *rb_new_rawbuffer(void);
41int rb_rawbuf_get(rawbuf_head_t *, void *data, int len);
42void rb_rawbuf_append(rawbuf_head_t *, void *data, int len);
43int rb_rawbuf_flush(rawbuf_head_t *, rb_fde_t *F);
94b4fbf9 44int rb_rawbuf_length(rawbuf_head_t * rb);
b57f37fb
WP
45
46#endif