Annotation of libwww/Library/src/HTXParse.html, revision 2.15

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.14      frystyk     3:   <!-- Changed by: Henrik Frystyk Nielsen,  5-Apr-1996 -->
                      4:   <TITLE>W3C Sample Code Library libwww Callback Stream</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
2.14      frystyk     7: <H1>
                      8:   XParse: Module to get Unparsed Stream from libwww
                      9: </H1>
2.1       frystyk    10: <PRE>
                     11: /*
2.3       frystyk    12: **     (c) COPYRIGHT MIT 1995.
2.1       frystyk    13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
2.14      frystyk    16: <P>
                     17: This version of the stream object is a hook for clients that want an unparsed
                     18: stream from libwww. The HTXParse_put_* and HTXParse_write routines copy the
                     19: content of the incoming buffer into a buffer that is realloced whenever
                     20: necessary. This buffer is handed over to the client in HTXParse_free. See
                     21: also <A HREF="HTFWrite.html">HTFWriter</A> for writing to C files.
                     22: <H3>
                     23:   Bugs:
                     24: </H3>
2.1       frystyk    25: <UL>
2.14      frystyk    26:   <LI>
                     27:     strings written must be less than buffer size.
2.1       frystyk    28: </UL>
2.14      frystyk    29: <P>
                     30: This module is implemented by <A HREF="HTXParse.c">HTXParse.c</A>, and it
                     31: is a part of the <A HREF="http://www.w3.org/Library/"> W3C Sample Code
                     32: Library</A>.
2.1       frystyk    33: <PRE>
2.9       frystyk    34: #ifndef HTXPARSE_H
                     35: #define HTXPARSE_H
2.1       frystyk    36: 
                     37: #include "HTStream.h"
2.11      frystyk    38: #include "HTReader.h"
2.7       frystyk    39: #include "HTReq.h"
2.1       frystyk    40: 
2.15    ! vbancrof   41: #ifdef __cplusplus
        !            42: extern "C" { 
        !            43: #endif 
        !            44: 
2.9       frystyk    45: typedef struct _HTXParseStruct HTXParseStruct;
2.5       frystyk    46: 
2.9       frystyk    47: typedef void CallClient (HTXParseStruct * me);
2.5       frystyk    48: 
2.9       frystyk    49: struct _HTXParseStruct {
2.5       frystyk    50:        CallClient      *call_client;
                     51:        int             used;         /* how much of the buffer is being used*/
2.1       frystyk    52:        BOOL            finished;     /* document loaded? */
                     53:         int             length;       /* how long the buffer is */
2.5       frystyk    54:        char *          buffer;       /* storage in until client takes over */
2.1       frystyk    55:        char *          content_type;
                     56:        HTRequest *     request;      /* the request structure */
                     57: };
                     58: 
2.9       frystyk    59: extern HTConverter HTXParse;
2.1       frystyk    60: 
2.15    ! vbancrof   61: #ifdef __cplusplus
        !            62: }
2.1       frystyk    63: #endif
2.15    ! vbancrof   64: 
        !            65: #endif  /* HTXPARSE_H */
2.8       frystyk    66: </PRE>
2.14      frystyk    67: <P>
2.8       frystyk    68: End of declaration
2.14      frystyk    69: </BODY></HTML>

Webmaster