/[svn]/ircd-hybrid/include/conf/manager.h
ViewVC logotype

Annotation of /ircd-hybrid/include/conf/manager.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 628 - (hide annotations)
Mon May 29 20:04:32 2006 UTC (16 years, 8 months ago) by adx
File MIME type: text/x-csrc
File size: 2698 byte(s)
Added contrib module for character set recoding

Note it doesn't work at the moment because listen{} itself
is not yet modularised.  Will probably also need some modifications
to include iconv headers and libraries in the build process.

1 adx 209 /*
2     * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3     * manager.h: A header for the configuration manager.
4     *
5     * Copyright (C) 2003 by Piotr Nizynski, Advanced IRC Services Project
6     * Copyright (C) 2005 by the Hybrid Development Team.
7     *
8     * This program is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License as published by
10     * the Free Software Foundation; either version 2 of the License, or
11     * (at your option) any later version.
12     *
13     * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17     *
18     * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21     * USA
22     *
23     * $Id$
24     */
25    
26     #define CONF_BUFSIZE 512
27    
28     #define CT_NUMBER 0
29     #define CT_BOOL 1
30     #define CT_TIME 2
31     #define CT_SIZE 3
32     #define CT_STRING 4
33     #define CT_LIST 5
34 adx 366 #define CT_NLIST 6
35 adx 209
36     typedef void CONFS_HANDLER(void);
37     typedef void CONFF_HANDLER(void *, void *);
38    
39     struct ConfParserContext {
40     FBFILE *f;
41     char *filename;
42     int lineno;
43     };
44    
45 adx 420 struct ConfField {
46     const char *name;
47     int type;
48     CONFF_HANDLER *handler;
49     void *param;
50     dlink_node node;
51     };
52    
53 adx 209 struct ConfSection {
54     const char *name;
55     CONFS_HANDLER *before;
56     CONFS_HANDLER *after;
57 adx 420 struct ConfField *def_field;
58 adx 209 int pass;
59     dlink_list fields;
60     dlink_node node;
61     };
62    
63     void init_conf(void);
64     void yyerror(const char *);
65     int yylex(void);
66     int conf_yy_input(char *, int);
67     void conf_clear_ident_list(void);
68    
69     EXTERN int conf_pass, conf_cold;
70     EXTERN struct ConfParserContext conf_curctx;
71     EXTERN char conf_linebuf[];
72     EXTERN int conf_include_sptr;
73     EXTERN struct Callback *reset_conf;
74     EXTERN struct Callback *verify_conf;
75 adx 212 EXTERN struct Callback *switch_conf_pass;
76 adx 209
77     EXTERN void parse_error(const char *, ...);
78     EXTERN void parse_fatal(const char *, ...);
79     EXTERN struct ConfSection *find_conf_section(const char *);
80     EXTERN struct ConfSection *add_conf_section(const char *, int);
81     EXTERN void delete_conf_section(struct ConfSection *);
82     EXTERN struct ConfField *find_conf_field(struct ConfSection *, char *);
83     EXTERN void conf_assign(int, struct ConfField *, void *);
84     EXTERN CONFF_HANDLER conf_assign_bool;
85     EXTERN CONFF_HANDLER conf_assign_number;
86     EXTERN CONFF_HANDLER conf_assign_string;
87 adx 421 EXTERN struct ConfField *add_conf_field(struct ConfSection *, const char *,
88     int, CONFF_HANDLER *, void *);
89 adx 628 EXTERN void delete_conf_field(struct ConfSection *, struct ConfField *);

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28