1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef OBJCONF_H
30 #define OBJCONF_H
31
32 #include "conf.h"
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 typedef struct _conf_object {
39 ConfigLine *begin;
40 ConfigLine *end;
41
42 sstr_t name;
43 sstr_t ppath;
44
45 UcxList *directives[
7];
46 } ConfigObject;
47
48
49
50
51 typedef struct _conf_parser_level {
52 ConfigTag *iftag;
53 ConfigTag *tag;
54 int levelnum;
55 } ConfigParserLevel;
56
57 typedef struct _obj_conf {
58 ConfigParser parser;
59 char *file;
60
61 UcxList *conditions;
62 UcxList *objects;
63
64
65 ConfigObject *obj;
66
67 UcxList *levels;
68
69 } ObjectConfig;
70
71 ObjectConfig *load_object_config(
char *file);
72
73 void free_object_config(ObjectConfig *conf);
74
75 int objconf_parse(
void *p, ConfigLine *begin, ConfigLine *end,
sstr_t line);
76
77 int objconf_on_begin_tag(ObjectConfig *conf, ConfigTag *tag);
78
79 int objconf_on_end_tag(ObjectConfig *conf,
sstr_t tagname);
80
81 int objconf_on_directive(ObjectConfig *conf, ConfigDirective *dir);
82
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif
89
90