~ubuntu-branches/debian/wheezy/courier/wheezy

« back to all changes in this revision

Viewing changes to rfc2045/rfc2045.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Hornburg (Racke)
  • Date: 2009-03-08 16:42:08 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090308164208-nlve2wtx9bbrulmd
Tags: 0.61.2-1
* New upstream release.
* Lintian:
  - fix chown in courier-webadmin postinst
  - removed courier-base preinst
  - added debhelper token to courier-mta.preinst
  - removed *.conffiles

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0"?>
2
 
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>rfc2045</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"/><link rel="start" href="#rfc2045" title="rfc2045"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
 
2
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>rfc2045</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"/><link rel="start" href="#rfc2045" title="rfc2045"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
3
3
 
4
4
Copyright 1998 - 2007 Double Precision, Inc.  See COPYING for distribution
5
5
information.
9
9
#include &lt;rfc2045.h&gt;
10
10
 
11
11
cc ... -lrfc2045 -lrfc822
12
 
</pre></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id281686" shape="rect"> </a><h2>DESCRIPTION</h2><p>
 
12
</pre></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id312877" shape="rect"> </a><h2>DESCRIPTION</h2><p>
13
13
The rfc2045 library parses MIME-formatted messages.
14
14
The rfc2045 library is used to:</p><p>
15
15
1) Parse the structure of a MIME formatted message</p><p>
16
16
2) Examine the contents of each MIME section</p><p>
17
 
3) Optionally rewrite and reformat the message.</p><div class="refsect2" lang="en" xml:lang="en"><a id="id281706" shape="rect"> </a><h3>Creating an rfc2045 structure</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
 
17
3) Optionally rewrite and reformat the message.</p><div class="refsect2" lang="en" xml:lang="en"><a id="id313894" shape="rect"> </a><h3>Creating an rfc2045 structure</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
18
18
#include &lt;rfc2045.h&gt;
19
19
 
20
20
struct rfc2045 *ptr=rfc2045_alloc();
75
75
below may be used to access and work with the contents of the structure. When
76
76
the <span class="structname">rfc2045</span> structure is no longer needed, the
77
77
function <code class="function">rfc2045_free</code>() deallocates and destroys the
78
 
structure.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id282688" shape="rect"> </a><h3>Structure of a MIME message</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
 
78
structure.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id288532" shape="rect"> </a><h3>Structure of a MIME message</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
79
79
 
80
80
struct rfc2045 {
81
81
 
126
126
Not all MIME sections are created equal.  In a multipart MIME section,
127
127
there is an initial, unused, "filler" section before the first MIME delimiter
128
128
(see
129
 
<a href="http://www.rfc-editor.org/rfc/rfc2045.txt" target="_top" shape="rect">RFC 2045</a>
 
129
<a class="ulink" href="http://www.rfc-editor.org/rfc/rfc2045.txt" target="_top" shape="rect">RFC 2045</a>
130
130
for more information).  This filler section typically contains a
131
131
terse message saying that this is a MIME-formatted message.
132
132
This is not considered to be a "real" MIME section, and
135
135
to a non-zero value.  All <span class="structname">rfc2045</span>
136
136
structures that have <em class="structfield"><code>isdummy</code></em> set should be
137
137
ignored, and skipped over, when traversing the
138
 
<span class="structname">rfc2045</span> tree.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id325275" shape="rect"> </a><h3>Basic MIME information</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
 
138
<span class="structname">rfc2045</span> tree.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id288746" shape="rect"> </a><h3>Basic MIME information</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
139
139
 
140
140
const char *content_type, *content_transfer_encoding,
141
141
           *content_character_set;
230
230
<code class="function">rfc2231_decodeType</code>() reads MIME attributes from the
231
231
<code class="literal">Content-Disposition:</code> header.
232
232
These functions understand MIME attributes that are encoded according to
233
 
<a href="http://www.rfc-editor.org/rfc/rfc2231.txt" target="_top" shape="rect">RFC 2231</a>.</p><p>
 
233
<a class="ulink" href="http://www.rfc-editor.org/rfc/rfc2231.txt" target="_top" shape="rect">RFC 2231</a>.</p><p>
234
234
These functions initialize
235
235
<em class="parameter"><code>charset</code></em>,
236
236
<em class="parameter"><code>language</code></em>, and
243
243
<em class="parameter"><code>language</code></em> will be set to an empty string
244
244
(<span class="emphasis"><em>not</em></span> <code class="literal">NULL</code>) if the MIME parameter
245
245
does not exist, or is not encoded according to
246
 
<a href="http://www.rfc-editor.org/rfc/rfc2231.txt" target="_top" shape="rect">RFC 2231</a>,
 
246
<a class="ulink" href="http://www.rfc-editor.org/rfc/rfc2231.txt" target="_top" shape="rect">RFC 2231</a>,
247
247
or does not specify its character set and/or language.
248
248
<em class="parameter"><code>value</code></em> will be set to an empty string if the MIME
249
249
parameter does not exist.</p><div class="informalexample"><pre class="programlisting" xml:space="preserve">
270
270
<code class="literal">Content-Base:</code> or
271
271
<code class="literal">Content-Location:</code> headers. Either argument to
272
272
<code class="function">rfc2045_append_url</code>() may be a
273
 
NULL, or an empty string.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id325669" shape="rect"> </a><h3>Decoding a MIME section</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
 
273
NULL, or an empty string.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id333316" shape="rect"> </a><h3>Decoding a MIME section</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
274
274
 
275
275
void rfc2045_cdecode_start(struct rfc2045 *ptr,
276
276
        int (*callback_func)(const char *, size_t, void *),
316
316
decoding. If
317
317
<code class="function">callback_func</code>() returns non-zero, the decoding
318
318
immediately stops and
319
 
<code class="function">rfc2045_cdecode</code>() or <code class="function">rfc2045_cdecode_end</code>() terminates with <code class="function">callback_func</code>'s return code.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id325835" shape="rect"> </a><h3>Rewriting MIME messages</h3><p>
 
319
<code class="function">rfc2045_cdecode</code>() or <code class="function">rfc2045_cdecode_end</code>() terminates with <code class="function">callback_func</code>'s return code.</p></div><div class="refsect2" lang="en" xml:lang="en"><a id="id333466" shape="rect"> </a><h3>Rewriting MIME messages</h3><p>
320
320
This library contains functions that can be used to rewrite a MIME
321
321
message in order to convert 8-bit-encoded data to 7-bit encoding, or to
322
322
convert 7-bit encoded data to full 8-bit data, if possible.</p><div class="informalexample"><pre class="programlisting" xml:space="preserve">
376
376
portion, and <em class="parameter"><code>funcout_arg</code></em>. When either function rewrites
377
377
a MIME section,
378
378
an informational header gets appended, noting that the message was converted
379
 
by <em class="parameter"><code>appname</code></em>.</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id326024" shape="rect"> </a><h2>SEE ALSO</h2><p>
380
 
<a href="rfc822.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">rfc822</span>(3)</span></a>,
381
 
<a href="reformail.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">reformail</span>(1)</span></a>,
382
 
<a href="reformime.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">reformime</span>(1)</span></a>.</p></div></div></body></html>
 
379
by <em class="parameter"><code>appname</code></em>.</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id333640" shape="rect"> </a><h2>SEE ALSO</h2><p>
 
380
<a class="ulink" href="rfc822.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">rfc822</span>(3)</span></a>,
 
381
<a class="ulink" href="reformail.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">reformail</span>(1)</span></a>,
 
382
<a class="ulink" href="reformime.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">reformime</span>(1)</span></a>.</p></div></div></body></html>