ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/servtree.h
Revision: 1.1
Committed: Thu Jul 19 08:24:50 2007 UTC (19 years, 2 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 William Pitcock, et al.
3     * Rights to this code are as documented in doc/LICENSE.
4     *
5     * Headers for service selection tree.
6     *
7     * $Id: servtree.h 7779 2007-03-03 13:55:42Z pippijn $
8     */
9    
10     #ifndef SERVTREE_H
11     #define SERVTREE_H
12    
13     #include <commandtree.h>
14    
15     struct service_t
16     {
17     char *name;
18     char *user;
19     char *host;
20     char *real;
21     char *disp;
22     char *uid;
23    
24     user_t *me;
25    
26     void (*handler) (sourceinfo_t *, int, char **);
27     void (*notice_handler) (sourceinfo_t *, int, char **);
28    
29     cmdvec *cmdtree;
30     };
31    
32     E void servtree_init (void);
33     E service_t *add_service (char *name, char *user, char *host, char *real, void (*handler) (sourceinfo_t *si, int parc, char *parv[]), cmdvec &cmdtree = null_cmdvec);
34     E void del_service (service_t *sptr);
35     E service_t *find_service (char *name);
36     E char *service_name (char *name);
37    
38     #endif