ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/event.h
(Generate patch)

Comparing ermyth/include/event.h (file contents):
Revision 1.2 by pippijn, Sat Jul 21 01:29:07 2007 UTC vs.
Revision 1.3 by pippijn, Tue Aug 28 17:08:06 2007 UTC

1/* 1/*
2 * Copyright © 2005 atheme.org. 2 * Copyright © 2005 atheme.org.
3 * Rights to this code are as documented in doc/pod/license.pod. 3 * Rights to this code are as documented in doc/pod/license.pod.
4 * 4 *
5 * Event stuff. 5 * Event stuff.
6 * 6 *
7 * $Id: event.h,v 1.2 2007/07/21 01:29:07 pippijn Exp $ 7 * $Id: event.h,v 1.3 2007/08/28 17:08:06 pippijn Exp $
8 */ 8 */
9 9
10#ifndef EVENT_H 10#ifndef EVENT_H
11#define EVENT_H 11#define EVENT_H
12 12
13typedef void EVH (void *); 13typedef void EVH (void *);
14 14
15/* event list struct */ 15/* event list struct */
16struct ev_entry 16struct ev_entry : zero_initialised
17{ 17{
18 EVH *func; 18 EVH *func;
19 void *arg; 19 void *arg;
20 const char *name; 20 char const *name;
21 time_t frequency; 21 time_t frequency;
22 time_t when; 22 time_t when;
23 bool active; 23 bool active;
24}; 24};
25 25
26E struct ev_entry event_table[MAX_EVENTS]; 26E struct ev_entry event_table[MAX_EVENTS];
27E const char *last_event_ran; 27E char const *last_event_ran;
28 28
29E unsigned int event_add (const char *name, EVH * func, void *arg, time_t when); 29E unsigned int event_add (char const * const name, EVH * func, void *arg, time_t when);
30E unsigned int event_add_once (const char *name, EVH * func, void *arg, time_t when); 30E unsigned int event_add_once (char const * const name, EVH * func, void *arg, time_t when);
31E void event_run (void); 31E void event_run (void);
32E time_t event_next_time (void); 32E time_t event_next_time (void);
33E void event_delete (EVH * func, void *arg); 33E void event_delete (EVH * func, void *arg);
34E unsigned int event_find (EVH * func, void *arg); 34E unsigned int event_find (EVH * func, void *arg);
35 35

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines