aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/google-ced/ced_c.h
blob: c086f0ca10e498e03d0a8237e68cc883a1d36b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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