| 60 ConfigTag *tag; // root of this level |
60 ConfigTag *tag; // root of this level |
| 61 int levelnum; |
61 int levelnum; |
| 62 ConfigParserLevel *next; |
62 ConfigParserLevel *next; |
| 63 }; |
63 }; |
| 64 |
64 |
| 65 typedef struct _obj_conf { |
|
| 66 ConfigParser parser; |
|
| 67 char *file; |
|
| 68 //UcxDlist *lines; |
|
| 69 //UcxList *conditions; |
|
| 70 CxList *objects; |
|
| 71 |
65 |
| 72 // private parser temp var |
66 typedef struct ObjectConfig { |
| 73 ConfigObject *obj; // add directives to this object |
67 CxMempool *mp; |
| 74 // private parser temp var |
68 ConfigNode *root; |
| 75 ConfigParserLevel *levels; // tree levels (stack) |
|
| 76 |
|
| 77 } ObjectConfig; |
69 } ObjectConfig; |
| 78 |
70 |
| 79 // TODO: rename to ObjectConfig after old ObjectConfig is removed |
71 ObjectConfig* objectconf_load(const char *file); |
| 80 typedef struct ObjectConfig2 { |
|
| 81 CxMempool *mp; |
|
| 82 ConfigNode *root; |
|
| 83 } ObjectConfig2; |
|
| 84 |
72 |
| 85 ObjectConfig2* objectconf_load(const char *file); |
73 void objectconf_free(ObjectConfig *objconf); |
| 86 |
|
| 87 void objectconf_free(ObjectConfig2 *objconf); |
|
| 88 |
74 |
| 89 int objectconf_validate_directive(ConfigParser2 *parser, ConfigNode *node); |
75 int objectconf_validate_directive(ConfigParser2 *parser, ConfigNode *node); |
| 90 |
76 |
| 91 int objectconf_validate_objbegin(ConfigParser2 *parser, ConfigNode *node); |
77 int objectconf_validate_objbegin(ConfigParser2 *parser, ConfigNode *node); |
| 92 |
78 |
| 93 int objectconf_validate_objend(ConfigParser2 *parser, ConfigNode *node); |
79 int objectconf_validate_objend(ConfigParser2 *parser, ConfigNode *node); |
| 94 |
80 |
| 95 |
|
| 96 void free_object_config(ObjectConfig *conf); |
|
| 97 |
81 |
| 98 |
82 |
| 99 |
83 |
| 100 #ifdef __cplusplus |
84 #ifdef __cplusplus |
| 101 } |
85 } |