ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/event.h
Revision: 1.2
Committed: Sat Jul 21 01:29:07 2007 UTC (19 years, 1 month ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.1: +2 -2 lines
Log Message:
- moved to new documentation system
- fixed small build error

File Contents

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