ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/servtree.h
Revision: 1.5
Committed: Sun Sep 16 18:54:42 2007 UTC (16 years, 8 months ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +9 -4 lines
Log Message:
#defines to enum

File Contents

# Content
1 /**
2 * servtree.h: Headers for service selection tree.
3 *
4 * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
5 * Rights to this code are as documented in COPYING.
6 *
7 *
8 * Portions of this file were derived from sources bearing the following license:
9 * Copyright © 2005 William Pitcock, et al.
10 * Rights to this code are as documented in doc/pod/license.pod.
11 *
12 * $Id: servtree.h,v 1.4 2007-09-05 11:23:13 pippijn Exp $
13 */
14
15 #ifndef SERVTREE_H
16 #define SERVTREE_H
17
18 #include <commandtree.h>
19
20 struct service_t : zero_initialised
21 {
22 char *name;
23 char *user;
24 char *host;
25 char *real;
26 char *disp;
27 char *uid;
28
29 user_t *me;
30
31 void (*handler) (sourceinfo_t *, int, char **);
32 void (*notice_handler) (sourceinfo_t *, int, char **);
33
34 cmdvec *cmdtree;
35
36 bool chanmsg;
37
38 public:
39 void set_chanmsg (bool want_chanmsg)
40 {
41 chanmsg = want_chanmsg;
42 }
43 };
44
45 E void servtree_init (void);
46 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);
47 E void del_service (service_t *sptr);
48 E service_t *find_service (char const * const name);
49 E char *service_name (char const * const name);
50
51 #endif