Annotation of libwww/Library/src/WWWMIME.html, revision 2.11

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.9       frystyk     3:   <TITLE>W3C Sample Code Library libwww MIME and RFC822</TITLE>
2.1       frystyk     4: </HEAD>
                      5: <BODY>
2.7       frystyk     6: <H1>
2.9       frystyk     7:   Declaration of W3C Sample Code MIME and RFC822
2.7       frystyk     8: </H1>
2.1       frystyk     9: <PRE>
                     10: /*
                     11: **     (c) COPYRIGHT MIT 1995.
                     12: **     Please first read the full copyright statement in the file COPYRIGH.
                     13: */
                     14: </PRE>
2.7       frystyk    15: <P>
                     16: This is the module for basic RFC822/MIME parsing that can be used together
2.9       frystyk    17: with the core of the W3C Sample Code Library. It contains all MIME specific
2.7       frystyk    18: modules which are required to compile and build the MIME DLL.
2.1       frystyk    19: <PRE>
                     20: #ifndef WWWMIME_H
                     21: #define WWWMIME_H
                     22: </PRE>
                     23: <PRE>
                     24: #ifdef __cplusplus
                     25: extern "C" { 
                     26: #endif
                     27: </PRE>
2.7       frystyk    28: <H3>
                     29:   System dependencies
                     30: </H3>
                     31: <P>
2.10      frystyk    32: The <A HREF="wwwsys.html">wwwsys.h</A> file includes system-specific include
2.7       frystyk    33: files and flags for I/O to network and disk. The only reason for this file
                     34: is that the Internet world is more complicated than Posix and ANSI.
2.1       frystyk    35: <PRE>
2.10      frystyk    36: #include "<A HREF="wwwsys.html">wwwsys.h</A>"
2.6       frystyk    37: </PRE>
2.7       frystyk    38: <H3>
                     39:   MIME Entity Header Parsing
                     40: </H3>
                     41: <P>
                     42: The libwww MIME parsers are completely generic in that they don't know about
                     43: any particular headers - they are all registered at run-time by the application.
                     44: There are two parsers: the first is for parsing <I>MIME headers</I> and the
                     45: second is for parsing <I>MIME footers</I>. They are both converters that
                     46: can be set up using the <A HREF="HTInit.html#Converter">HTConverterInit</A>
                     47: function in the <A HREF="WWWInit.html">libwww setup module</A>
                     48: <P>
                     49: There is also a default set of the headers defined by the
2.11    ! frystyk    50: <A HREF="http://www.w3.org/Protocols/">HTTP/1.1</A> specification
2.7       frystyk    51: which can be initialized using the
                     52: <A HREF="HTInit.html#MIME"><CODE>HTMIMEInit()</CODE></A> function in the
                     53: <A HREF="WWWInit.html">libwww setup module</A>.
                     54: <PRE>#include "<A HREF="HTMIME.html">HTMIME.h</A>"                     /* Generic MIME parser */
                     55: #include "<A HREF="HTHeader.html">HTHeader.h</A>"                      /* Header parser registration */
                     56: </PRE>
                     57: <H3>
                     58:   MIME Entity Header Generation
                     59: </H3>
                     60: <P>
                     61: When sending a MIME entity along with a request, for example using NNTP or
                     62: HTTP, the entity headers are generated by the MIME generator stream. This
                     63: stream will be added to the output stream pipe in order to decorate the outgoing
                     64: request.
                     65: <PRE>#include "<A HREF="HTMIMERq.html">HTMIMERq.h</A>"                 /* MIME request generator */
                     66: </PRE>
                     67: <H3>
2.8       frystyk    68:   Default MIME Header Parsers
                     69: </H3>
                     70: <P>
                     71: The Library's MIME parser is divided into two parts: A generic MIME parser
                     72: that knows how to unwrap all RFC822 headers and specialized header parsers
                     73: that knows how to parse <CODE>Content-Length</CODE>, for example. This is
                     74: the default set of the specialized MIME header parsers that can be registered
                     75: as part of the generic MIME. Note that these functions are not registered
                     76: by default - they must be registered by the application. This can be done
                     77: using the <A HREF="HTInit.html">HTMIMEInit()</A> function in the
                     78: <A HREF="WWWInit.html">WWWInit interface</A>. Of course this can also be
                     79: used to register new headers that are not represented below - or if you want
                     80: to replace a default parser then this is also very easy.
                     81: <PRE>#include "<A HREF="HTMIMImp.html">HTMIMImp.h</A>"
                     82: </PRE>
                     83: <H3>
2.7       frystyk    84:   Multipart MIME Parsing and Generation
                     85: </H3>
                     86: <P>
                     87: Libwww supports MIME multipart generation and parsing using two streams.
                     88: The parser stream is a converter that can be setup for"converting" the MIME
                     89: body parts into separate documents. The MIME multipart stream parser can
                     90: be set up by using the <A HREF="HTInit.html#Converter">HTConverterInit</A>
                     91: function in the <A HREF="WWWInit.html">libwww setup module</A>.
2.6       frystyk    92: <PRE>
2.7       frystyk    93: #include "<A HREF="HTBound.html">HTBound.h</A>"                        /* Multipart MIME parser */
                     94: #include "<A HREF="HTMulpar.html">HTMulpar.h</A>"                      /* Multipart MIME generator stream */
2.1       frystyk    95: </PRE>
2.7       frystyk    96: <P>
                     97: End of MIME modules
2.1       frystyk    98: <PRE>
                     99: #ifdef __cplusplus
                    100: } /* end extern C definitions */
                    101: #endif
                    102: 
                    103: #endif
                    104: </PRE>
2.7       frystyk   105: <P>
                    106:   <HR>
2.5       frystyk   107: <ADDRESS>
2.11    ! frystyk   108:   @(#) $Id: WWWMIME.html,v 2.10 1998/05/04 19:37:53 frystyk Exp $
2.5       frystyk   109: </ADDRESS>
2.7       frystyk   110: </BODY></HTML>

Webmaster