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-2012 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 27 # error "Do not use rawbuf.h directly" 28 #endif 29 30 #ifndef INCLUDED_RAWBUF_H__ 31 #define INCLUDED_RAWBUF_H__ 32 33 34 35 typedef struct _rawbuf rawbuf_t; 36 typedef struct _rawbuf_head rawbuf_head_t; 37 38 void rb_init_rawbuffers(int heapsize); 39 void rb_free_rawbuffer(rawbuf_head_t *); 40 rawbuf_head_t *rb_new_rawbuffer(void); 41 int rb_rawbuf_get(rawbuf_head_t *, void *data, int len); 42 void rb_rawbuf_append(rawbuf_head_t *, void *data, int len); 43 int rb_rawbuf_flush(rawbuf_head_t *, rb_fde_t *F); 44 int rb_rawbuf_length(rawbuf_head_t * rb); 45 46 #endif 47