File:  [Public] / libwww / Library / src / WWWMIME.html
Revision 2.11: download - view: text, annotated - select for diffs
Thu May 14 02:11:22 1998 UTC (26 years ago) by frystyk
Branches: MAIN
CVS tags: repeat-requests, candidate-5-4-1, before_webdav, Release-5-4-0, Release-5-3-1, Release-5-2-8, Release-5-2-6, Release-5-2, Release-5-1m, HEAD, Before-New-Trace-Messages, Amaya_2_4, Amaya-6-3, Amaya-6-1, Amaya-5-2, Amaya-4-3-2, Amaya-4-3-1, Amaya-4-3, Amaya-4-1-2, Amaya-4-1-0, Amaya-4-0-0, Amaya-3-2-1, Amaya-3-2, Amaya
Changing old pub/WWW links

<HTML>
<HEAD>
  <TITLE>W3C Sample Code Library libwww MIME and RFC822</TITLE>
</HEAD>
<BODY>
<H1>
  Declaration of W3C Sample Code MIME and RFC822
</H1>
<PRE>
/*
**	(c) COPYRIGHT MIT 1995.
**	Please first read the full copyright statement in the file COPYRIGH.
*/
</PRE>
<P>
This is the module for basic RFC822/MIME parsing that can be used together
with the core of the W3C Sample Code Library. It contains all MIME specific
modules which are required to compile and build the MIME DLL.
<PRE>
#ifndef WWWMIME_H
#define WWWMIME_H
</PRE>
<PRE>
#ifdef __cplusplus
extern "C" { 
#endif
</PRE>
<H3>
  System dependencies
</H3>
<P>
The <A HREF="wwwsys.html">wwwsys.h</A> file includes system-specific include
files and flags for I/O to network and disk. The only reason for this file
is that the Internet world is more complicated than Posix and ANSI.
<PRE>
#include "<A HREF="wwwsys.html">wwwsys.h</A>"
</PRE>
<H3>
  MIME Entity Header Parsing
</H3>
<P>
The libwww MIME parsers are completely generic in that they don't know about
any particular headers - they are all registered at run-time by the application.
There are two parsers: the first is for parsing <I>MIME headers</I> and the
second is for parsing <I>MIME footers</I>. They are both converters that
can be set up using the <A HREF="HTInit.html#Converter">HTConverterInit</A>
function in the <A HREF="WWWInit.html">libwww setup module</A>
<P>
There is also a default set of the headers defined by the
<A HREF="http://www.w3.org/Protocols/">HTTP/1.1</A> specification
which can be initialized using the
<A HREF="HTInit.html#MIME"><CODE>HTMIMEInit()</CODE></A> function in the
<A HREF="WWWInit.html">libwww setup module</A>.
<PRE>#include "<A HREF="HTMIME.html">HTMIME.h</A>"			/* Generic MIME parser */
#include "<A HREF="HTHeader.html">HTHeader.h</A>"			/* Header parser registration */
</PRE>
<H3>
  MIME Entity Header Generation
</H3>
<P>
When sending a MIME entity along with a request, for example using NNTP or
HTTP, the entity headers are generated by the MIME generator stream. This
stream will be added to the output stream pipe in order to decorate the outgoing
request.
<PRE>#include "<A HREF="HTMIMERq.html">HTMIMERq.h</A>"			/* MIME request generator */
</PRE>
<H3>
  Default MIME Header Parsers
</H3>
<P>
The Library's MIME parser is divided into two parts: A generic MIME parser
that knows how to unwrap all RFC822 headers and specialized header parsers
that knows how to parse <CODE>Content-Length</CODE>, for example. This is
the default set of the specialized MIME header parsers that can be registered
as part of the generic MIME. Note that these functions are not registered
by default - they must be registered by the application. This can be done
using the <A HREF="HTInit.html">HTMIMEInit()</A> function in the
<A HREF="WWWInit.html">WWWInit interface</A>. Of course this can also be
used to register new headers that are not represented below - or if you want
to replace a default parser then this is also very easy.
<PRE>#include "<A HREF="HTMIMImp.html">HTMIMImp.h</A>"
</PRE>
<H3>
  Multipart MIME Parsing and Generation
</H3>
<P>
Libwww supports MIME multipart generation and parsing using two streams.
The parser stream is a converter that can be setup for"converting" the MIME
body parts into separate documents. The MIME multipart stream parser can
be set up by using the <A HREF="HTInit.html#Converter">HTConverterInit</A>
function in the <A HREF="WWWInit.html">libwww setup module</A>.
<PRE>
#include "<A HREF="HTBound.html">HTBound.h</A>"			/* Multipart MIME parser */
#include "<A HREF="HTMulpar.html">HTMulpar.h</A>"			/* Multipart MIME generator stream */
</PRE>
<P>
End of MIME modules
<PRE>
#ifdef __cplusplus
} /* end extern C definitions */
#endif

#endif
</PRE>
<P>
  <HR>
<ADDRESS>
  @(#) $Id: WWWMIME.html,v 2.11 1998/05/14 02:11:22 frystyk Exp $
</ADDRESS>
</BODY></HTML>

Webmaster