aboutsummaryrefslogtreecommitdiffstats
path: root/src/filter.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-13 20:54:13 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-13 20:54:13 +0400
commita8cdd33ac7ee59e195dca03a395c264877ee5168 (patch)
tree077413b678005aad4f66dbeae82a982cb71ce75f /src/filter.h
parent74b38eb87d0ee6e401e06d8c604d55be2d93a1b2 (diff)
downloadrspamd-a8cdd33ac7ee59e195dca03a395c264877ee5168.tar.gz
rspamd-a8cdd33ac7ee59e195dca03a395c264877ee5168.zip
* Rework the whole filters system
* Add metrics optimization and symbols cache * Change all plugins [DRAGONS]: not for production usage, some things are still not working!
Diffstat (limited to 'src/filter.h')
-rw-r--r--src/filter.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/filter.h b/src/filter.h
index e0c989f85..56a70fdf7 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -7,6 +7,7 @@
#define RSPAMD_FILTER_H
#include "config.h"
+#include "symbols_cache.h"
struct worker_task;
@@ -19,16 +20,16 @@ enum filter_type { C_FILTER, PERL_FILTER };
* Filter structure
*/
struct filter {
- char *func_name; /**< function name */
- enum filter_type type; /**< filter type (c or perl) */
+ char *func_name; /**< function name */
+ enum filter_type type; /**< filter type (c or perl) */
};
/**
* Rspamd symbol
*/
struct symbol {
- double score; /**< symbol's score */
- GList *options; /**< list of symbol's options */
+ double score; /**< symbol's score */
+ GList *options; /**< list of symbol's options */
};
/**
@@ -40,6 +41,8 @@ struct metric {
metric_cons_func func; /**< c consolidation function */
double required_score; /**< required score for this metric */
struct classifier *classifier; /**< classifier that is used for metric */
+ struct symbols_cache *cache; /**< symbols cache for metric */
+ char *cache_filename; /**< filename of cache file */
};
/**