]> jfr.im git - irc/rqf/shadowircd.git/blob - libratbox/include/rb_event.h
2da9cf3356832b8fc7b85e0ee37936c2fd5a5730
[irc/rqf/shadowircd.git] / libratbox / include / rb_event.h
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 *
24 * $Id: rb_event.h 25151 2008-03-28 17:19:12Z androsyn $
25 */
26
27 #ifndef RB_LIB_H
28 # error "Do not use event.h directly"
29 #endif
30
31 #ifndef INCLUDED_event_h
32 #define INCLUDED_event_h
33
34 struct ev_entry;
35 typedef void EVH(void *);
36
37 struct ev_entry *rb_event_add(const char *name, EVH * func, void *arg, time_t when);
38 struct ev_entry *rb_event_addonce(const char *name, EVH * func, void *arg, time_t when);
39 struct ev_entry *rb_event_addish(const char *name, EVH * func, void *arg, time_t delta_ish);
40 void rb_event_run(void);
41 void rb_event_init(void);
42 void rb_event_delete(struct ev_entry *);
43 void rb_event_find_delete(EVH * func, void *);
44 void rb_event_update(struct ev_entry *, time_t freq);
45 void rb_set_back_events(time_t);
46 void rb_dump_events(void (*func)(char *, void *), void *ptr);
47 void rb_run_event(struct ev_entry *);
48 time_t rb_event_next(void);
49
50 #endif /* INCLUDED_event_h */