ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/event.h
Revision: 1.1
Committed: Thu Jul 19 08:24:50 2007 UTC (16 years, 10 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Log Message:
initial import. the most important changes since Atheme are:
- fixed many memory leaks
- fixed many bugs
- converted to C++ and use more STL containers
- added a (not very enhanced yet) perl module
- greatly improved XML-RPC speed
- added a JSON-RPC module with code from json-cpp
- added a valgrind memcheck module to operserv
- added a more object oriented base64 implementation
- added a specialised unit test framework
- improved stability
- use gettimeofday() if available
- reworked adding/removing commands
- MemoServ IGNORE DEL can now remove indices

File Contents

# User Rev Content
1 pippijn 1.1 /*
2     * Copyright © 2005 atheme.org.
3     * Rights to this code are as documented in doc/LICENSE.
4     *
5     * Event stuff.
6     *
7     * $Id: event.h 7271 2006-11-25 00:08:57Z jilles $
8     */
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