summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_url.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-21 16:07:40 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-21 16:07:40 +0100
commit4385e1701570617eda31009299817e0b38a90be5 (patch)
treecbaba3cbfe48818de2510def4b71cbc4d4c4ed49 /src/lua/lua_url.h
parent2a7ad799437105f91dfe7e89ba50de655c1d06eb (diff)
downloadrspamd-4385e1701570617eda31009299817e0b38a90be5.tar.gz
rspamd-4385e1701570617eda31009299817e0b38a90be5.zip
[Rework] Further rework of lua urls extraction API
Diffstat (limited to 'src/lua/lua_url.h')
-rw-r--r--src/lua/lua_url.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lua/lua_url.h b/src/lua/lua_url.h
index 57d20f920..0ea2186d8 100644
--- a/src/lua/lua_url.h
+++ b/src/lua/lua_url.h
@@ -26,8 +26,9 @@ struct lua_tree_cb_data {
lua_State *L;
int i;
int metatable_pos;
- gint mask;
- gint need_images;
+ guint flags_mask;
+ guint protocols_mask;
+ gsize max_urls;
gdouble skip_prob;
guint64 xoroshiro_state[4];
};
@@ -41,7 +42,11 @@ void lua_tree_url_callback (gpointer key, gpointer value, gpointer ud);
* @param cbd
* @return
*/
-gboolean lua_url_cbdata_fill (lua_State *L, gint pos, struct lua_tree_cb_data *cbd);
+gboolean lua_url_cbdata_fill (lua_State *L, gint pos,
+ struct lua_tree_cb_data *cbd,
+ guint default_protocols,
+ guint default_flags,
+ gsize max_urls);
/**
* Cleanup url cbdata
@@ -61,8 +66,7 @@ void lua_url_cbdata_dtor (struct lua_tree_cb_data *cbd);
gsize lua_url_adjust_skip_prob (gdouble timestamp,
guchar *digest,
struct lua_tree_cb_data *cb,
- gsize sz,
- gsize max_urls);
+ gsize sz);
#ifdef __cplusplus
}