diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-08 15:22:05 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-08 15:22:05 +0100 |
commit | c271eb36656a4ff88a9c8c1d59934949260275a3 (patch) | |
tree | 3dd586e38b5b37cfebc7c12b6ff6f434904167c7 /src/libutil/map.h | |
parent | b266445f47dec06392a7e058f499325fa3c052b9 (diff) | |
download | rspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.tar.gz rspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.zip |
[Rework] Add C++ guards to all headers
Diffstat (limited to 'src/libutil/map.h')
-rw-r--r-- | src/libutil/map.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/libutil/map.h b/src/libutil/map.h index 9f04d4c6c..9e09ab8fe 100644 --- a/src/libutil/map.h +++ b/src/libutil/map.h @@ -9,26 +9,34 @@ #include "radix.h" #include "dns.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * Maps API is designed to load lists data from different dynamic sources. * It monitor files and HTTP locations for modifications and reload them if they are * modified. */ struct map_cb_data; +struct rspamd_worker; /** * Callback types */ -typedef gchar * (*map_cb_t)(gchar *chunk, gint len, - struct map_cb_data *data, gboolean final); -typedef void (*map_fin_cb_t)(struct map_cb_data *data, void **target); -typedef void (*map_dtor_t)(struct map_cb_data *data); +typedef gchar *(*map_cb_t) (gchar *chunk, gint len, + struct map_cb_data *data, gboolean final); + +typedef void (*map_fin_cb_t) (struct map_cb_data *data, void **target); + +typedef void (*map_dtor_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)(void *data, - rspamd_map_traverse_cb cb, - gpointer cbdata, gboolean reset_hits); +typedef gboolean (*rspamd_map_traverse_cb) (gconstpointer key, + gconstpointer value, gsize hits, gpointer ud); + +typedef void (*rspamd_map_traverse_function) (void *data, + rspamd_map_traverse_cb cb, + gpointer cbdata, gboolean reset_hits); /** * Common map object @@ -56,7 +64,7 @@ gboolean rspamd_map_is_map (const gchar *map_line); /** * Add map from line */ -struct rspamd_map* rspamd_map_add (struct rspamd_config *cfg, +struct rspamd_map *rspamd_map_add (struct rspamd_config *cfg, const gchar *map_line, const gchar *description, map_cb_t read_callback, @@ -67,7 +75,7 @@ struct rspamd_map* rspamd_map_add (struct rspamd_config *cfg, /** * Add map from ucl */ -struct rspamd_map* rspamd_map_add_from_ucl (struct rspamd_config *cfg, +struct rspamd_map *rspamd_map_add_from_ucl (struct rspamd_config *cfg, const ucl_object_t *obj, const gchar *description, map_cb_t read_callback, @@ -111,6 +119,10 @@ rspamd_map_traverse_function rspamd_map_get_traverse_function (struct rspamd_map * @return */ void rspamd_map_traverse (struct rspamd_map *map, rspamd_map_traverse_cb cb, - gpointer cbdata, gboolean reset_hits); + gpointer cbdata, gboolean reset_hits); + +#ifdef __cplusplus +} +#endif #endif |