29 #ifndef INITCONF_H |
29 #ifndef INITCONF_H |
30 #define INITCONF_H |
30 #define INITCONF_H |
31 |
31 |
32 #include "conf.h" |
32 #include "conf.h" |
33 |
33 |
|
34 #include "serverconfig.h" |
|
35 |
34 #ifdef __cplusplus |
36 #ifdef __cplusplus |
35 extern "C" { |
37 extern "C" { |
36 #endif |
38 #endif |
37 |
39 |
38 typedef struct _init_conf { |
40 typedef struct _init_conf { |
39 ConfigParser parser; |
41 CxMempool *mp; |
40 char *file; |
42 ConfigNode *root; |
41 ConfigDirectiveList *directives; |
|
42 } InitConfig; |
43 } InitConfig; |
43 |
44 |
44 InitConfig *load_init_config(char *file); |
45 InitConfig *initconfig_load(const char *file); |
45 |
46 |
46 void free_init_config(InitConfig *conf); |
47 /* |
|
48 * Validates a init.conf directive |
|
49 * |
|
50 * Basic syntax: |
|
51 * |
|
52 * Init fn="<name>" param1="value1" param2="value" |
|
53 */ |
|
54 int initconfig_validate_directive(ConfigParser2 *parser, ConfigNode *node); |
47 |
55 |
48 int initconf_parse(void *p, ConfigLine *begin, ConfigLine *end, cxmutstr line); |
56 void initconfig_free(InitConfig *conf); |
|
57 |
49 |
58 |
50 #ifdef __cplusplus |
59 #ifdef __cplusplus |
51 } |
60 } |
52 #endif |
61 #endif |
53 |
62 |