Clean a bit - to be continued...
[seven-1.x.git] / libseven / event.h
blob874ba92617aae69c518dd64404929e013a60c202
1 /*
2 * ircd-ratbox: A slightly useful ircd.
3 * event.h: The ircd event header.
5 * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
6 * Copyright (C) 1996-2002 Hybrid Development Team
7 * Copyright (C) 2002-2004 ircd-ratbox development team
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
26 #ifndef INCLUDED_event_h
27 #define INCLUDED_event_h
30 * How many event entries we need to allocate at a time in the block
31 * allocator. 16 should be plenty at a time.
33 #define MAX_EVENTS 50
36 typedef void EVH(void *);
38 /* The list of event processes */
39 struct ev_entry
41 EVH *func;
42 void *arg;
43 const char *name;
44 time_t frequency;
45 time_t when;
46 int active;
49 extern void eventAdd(const char *name, EVH * func, void *arg, time_t when);
50 extern void eventAddOnce(const char *name, EVH * func, void *arg, time_t when);
51 extern void eventAddIsh(const char *name, EVH * func, void *arg, time_t delta_ish);
52 extern void eventRun(void);
53 extern time_t eventNextTime(void);
54 extern void eventInit(void);
55 extern void eventDelete(EVH * func, void *);
56 extern int eventFind(EVH * func, void *);
57 extern void set_back_events(time_t);
59 void eventUpdate(const char *name, time_t freq);
61 extern void show_events(struct Client *source_p);
63 #endif /* INCLUDED_event_h */