]>
jfr.im git - solanum.git/blob - libratbox/include/rb_helper.h
2 * ircd-ratbox: A slightly useful ircd
3 * helper.h: Starts and deals with ircd helpers
5 * Copyright (C) 2006 Aaron Sethman <androsyn@ratbox.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
22 * $Id: rb_helper.h 24936 2008-01-14 20:43:23Z androsyn $
26 # error "Do not use helper.h directly"
29 #ifndef INCLUDED_helper_h
30 #define INCLUDED_helper_h
33 typedef struct _rb_helper rb_helper
;
35 typedef void rb_helper_cb(rb_helper
*);
39 rb_helper
*rb_helper_start(const char *name
, const char *fullpath
, rb_helper_cb
*read_cb
, rb_helper_cb
*error_cb
);
41 rb_helper
*rb_helper_child(rb_helper_cb
*read_cb
, rb_helper_cb
*error_cb
,
42 log_cb
*ilog
, restart_cb
*irestart
, die_cb
*idie
,
43 int maxcon
, size_t lb_heap_size
, size_t dh_size
, size_t fd_heap_size
);
45 void rb_helper_restart(rb_helper
*helper
);
47 void rb_helper_write(rb_helper
*helper
, const char *format
, ...) __attribute((format(printf
, 2, 3)));
48 void rb_helper_write_queue(rb_helper
*helper
, const char *format
, ...) __attribute((format(printf
, 2, 3)));
50 void rb_helper_write(rb_helper
*helper
, const char *format
, ...);
51 void rb_helper_write_queue(rb_helper
*helper
, const char *format
, ...);
53 void rb_helper_write_flush(rb_helper
*helper
);
55 void rb_helper_run(rb_helper
*helper
);
56 void rb_helper_close(rb_helper
*helper
);
57 int rb_helper_read(rb_helper
*helper
, void *buf
, size_t bufsize
);
58 void rb_helper_loop(rb_helper
*helper
, long delay
);