return NULL;
}
+
+rspamd_map_traverse_function
+rspamd_map_get_traverse_function (struct rspamd_map *map)
+{
+ if (map) {
+ return map->traverse_function;
+ }
+
+ return NULL;
+}
\ No newline at end of file
struct map_cb_data *data, gboolean final);
typedef void (*map_fin_cb_t)(struct map_cb_data *data);
+typedef gboolean (*rspamd_map_traverse_cb)(gconstpointer key,
+ gconstpointer value, gsize hits, gpointer ud);
+typedef void (*rspamd_map_traverse_function)(rspamd_map_traverse_cb cb,
+ gpointer cbdata, gboolean reset_hits);
+
/**
* Common map object
*/
*/
void rspamd_map_remove_all (struct rspamd_config *cfg);
+/**
+ * Get traverse function for specific map
+ * @param map
+ * @return
+ */
+rspamd_map_traverse_function rspamd_map_get_traverse_function (struct rspamd_map *map);
+
#endif
gchar *name;
guint32 id;
gboolean scheduled_check;
+ rspamd_map_dtor dtor;
+ gpointer dtor_data;
+ rspamd_map_traverse_function traverse_function;
/* Should we check HTTP or just load cached data */
- gboolean active_http;
struct timeval tv;
gdouble poll_timeout;
time_t next_check;
+ gboolean active_http;
/* Shared lock for temporary disabling of map reading (e.g. when this map is written by UI) */
gint *locked;
/* Shared cache data */
struct rspamd_map_cachepoint *cache;
gchar tag[MEMPOOL_UID_LEN];
- rspamd_map_dtor dtor;
- gpointer dtor_data;
};
enum rspamd_map_http_stage {