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

浏览器

开发平台:

Unix_Linux

  1. /*                                                           MIME Multipart Stream Definition
  2.                              MIME MULTIPART STREAM DEFINITION
  3.                                              
  4.  */
  5. /*
  6. **      (c) COPYRIGHT MIT 1995.
  7. **      Please first read the full copyright statement in the file COPYRIGH.
  8. */
  9. /*
  10.    This module is a part of the  W3C Reference Library.
  11.    
  12.  */
  13. #ifndef HTMULPAR_H
  14. #define HTMULPAR_H
  15. #include "HTStream.h"
  16. #include "HTList.h"
  17. /*
  18.    The MIME multipart stream is used to parse MIME multipart messages. It works a bit like
  19.    a structured stream in that it has some methods to begin and end MIME body just as a
  20.    structured stream has methods for beginning and ending tags.
  21.    
  22.    The HTMultipart stream is a subclass of a Generic Stream Object. As always, we don't
  23.    have classes in basic C so we have to do this by hand!
  24.    
  25.  */
  26. typedef struct _HTMultipart HTMultipart;
  27. typedef struct _HTMultipartClass {
  28.     char * name;
  29.     int (*flush)        (HTMultipart *  me);
  30.     int (*_free)        (HTMultipart *  me);
  31.     int (*abort)        (HTMultipart *  me, HTList * errorlist);
  32.     int (*put_character)(HTMultipart *  me, char ch);
  33.     int (*put_string)   (HTMultipart *  me, CONST char * str);
  34.     int (*put_block)    (HTMultipart *  me, CONST char * str, int len);
  35. /*
  36.    See the Generic Stream Definition for an explanation of these methods. Note that they
  37.    all have a HTMultipart object a the parameter, not a generic stream. This is to avoid
  38.    incompatible pointer warnings
  39.    
  40.  */
  41.     int (*begin_part)   (HTMultipart *  me, CONST char * boundary);
  42.     int (*end_part)     (HTMultipart *  me);
  43.     int (*preamble)     (HTMultipart *  me, CONST char * pre);
  44.     int (*epilogue)     (HTMultipart *  me, CONST char * epi);
  45.                 
  46. } HTMultipartClass;
  47. #endif
  48. /*
  49.    End of Multipart Stream definition */