summaryrefslogtreecommitdiffstats
path: root/src/cfg_xml.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-12-15 22:10:42 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-12-15 22:10:42 +0300
commit0bb8eff9b54d2bba798012137bd3785c3277c401 (patch)
tree4cb1e38d7ecc28ae1326706dab0629ad924178b2 /src/cfg_xml.h
parentea03e94d0a79c2f0f35e05bd6c9d44bf995a3e5b (diff)
downloadrspamd-0bb8eff9b54d2bba798012137bd3785c3277c401.tar.gz
rspamd-0bb8eff9b54d2bba798012137bd3785c3277c401.zip
* Implement ability to add conditional rules to rspamd.xml
Diffstat (limited to 'src/cfg_xml.h')
-rw-r--r--src/cfg_xml.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/cfg_xml.h b/src/cfg_xml.h
index db3dd9e8f..2abdf650b 100644
--- a/src/cfg_xml.h
+++ b/src/cfg_xml.h
@@ -24,6 +24,7 @@ enum xml_read_state {
XML_READ_VIEW,
XML_READ_LOGGING,
XML_READ_VALUE,
+ XML_SKIP_ELEMENTS,
XML_ERROR,
XML_END
};
@@ -39,13 +40,17 @@ enum module_opt_type {
MODULE_OPT_TYPE_ANY
};
+/**
+ * Structure that is used for semantic resolution of configuration
+ */
struct rspamd_xml_userdata {
- enum xml_read_state state;
- struct config_file *cfg;
- gchar section_name[MAX_NAME];
- gpointer section_pointer;
- gpointer parent_pointer;
- GHashTable *cur_attrs;
+ enum xml_read_state state; /*< state of parser */
+ struct config_file *cfg; /*< configuration object */
+ gchar section_name[MAX_NAME]; /*< current section */
+ gpointer section_pointer; /*< pointer to object related with section */
+ gpointer parent_pointer; /*< parent's section object */
+ GHashTable *cur_attrs; /*< attributes of current tag */
+ GQueue *if_stack; /*< stack of if elements */
};
/* Text is NULL terminated here */