]> jfr.im git - irc/rqf/shadowircd.git/blame - libratbox/include/rb_event.h
Copied libratbox and related stuff from shadowircd upstream.
[irc/rqf/shadowircd.git] / libratbox / include / rb_event.h
CommitLineData
b57f37fb
WP
1/*
2 * ircd-ratbox: A slightly useful ircd.
3 * event.h: The ircd event header.
4 *
5 * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
6 * Copyright (C) 1996-2002 Hybrid Development Team
7 * Copyright (C) 2002-2005 ircd-ratbox development team
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
22 * USA
23 *
94b4fbf9 24 * $Id: rb_event.h 26092 2008-09-19 15:13:52Z androsyn $
b57f37fb
WP
25 */
26
27#ifndef RB_LIB_H
94b4fbf9 28# error "Do not use event.h directly"
b57f37fb
WP
29#endif
30
31#ifndef INCLUDED_event_h
32#define INCLUDED_event_h
33
34struct ev_entry;
35typedef void EVH(void *);
36
37struct ev_entry *rb_event_add(const char *name, EVH * func, void *arg, time_t when);
38struct ev_entry *rb_event_addonce(const char *name, EVH * func, void *arg, time_t when);
39struct ev_entry *rb_event_addish(const char *name, EVH * func, void *arg, time_t delta_ish);
40void rb_event_run(void);
41void rb_event_init(void);
42void rb_event_delete(struct ev_entry *);
43void rb_event_find_delete(EVH * func, void *);
44void rb_event_update(struct ev_entry *, time_t freq);
45void rb_set_back_events(time_t);
94b4fbf9 46void rb_dump_events(void (*func) (char *, void *), void *ptr);
b57f37fb
WP
47void rb_run_event(struct ev_entry *);
48time_t rb_event_next(void);
49
50#endif /* INCLUDED_event_h */