HTMIME.h
上传用户:zlh9724
上传日期:2007-01-04
资源大小:1991k
文件大小:2k
源码类别:

浏览器

开发平台:

Unix_Linux

  1. /*                                                                       RFC822 Header Parser
  2.                                        MIME PARSER
  3.                                              
  4.  */
  5. /*
  6. **      (c) COPYRIGHT MIT 1995.
  7. **      Please first read the full copyright statement in the file COPYRIGH.
  8. */
  9. /*
  10.    The MIME parser stream presents a MIME document. It recursively invokes the format
  11.    manager to handle embedded formats.
  12.    
  13.    As well as stripping off and parsing the headers, the MIME parser has to parse any
  14.    weirld MIME encodings it may meet within the body parts of messages, and must deal with
  15.    multipart messages.
  16.    
  17.    This module is implemented to the level necessary for operation with WWW, but is not
  18.    currently complete for any arbitrary MIME message.
  19.    
  20.    Check the source for latest additions to functionality.
  21.    
  22.     The MIME parser is complicated by the fact that WWW allows real binary to be sent, not
  23.    ASCII encoded.  Therefore the netascii decoding is included in this module. One cannot
  24.    layer it by converting first from Net to local text, then decoding it. Of course, for
  25.    local files, the net ascii decoding is not needed.  There are therefore two creation
  26.    routines.
  27.    
  28.    This module is implemented by HTMIME.c, and it is a part of the W3C Reference Library.
  29.    
  30.  */
  31. #ifndef HTMIME_H
  32. #define HTMIME_H
  33. #include "HTStream.h"
  34. #include "HTFormat.h"
  35. /*
  36. Stream Converters in this Module
  37.   MIME HEADER PARSER STREAM
  38.   
  39.    This stream parses a complete MIME header and if a content type header is found then
  40.    the stream stack is called. Any left over data is pumped right through the stream.
  41.    
  42.  */
  43. extern HTConverter HTMIMEConvert;
  44. /*
  45.   MIME HEADER ONLY PARSER STREAM
  46.   
  47.    This stream parses a complete MIME header and then returnes HT_PAUSE. It does not set
  48.    up any streams and resting data stays in the buffer. This can be used if you only want
  49.    to parse the headers before you decide what to do next. This is for example the case in
  50.    a server app.
  51.    
  52.  */
  53. extern HTConverter HTMIMEHeader;
  54. /*
  55.  */
  56. #endif
  57. /*
  58.    End of HTMIME declaration */