summaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_internal.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-08 15:22:05 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-08 15:22:05 +0100
commitc271eb36656a4ff88a9c8c1d59934949260275a3 (patch)
tree3dd586e38b5b37cfebc7c12b6ff6f434904167c7 /src/libstat/stat_internal.h
parentb266445f47dec06392a7e058f499325fa3c052b9 (diff)
downloadrspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.tar.gz
rspamd-c271eb36656a4ff88a9c8c1d59934949260275a3.zip
[Rework] Add C++ guards to all headers
Diffstat (limited to 'src/libstat/stat_internal.h')
-rw-r--r--src/libstat/stat_internal.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/libstat/stat_internal.h b/src/libstat/stat_internal.h
index 50dbae9c1..967a3c4d6 100644
--- a/src/libstat/stat_internal.h
+++ b/src/libstat/stat_internal.h
@@ -24,6 +24,10 @@
#include "backends/backends.h"
#include "learn_cache/learn_cache.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct rspamd_statfile_runtime {
struct rspamd_statfile_config *st;
gpointer backend_runtime;
@@ -54,10 +58,11 @@ struct rspamd_statfile {
struct rspamd_stat_async_elt;
-typedef void (*rspamd_stat_async_handler)(struct rspamd_stat_async_elt *elt,
- gpointer ud);
-typedef void (*rspamd_stat_async_cleanup)(struct rspamd_stat_async_elt *elt,
- gpointer ud);
+typedef void (*rspamd_stat_async_handler) (struct rspamd_stat_async_elt *elt,
+ gpointer ud);
+
+typedef void (*rspamd_stat_async_cleanup) (struct rspamd_stat_async_elt *elt,
+ gpointer ud);
struct rspamd_stat_async_elt {
rspamd_stat_async_handler handler;
@@ -102,18 +107,26 @@ typedef enum rspamd_learn_cache_result {
RSPAMD_LEARN_INGORE
} rspamd_learn_t;
-struct rspamd_stat_ctx * rspamd_stat_get_ctx (void);
-struct rspamd_stat_classifier * rspamd_stat_get_classifier (const gchar *name);
-struct rspamd_stat_backend * rspamd_stat_get_backend (const gchar *name);
-struct rspamd_stat_tokenizer * rspamd_stat_get_tokenizer (const gchar *name);
-struct rspamd_stat_cache * rspamd_stat_get_cache (const gchar *name);
-struct rspamd_stat_async_elt* rspamd_stat_ctx_register_async (
+struct rspamd_stat_ctx *rspamd_stat_get_ctx (void);
+
+struct rspamd_stat_classifier *rspamd_stat_get_classifier (const gchar *name);
+
+struct rspamd_stat_backend *rspamd_stat_get_backend (const gchar *name);
+
+struct rspamd_stat_tokenizer *rspamd_stat_get_tokenizer (const gchar *name);
+
+struct rspamd_stat_cache *rspamd_stat_get_cache (const gchar *name);
+
+struct rspamd_stat_async_elt *rspamd_stat_ctx_register_async (
rspamd_stat_async_handler handler, rspamd_stat_async_cleanup cleanup,
gpointer d, gdouble timeout);
-static GQuark rspamd_stat_quark (void)
-{
+static GQuark rspamd_stat_quark (void) {
return g_quark_from_static_string ("rspamd-statistics");
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* STAT_INTERNAL_H_ */