ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/servtree.h
Revision: 1.3
Committed: Tue Aug 28 17:08:07 2007 UTC (16 years, 9 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.2: +6 -6 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

File Contents

# Content
1 /*
2 * Copyright © 2005 William Pitcock, et al.
3 * Rights to this code are as documented in doc/pod/license.pod.
4 *
5 * Headers for service selection tree.
6 *
7 * $Id: servtree.h,v 1.2 2007-07-21 01:29:07 pippijn Exp $
8 */
9
10 #ifndef SERVTREE_H
11 #define SERVTREE_H
12
13 #include <commandtree.h>
14
15 struct service_t : zero_initialised
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 const * const name, char const * const user, char const * const host, char const * const 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 const * const name);
36 E char *service_name (char const * const name);
37
38 #endif