diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-26 11:31:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-26 11:31:47 +0100 |
commit | 19b2617fa8e2e8ec7c5181a6a2c97aa7908886c3 (patch) | |
tree | 6d0f43f3cd9ede27eb578562480633e27f042934 /contrib/google-ced/ced_c.h | |
parent | c11838dcbacbfd0a75e98f95a63a026217c88c51 (diff) | |
download | rspamd-19b2617fa8e2e8ec7c5181a6a2c97aa7908886c3.tar.gz rspamd-19b2617fa8e2e8ec7c5181a6a2c97aa7908886c3.zip |
[Rework] Use google-ced instead of libicu chardet as the former sucks
Diffstat (limited to 'contrib/google-ced/ced_c.h')
-rw-r--r-- | contrib/google-ced/ced_c.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/google-ced/ced_c.h b/contrib/google-ced/ced_c.h new file mode 100644 index 000000000..c8cb16a2a --- /dev/null +++ b/contrib/google-ced/ced_c.h @@ -0,0 +1,29 @@ +#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, +}; + +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 |