summaryrefslogtreecommitdiffstats
path: root/contrib/google-ced/ced_c.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 21:30:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 21:30:40 +0000
commit133a45c109da5310add55824db21af5239951f93 (patch)
treeba6ac4c0a950a0dda56451944315d66409923918 /contrib/google-ced/ced_c.h
parentInitial commit. (diff)
downloadrspamd-133a45c109da5310add55824db21af5239951f93.tar.xz
rspamd-133a45c109da5310add55824db21af5239951f93.zip
Adding upstream version 3.8.1.upstream/3.8.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/google-ced/ced_c.h')
-rw-r--r--contrib/google-ced/ced_c.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/google-ced/ced_c.h b/contrib/google-ced/ced_c.h
new file mode 100644
index 0000000..c086f0c
--- /dev/null
+++ b/contrib/google-ced/ced_c.h
@@ -0,0 +1,32 @@
+#ifndef RSPAMD_CED_C_H
+#define RSPAMD_CED_C_H
+
+#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+enum CedTextCorpusType {
+ CED_WEB_CORPUS,
+ CED_XML_CORPUS,
+ CED_QUERY_CORPUS,
+ CED_EMAIL_CORPUS,
+ CED_NUM_CORPA,
+};
+
+/*
+ * XXX: Rspamd addition: it actually returns Mime format of the encoding
+ */
+const char *ced_encoding_detect (const char *text, int text_length,
+ const char *url_hint,
+ const char *http_charset_hint,
+ const char *meta_charset_hint,
+ const int encoding_hint,
+ enum CedTextCorpusType corpus_type,
+ bool ignore_7bit_mail_encodings,
+ int *bytes_consumed, bool *is_reliable);
+
+#ifdef __cplusplus
+}
+#endif
+#endif