summaryrefslogtreecommitdiffstats
path: root/src/cfg_file.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-15 17:32:15 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-15 17:32:15 +0300
commitd0681272065a04de5e8249b782ac7f9efa938555 (patch)
tree8c7febde5e93f49e48cd990ca1434fd6adff9c99 /src/cfg_file.h
parent2dd1125642e3fad0390c8477bc1d2084aa59a630 (diff)
downloadrspamd-d0681272065a04de5e8249b782ac7f9efa938555.tar.gz
rspamd-d0681272065a04de5e8249b782ac7f9efa938555.zip
* Add new system of getting and setting config parameters from perl code
Diffstat (limited to 'src/cfg_file.h')
-rw-r--r--src/cfg_file.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h
index 4a2fb824d..bb934134c 100644
--- a/src/cfg_file.h
+++ b/src/cfg_file.h
@@ -106,6 +106,16 @@ struct statfile {
struct classifier *classifier;
};
+struct config_scalar {
+ void *pointer;
+ enum {
+ SCALAR_TYPE_INT,
+ SCALAR_TYPE_UINT,
+ SCALAR_TYPE_STR,
+ SCALAR_TYPE_SIZE,
+ } type;
+};
+
struct config_file {
memory_pool_t *cfg_pool;
char *cfg_name;
@@ -151,13 +161,22 @@ struct config_file {
char *mime_filters_str;
char *message_filters_str;
char *url_filters_str;
+ /* Options for all modules */
GHashTable* modules_opts;
+ /* Variables, defined in config */
GHashTable* variables;
+ /* Metrics */
GHashTable* metrics;
+ /* Factors */
GHashTable* factors;
+ /* C modules, enabled in config */
GHashTable* c_modules;
+ /* Composite symbols */
GHashTable* composite_symbols;
+ /* Statfiles, described in config */
GHashTable* statfiles;
+ /* All cfg file scalars to access fields in structure */
+ GHashTable* cfg_params;
};
int add_memcached_server (struct config_file *cf, char *str);