diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-06-29 19:32:31 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-06-29 19:32:31 +0400 |
commit | 025f2000d515244e085cd82ac089d7f0271fc531 (patch) | |
tree | 1ce03cdd34717418194aaf5fdee6584ad241cc1c /src/view.h | |
parent | 21a2da8ea3da88fe2e54785189c0a328fcab4a2a (diff) | |
download | rspamd-025f2000d515244e085cd82ac089d7f0271fc531.tar.gz rspamd-025f2000d515244e085cd82ac089d7f0271fc531.zip |
* Add views support (not completely tested yet)
Diffstat (limited to 'src/view.h')
-rw-r--r-- | src/view.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/view.h b/src/view.h new file mode 100644 index 000000000..d27336254 --- /dev/null +++ b/src/view.h @@ -0,0 +1,28 @@ +#ifndef RSPAMD_VIEW_H +#define RSPAMD_VIEW_H + +#include "config.h" +#include "main.h" +#include "radix.h" + +struct rspamd_view { + GList *from_re_list; + GHashTable *from_hash; + + radix_tree_t *ip_tree; + + GHashTable *symbols_hash; + GList *symbols_re_list; + + memory_pool_t *pool; +}; + +struct rspamd_view* init_view (memory_pool_t *pool); + +gboolean add_view_from (struct rspamd_view *view, char *line); +gboolean add_view_ip (struct rspamd_view *view, char *line); +gboolean add_view_symbols (struct rspamd_view *view, char *line); + +gboolean check_view (GList *views, const char *symbol, struct worker_task *task); + +#endif |