4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>CamelMimeFilterBestenc</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
7
7
<link rel="home" href="index.html" title="Camel Reference Manual">
8
8
<link rel="up" href="StreamFilters.html" title="Stream Filters">
9
9
<link rel="prev" href="camel-CamelMimeFilterBasic.html" title="CamelMimeFilterBasic">
10
10
<link rel="next" href="camel-CamelMimeFilterCanon.html" title="CamelMimeFilterCanon">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="classes.html" title="Part I. Camel Classes">
14
<link rel="chapter" href="ClassTree.html" title="Class Hierarchy">
15
<link rel="chapter" href="Fundamentals.html" title="Fundamentals">
16
<link rel="chapter" href="Streams.html" title="Streams">
17
<link rel="chapter" href="StreamFilters.html" title="Stream Filters">
18
<link rel="chapter" href="Services.html" title="Services">
19
<link rel="chapter" href="Filters.html" title="Filters">
20
<link rel="chapter" href="Folders.html" title="Folders">
21
<link rel="chapter" href="SearchFolders.html" title="Search Folders">
22
<link rel="chapter" href="Addresses.html" title="Addresses">
23
<link rel="chapter" href="Crypto.html" title="Crypto Contexts">
24
<link rel="chapter" href="MIME.html" title="MIME Objects">
25
<link rel="chapter" href="Storage.html" title="Metadata Storage">
26
<link rel="chapter" href="Utilities.html" title="Utilities">
27
<link rel="chapter" href="Deprecated.html" title="Deprecated Objects">
28
<link rel="index" href="ix01.html" title="Index">
29
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
31
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
32
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
40
23
<tr><td colspan="5" class="shortcuts">
41
24
<a href="#camel-CamelMimeFilterBestenc.synopsis" class="shortcut">Top</a>
43
<a href="#camel-CamelMimeFilterBestenc.description" class="shortcut">Description</a>
26
<a href="#camel-CamelMimeFilterBestenc.description" class="shortcut">Description</a>
46
<div class="refentry" title="CamelMimeFilterBestenc">
29
<div class="refentry" lang="en">
47
30
<a name="camel-CamelMimeFilterBestenc"></a><div class="titlepage"></div>
48
31
<div class="refnamediv"><table width="100%"><tr>
53
36
<td valign="top" align="right"></td>
54
37
</tr></table></div>
55
<div class="refsynopsisdiv" title="Synopsis">
38
<div class="refsynopsisdiv">
56
39
<a name="camel-CamelMimeFilterBestenc.synopsis"></a><h2>Synopsis</h2>
57
<pre class="synopsis">
58
enum <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencRequired" title="enum CamelBestencRequired">CamelBestencRequired</a>;
40
<pre class="synopsis">enum <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencRequired" title="enum CamelBestencRequired">CamelBestencRequired</a>;
59
41
enum <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencEncoding" title="enum CamelBestencEncoding">CamelBestencEncoding</a>;
60
42
struct <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a>;
61
<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> * <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-new" title="camel_mime_filter_bestenc_new ()">camel_mime_filter_bestenc_new</a> (<a
62
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
64
<a class="link" href="camel-camel-mime-utils.html#CamelTransferEncoding" title="enum CamelTransferEncoding">CamelTransferEncoding</a> <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-get-best-encoding" title="camel_mime_filter_bestenc_get_best_encoding ()">camel_mime_filter_bestenc_get_best_encoding</a>
65
(<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> *filter,
66
<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencEncoding" title="enum CamelBestencEncoding">CamelBestencEncoding</a> required);
68
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
69
>gchar</a> * <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-get-best-charset" title="camel_mime_filter_bestenc_get_best_charset ()">camel_mime_filter_bestenc_get_best_charset</a>
70
(<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> *filter);
71
void <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-set-flags" title="camel_mime_filter_bestenc_set_flags ()">camel_mime_filter_bestenc_set_flags</a> (<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> *filter,
73
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
43
<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="returnvalue">CamelMimeFilterBestenc</span></a> * <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-new" title="camel_mime_filter_bestenc_new ()">camel_mime_filter_bestenc_new</a> (<em class="parameter"><code><span class="type">guint</span> flags</code></em>);
44
<a class="link" href="camel-camel-mime-utils.html#CamelTransferEncoding" title="enum CamelTransferEncoding"><span class="returnvalue">CamelTransferEncoding</span></a> <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-get-best-encoding" title="camel_mime_filter_bestenc_get_best_encoding ()">camel_mime_filter_bestenc_get_best_encoding</a>
45
(<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> *filter</code></em>,
46
<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencEncoding" title="enum CamelBestencEncoding"><span class="type">CamelBestencEncoding</span></a> required</code></em>);
47
const <span class="returnvalue">gchar</span> * <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-get-best-charset" title="camel_mime_filter_bestenc_get_best_charset ()">camel_mime_filter_bestenc_get_best_charset</a>
48
(<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> *filter</code></em>);
49
<span class="returnvalue">void</span> <a class="link" href="camel-CamelMimeFilterBestenc.html#camel-mime-filter-bestenc-set-flags" title="camel_mime_filter_bestenc_set_flags ()">camel_mime_filter_bestenc_set_flags</a> (<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> *filter</code></em>,
50
<em class="parameter"><code><span class="type">guint</span> flags</code></em>);
77
<div class="refsect1" title="Description">
53
<div class="refsect1" lang="en">
78
54
<a name="camel-CamelMimeFilterBestenc.description"></a><h2>Description</h2>
82
<div class="refsect1" title="Details">
58
<div class="refsect1" lang="en">
83
59
<a name="camel-CamelMimeFilterBestenc.details"></a><h2>Details</h2>
84
<div class="refsect2" title="enum CamelBestencRequired">
60
<div class="refsect2" lang="en">
85
61
<a name="CamelBestencRequired"></a><h3>enum CamelBestencRequired</h3>
86
62
<pre class="programlisting">typedef enum _CamelBestencRequired {
87
63
CAMEL_BESTENC_GET_ENCODING = 1<<0,
115
<div class="refsect2" title="struct CamelMimeFilterBestenc">
91
<div class="refsect2" lang="en">
116
92
<a name="CamelMimeFilterBestenc"></a><h3>struct CamelMimeFilterBestenc</h3>
117
93
<pre class="programlisting">struct CamelMimeFilterBestenc {
118
94
CamelMimeFilter parent;
120
guint flags; /* our creation flags, see above */
122
guint count0; /* count of NUL characters */
123
guint count8; /* count of 8 bit characters */
124
guint total; /* total characters read */
126
guint lastc; /* the last character read */
127
gint crlfnoorder; /* if crlf's occured where they shouldn't have */
129
gint startofline; /* are we at the start of a new line? */
96
guint flags; /* our creation flags, see above */
98
guint count0; /* count of NUL characters */
99
guint count8; /* count of 8 bit characters */
100
guint total; /* total characters read */
102
guint lastc; /* the last character read */
103
gint crlfnoorder; /* if crlf's occured where they shouldn't have */
105
gint startofline; /* are we at the start of a new line? */
132
gchar fromsave[6]; /* save a few characters if we found an \n near the end of the buffer */
108
gchar fromsave[6]; /* save a few characters if we found an \n near the end of the buffer */
133
109
gint hadfrom; /* did we encounter a "\nFrom " in the data? */
135
guint countline; /* current count of characters on a given line */
136
guint maxline; /* max length of any line */
111
guint countline; /* current count of characters on a given line */
112
guint maxline; /* max length of any line */
138
CamelCharset charset; /* used to determine the best charset to use */
114
CamelCharset charset; /* used to determine the best charset to use */
145
<div class="refsect2" title="camel_mime_filter_bestenc_new ()">
121
<div class="refsect2" lang="en">
146
122
<a name="camel-mime-filter-bestenc-new"></a><h3>camel_mime_filter_bestenc_new ()</h3>
147
<pre class="programlisting"><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> * camel_mime_filter_bestenc_new (<a
148
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
149
>guint</a> flags);</pre>
123
<pre class="programlisting"><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="returnvalue">CamelMimeFilterBestenc</span></a> * camel_mime_filter_bestenc_new (<em class="parameter"><code><span class="type">guint</span> flags</code></em>);</pre>
151
125
Create a new <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object.</p>
154
126
<div class="variablelist"><table border="0">
155
127
<col align="left" valign="top">
158
130
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
159
<td> a bitmask of data required.
131
<td>a bitmask of data required.
171
<div class="refsect2" title="camel_mime_filter_bestenc_get_best_encoding ()">
143
<div class="refsect2" lang="en">
172
144
<a name="camel-mime-filter-bestenc-get-best-encoding"></a><h3>camel_mime_filter_bestenc_get_best_encoding ()</h3>
173
<pre class="programlisting"><a class="link" href="camel-camel-mime-utils.html#CamelTransferEncoding" title="enum CamelTransferEncoding">CamelTransferEncoding</a> camel_mime_filter_bestenc_get_best_encoding
174
(<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> *filter,
175
<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencEncoding" title="enum CamelBestencEncoding">CamelBestencEncoding</a> required);</pre>
145
<pre class="programlisting"><a class="link" href="camel-camel-mime-utils.html#CamelTransferEncoding" title="enum CamelTransferEncoding"><span class="returnvalue">CamelTransferEncoding</span></a> camel_mime_filter_bestenc_get_best_encoding
146
(<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> *filter</code></em>,
147
<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelBestencEncoding" title="enum CamelBestencEncoding"><span class="type">CamelBestencEncoding</span></a> required</code></em>);</pre>
177
149
Get the best encoding, given specific constraints, that can be used to
178
150
encode a stream of bytes.</p>
181
151
<div class="variablelist"><table border="0">
182
152
<col align="left" valign="top">
185
155
<td><p><span class="term"><em class="parameter"><code>filter</code></em> :</span></p></td>
186
<td> a <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object
156
<td>a <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object
190
160
<td><p><span class="term"><em class="parameter"><code>required</code></em> :</span></p></td>
191
<td> maximum level of output encoding allowed.
161
<td>maximum level of output encoding allowed.
203
<div class="refsect2" title="camel_mime_filter_bestenc_get_best_charset ()">
173
<div class="refsect2" lang="en">
204
174
<a name="camel-mime-filter-bestenc-get-best-charset"></a><h3>camel_mime_filter_bestenc_get_best_charset ()</h3>
205
<pre class="programlisting">const <a
206
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
207
>gchar</a> * camel_mime_filter_bestenc_get_best_charset
208
(<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> *filter);</pre>
175
<pre class="programlisting">const <span class="returnvalue">gchar</span> * camel_mime_filter_bestenc_get_best_charset
176
(<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> *filter</code></em>);</pre>
210
178
Gets the best charset that can be used to contain this content.</p>
213
179
<div class="variablelist"><table border="0">
214
180
<col align="left" valign="top">
217
183
<td><p><span class="term"><em class="parameter"><code>filter</code></em> :</span></p></td>
218
<td> a <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object
184
<td>a <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object
231
<div class="refsect2" title="camel_mime_filter_bestenc_set_flags ()">
197
<div class="refsect2" lang="en">
232
198
<a name="camel-mime-filter-bestenc-set-flags"></a><h3>camel_mime_filter_bestenc_set_flags ()</h3>
233
<pre class="programlisting">void camel_mime_filter_bestenc_set_flags (<a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc">CamelMimeFilterBestenc</a> *filter,
235
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
236
>guint</a> flags);</pre>
199
<pre class="programlisting"><span class="returnvalue">void</span> camel_mime_filter_bestenc_set_flags (<em class="parameter"><code><a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> *filter</code></em>,
200
<em class="parameter"><code><span class="type">guint</span> flags</code></em>);</pre>
238
202
Set the flags for subsequent operations.</p>
241
203
<div class="variablelist"><table border="0">
242
204
<col align="left" valign="top">
245
207
<td><p><span class="term"><em class="parameter"><code>filter</code></em> :</span></p></td>
246
<td> a <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object
208
<td>a <a class="link" href="camel-CamelMimeFilterBestenc.html#CamelMimeFilterBestenc" title="struct CamelMimeFilterBestenc"><span class="type">CamelMimeFilterBestenc</span></a> object
250
212
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
251
<td> bestenc filter flags
213
<td>bestenc filter flags