Initialize the gmime for upstream
[platform/upstream/gmime.git] / docs / reference / html / GMimeFilterBest.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GMimeFilterBest</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GMime 2.6 Reference Manual">
8 <link rel="up" href="Filters.html" title="Stream Filters">
9 <link rel="prev" href="GMimeFilterBasic.html" title="GMimeFilterBasic">
10 <link rel="next" href="GMimeFilterCharset.html" title="GMimeFilterCharset">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="GMimeFilterBasic.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="Filters.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GMime 2.6 Reference Manual</th>
21 <td><a accesskey="n" href="GMimeFilterCharset.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GMimeFilterBest.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GMimeFilterBest.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GMimeFilterBest.object-hierarchy" class="shortcut">Object Hierarchy</a>
29 </td></tr>
30 </table>
31 <div class="refentry">
32 <a name="GMimeFilterBest"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="GMimeFilterBest.top_of_page"></a>GMimeFilterBest</span></h2>
36 <p>GMimeFilterBest — Determine the best charset/encoding to use for a stream</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv">
41 <a name="GMimeFilterBest.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">struct              <a class="link" href="GMimeFilterBest.html#GMimeFilterBest-struct" title="struct GMimeFilterBest">GMimeFilterBest</a>;
43 enum                <a class="link" href="GMimeFilterBest.html#GMimeFilterBestFlags" title="enum GMimeFilterBestFlags">GMimeFilterBestFlags</a>;
44 <a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="returnvalue">GMimeFilter</span></a> *       <a class="link" href="GMimeFilterBest.html#g-mime-filter-best-new" title="g_mime_filter_best_new ()">g_mime_filter_best_new</a>              (<em class="parameter"><code><a class="link" href="GMimeFilterBest.html#GMimeFilterBestFlags" title="enum GMimeFilterBestFlags"><span class="type">GMimeFilterBestFlags</span></a> flags</code></em>);
45 const <span class="returnvalue">char</span> *        <a class="link" href="GMimeFilterBest.html#g-mime-filter-best-charset" title="g_mime_filter_best_charset ()">g_mime_filter_best_charset</a>          (<em class="parameter"><code><a class="link" href="GMimeFilterBest.html" title="GMimeFilterBest"><span class="type">GMimeFilterBest</span></a> *best</code></em>);
46 <a class="link" href="gmime-gmime-encodings.html#GMimeContentEncoding" title="enum GMimeContentEncoding"><span class="returnvalue">GMimeContentEncoding</span></a> <a class="link" href="GMimeFilterBest.html#g-mime-filter-best-encoding" title="g_mime_filter_best_encoding ()">g_mime_filter_best_encoding</a>        (<em class="parameter"><code><a class="link" href="GMimeFilterBest.html" title="GMimeFilterBest"><span class="type">GMimeFilterBest</span></a> *best</code></em>,
47                                                          <em class="parameter"><code><a class="link" href="gmime-gmime-encodings.html#GMimeEncodingConstraint" title="enum GMimeEncodingConstraint"><span class="type">GMimeEncodingConstraint</span></a> constraint</code></em>);
48 </pre>
49 </div>
50 <div class="refsect1">
51 <a name="GMimeFilterBest.object-hierarchy"></a><h2>Object Hierarchy</h2>
52 <pre class="synopsis">
53   GObject
54    +----<a class="link" href="GMimeFilter.html" title="GMimeFilter">GMimeFilter</a>
55          +----GMimeFilterBest
56 </pre>
57 </div>
58 <div class="refsect1">
59 <a name="GMimeFilterBest.description"></a><h2>Description</h2>
60 <p>
61 A <a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="type">GMimeFilter</span></a> which is meant to determine the best charset and/or
62 transfer encoding suitable for the stream which is filtered through
63 it.
64 </p>
65 </div>
66 <div class="refsect1">
67 <a name="GMimeFilterBest.details"></a><h2>Details</h2>
68 <div class="refsect2">
69 <a name="GMimeFilterBest-struct"></a><h3>struct GMimeFilterBest</h3>
70 <pre class="programlisting">struct GMimeFilterBest;</pre>
71 <p>
72 A filter for calculating the best encoding and/or charset to encode
73 the data passed through it.
74 </p>
75 <div class="variablelist"><table border="0">
76 <col align="left" valign="top">
77 <tbody></tbody>
78 </table></div>
79 </div>
80 <hr>
81 <div class="refsect2">
82 <a name="GMimeFilterBestFlags"></a><h3>enum GMimeFilterBestFlags</h3>
83 <pre class="programlisting">typedef enum {
84         GMIME_FILTER_BEST_CHARSET  = (1 &lt;&lt; 0),
85         GMIME_FILTER_BEST_ENCODING = (1 &lt;&lt; 1)
86 } GMimeFilterBestFlags;
87 </pre>
88 <p>
89 Bit flags to enable charset and/or encoding scanning to make
90 educated guesses as to what the best charset and/or encodings to
91 use for the content passed through the filter.
92 </p>
93 <div class="variablelist"><table border="0">
94 <col align="left" valign="top">
95 <tbody>
96 <tr>
97 <td><p><a name="GMIME-FILTER-BEST-CHARSET:CAPS"></a><span class="term"><code class="literal">GMIME_FILTER_BEST_CHARSET</code></span></p></td>
98 <td>Enable best-charset detection.
99 </td>
100 </tr>
101 <tr>
102 <td><p><a name="GMIME-FILTER-BEST-ENCODING:CAPS"></a><span class="term"><code class="literal">GMIME_FILTER_BEST_ENCODING</code></span></p></td>
103 <td>Enable best-encoding detection.
104 </td>
105 </tr>
106 </tbody>
107 </table></div>
108 </div>
109 <hr>
110 <div class="refsect2">
111 <a name="g-mime-filter-best-new"></a><h3>g_mime_filter_best_new ()</h3>
112 <pre class="programlisting"><a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="returnvalue">GMimeFilter</span></a> *       g_mime_filter_best_new              (<em class="parameter"><code><a class="link" href="GMimeFilterBest.html#GMimeFilterBestFlags" title="enum GMimeFilterBestFlags"><span class="type">GMimeFilterBestFlags</span></a> flags</code></em>);</pre>
113 <p>
114 Creates a new GMimeFilterBest filter. <em class="parameter"><code>flags</code></em> are used to determine
115 which information to keep statistics of. If the
116 <a class="link" href="GMimeFilterBest.html#GMIME-FILTER-BEST-CHARSET:CAPS"><span class="type">GMIME_FILTER_BEST_CHARSET</span></a> bit is set, the filter will be able to
117 compute the best charset for encoding the stream of data
118 filtered. If the <a class="link" href="GMimeFilterBest.html#GMIME-FILTER-BEST-ENCODING:CAPS"><span class="type">GMIME_FILTER_BEST_ENCODING</span></a> bit is set, the filter
119 will be able to compute the best Content-Transfer-Encoding for use
120 with the stream being filtered.
121 </p>
122 <p>
123 Note: In order for the <a class="link" href="GMimeFilterBest.html#g-mime-filter-best-charset" title="g_mime_filter_best_charset ()"><code class="function">g_mime_filter_best_charset()</code></a> function to
124 work, the stream being filtered MUST already be encoded in UTF-8.
125 </p>
126 <div class="variablelist"><table border="0">
127 <col align="left" valign="top">
128 <tbody>
129 <tr>
130 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
131 <td>filter flags</td>
132 </tr>
133 <tr>
134 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
135 <td>a new best filter with flags <em class="parameter"><code>flags</code></em>.</td>
136 </tr>
137 </tbody>
138 </table></div>
139 </div>
140 <hr>
141 <div class="refsect2">
142 <a name="g-mime-filter-best-charset"></a><h3>g_mime_filter_best_charset ()</h3>
143 <pre class="programlisting">const <span class="returnvalue">char</span> *        g_mime_filter_best_charset          (<em class="parameter"><code><a class="link" href="GMimeFilterBest.html" title="GMimeFilterBest"><span class="type">GMimeFilterBest</span></a> *best</code></em>);</pre>
144 <p>
145 Calculates the best charset for encoding the stream filtered
146 through the <em class="parameter"><code>best</code></em> filter.
147 </p>
148 <div class="variablelist"><table border="0">
149 <col align="left" valign="top">
150 <tbody>
151 <tr>
152 <td><p><span class="term"><em class="parameter"><code>best</code></em> :</span></p></td>
153 <td>best filter</td>
154 </tr>
155 <tr>
156 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
157 <td>a pointer to a string containing the name of the charset
158 best suited for the text filtered through <em class="parameter"><code>best</code></em>.</td>
159 </tr>
160 </tbody>
161 </table></div>
162 </div>
163 <hr>
164 <div class="refsect2">
165 <a name="g-mime-filter-best-encoding"></a><h3>g_mime_filter_best_encoding ()</h3>
166 <pre class="programlisting"><a class="link" href="gmime-gmime-encodings.html#GMimeContentEncoding" title="enum GMimeContentEncoding"><span class="returnvalue">GMimeContentEncoding</span></a> g_mime_filter_best_encoding        (<em class="parameter"><code><a class="link" href="GMimeFilterBest.html" title="GMimeFilterBest"><span class="type">GMimeFilterBest</span></a> *best</code></em>,
167                                                          <em class="parameter"><code><a class="link" href="gmime-gmime-encodings.html#GMimeEncodingConstraint" title="enum GMimeEncodingConstraint"><span class="type">GMimeEncodingConstraint</span></a> constraint</code></em>);</pre>
168 <p>
169 Calculates the most efficient Content-Transfer-Encoding for the
170 stream filtered through <em class="parameter"><code>best</code></em> that fits within the encoding
171 <em class="parameter"><code>constraint</code></em>.
172 </p>
173 <div class="variablelist"><table border="0">
174 <col align="left" valign="top">
175 <tbody>
176 <tr>
177 <td><p><span class="term"><em class="parameter"><code>best</code></em> :</span></p></td>
178 <td>a <a class="link" href="GMimeFilterBest.html" title="GMimeFilterBest"><span class="type">GMimeFilterBest</span></a>
179 </td>
180 </tr>
181 <tr>
182 <td><p><span class="term"><em class="parameter"><code>constraint</code></em> :</span></p></td>
183 <td>a <a class="link" href="gmime-gmime-encodings.html#GMimeEncodingConstraint" title="enum GMimeEncodingConstraint"><span class="type">GMimeEncodingConstraint</span></a>
184 </td>
185 </tr>
186 <tr>
187 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
188 <td>the best encoding for the stream filtered by <em class="parameter"><code>best</code></em>.</td>
189 </tr>
190 </tbody>
191 </table></div>
192 </div>
193 </div>
194 <div class="refsect1">
195 <a name="GMimeFilterBest.see-also"></a><h2>See Also</h2>
196 <a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="type">GMimeFilter</span></a>
197 </div>
198 </div>
199 <div class="footer">
200 <hr>
201           Generated by GTK-Doc V1.18</div>
202 </body>
203 </html>