aboutsummaryrefslogtreecommitdiffstats
path: root/src/expressions.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-21 13:39:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-21 13:39:39 +0100
commit5f25b69c03972b0adff6bc649e1922111d0ebb2b (patch)
tree62fb361ba8eab64f59a1874e5d045d404727ae4e /src/expressions.h
parentbc997b7b94a36103a3d409d0de422a71df0a19d6 (diff)
downloadrspamd-5f25b69c03972b0adff6bc649e1922111d0ebb2b.tar.gz
rspamd-5f25b69c03972b0adff6bc649e1922111d0ebb2b.zip
Refactor worker task structure and API.
Diffstat (limited to 'src/expressions.h')
-rw-r--r--src/expressions.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/expressions.h b/src/expressions.h
index 526af8686..954cc74f7 100644
--- a/src/expressions.h
+++ b/src/expressions.h
@@ -9,7 +9,7 @@
#include "config.h"
#include <lua.h>
-struct worker_task;
+struct rspamd_task;
struct rspamd_regexp;
/**
@@ -51,7 +51,7 @@ struct expression {
struct expression *next; /**< chain link */
};
-typedef gboolean (*rspamd_internal_func_t)(struct worker_task *, GList *args, void *user_data);
+typedef gboolean (*rspamd_internal_func_t)(struct rspamd_task *, GList *args, void *user_data);
/**
* Parse regexp line to regexp structure
@@ -76,7 +76,7 @@ struct expression* parse_expression (rspamd_mempool_t *pool, gchar *line);
* @param L lua specific state
* @return TRUE or FALSE depending on function result
*/
-gboolean call_expression_function (struct expression_function *func, struct worker_task *task, lua_State *L);
+gboolean call_expression_function (struct expression_function *func, struct rspamd_task *task, lua_State *L);
/**
* Register specified function to rspamd internal functions list
@@ -111,7 +111,7 @@ void re_cache_del (const gchar *line, rspamd_mempool_t *pool);
* @param pointer regexp data
* @param result numeric result of this regexp
*/
-void task_cache_add (struct worker_task *task, struct rspamd_regexp *re, gint32 result);
+void task_cache_add (struct rspamd_task *task, struct rspamd_regexp *re, gint32 result);
/**
* Check regexp in cache
@@ -119,7 +119,7 @@ void task_cache_add (struct worker_task *task, struct rspamd_regexp *re, gint32
* @param pointer regexp data
* @return numeric result if value exists or -1 if not
*/
-gint32 task_cache_check (struct worker_task *task, struct rspamd_regexp *re);
+gint32 task_cache_check (struct rspamd_task *task, struct rspamd_regexp *re);
/**
* Parse and return a single function argument for a function (may recurse)
@@ -128,6 +128,6 @@ gint32 task_cache_check (struct worker_task *task, struct rspamd_regexp *re);
* @param want_string return NULL if argument is not a string
* @return expression argument structure or NULL if failed
*/
-struct expression_argument *get_function_arg (struct expression *expr, struct worker_task *task, gboolean want_string);
+struct expression_argument *get_function_arg (struct expression *expr, struct rspamd_task *task, gboolean want_string);
#endif