Annotation of libwww/Library/src/HTReqMan.html, revision 2.22

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.19      frystyk     3: <TITLE>W3C Reference Library libwww REQUEST OBJECT</TITLE>
2.21      frystyk     4: <<<<<<< HTReqMan.html
                      5: <!-- Changed by: Henrik Frystyk Nielsen, 23-Mar-1996 -->
                      6: =======
2.18      frystyk     7: <!-- Changed by: Henrik Frystyk Nielsen, 20-Feb-1996 -->
2.20      hallam      8: <!-- Changed by: Eric Prud'hommeaux, 21-Mar-1996 -->
2.22    ! frystyk     9: <!-- Changed by: Henrik Frystyk Nielsen, 15-Apr-1996 -->
2.21      frystyk    10: >>>>>>> 2.20
2.1       frystyk    11: </HEAD>
                     12: <BODY>
                     13: 
2.11      frystyk    14: <H1>Request Object</H1>
2.1       frystyk    15: 
                     16: <PRE>
                     17: /*
                     18: **     (c) COPYRIGHT MIT 1995.
                     19: **     Please first read the full copyright statement in the file COPYRIGH.
                     20: */
                     21: </PRE>
                     22: 
2.11      frystyk    23: This module is the private part of the request object. It has the
2.1       frystyk    24: functions declarations that are private to the Library and that
                     25: shouldn't be used by applications. The module has been separated from
                     26: the old HTAccess module. See also the public part of the declarition
                     27: in the <A HREF="HTReq.html">HTReq Module</A>.<P>
                     28: 
                     29: This module is implemented by <A HREF="HTReqMan.c">HTReqMan.c</A>, and
2.3       frystyk    30: it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
                     31: Reference Library</A>. <P>
2.1       frystyk    32: 
                     33: <PRE>
                     34: #ifndef HTREQMAN_H
                     35: #define HTREQMAN_H
                     36: 
                     37: #include "<A HREF="HTReq.html">HTReq.h</A>"
                     38: #include "<A HREF="HTList.html">HTList.h</A>"
                     39: #include "<A HREF="HTFormat.html">HTFormat.h</A>"
                     40: #include "<A HREF="HTAnchor.html">HTAnchor.h</A>"
                     41: #include "<A HREF="HTMethod.html">HTMethod.h</A>"
                     42: #include "<A HREF="HTAABrow.html">HTAABrow.h</A>"
                     43: #include "<A HREF="HTStream.html">HTStream.h</A>"
2.8       frystyk    44: #include "<A HREF="HTSocket.html">HTSocket.h</A>"
2.1       frystyk    45: #include "<A HREF="HTNet.html">HTNet.h</A>"
                     46: </PRE>
                     47: 
                     48: <H2><A NAME="req">The Request structure</A></H2>
                     49: 
                     50: When a request is handled, all kinds of things about it need to be
                     51: passed along together with a request. It is intended to live as long
                     52: as the request is still active, but can be deleted as soon as it has
                     53: terminated. Only the anchor object stays around after the request
                     54: itself is terminated.
                     55: 
                     56: <PRE>
                     57: struct _HTRequest {
2.14      frystyk    58: 
                     59:     BOOL               internal;      /* Does the app knows about this one? */
                     60: 
2.1       frystyk    61:     HTMethod           method;
                     62:     HTReload           reload;
                     63: 
2.6       frystyk    64:     char *             boundary;                 /* MIME multipart boundary */
2.1       frystyk    65:     int                        retrys;               /* Number of automatic reloads */
                     66:     time_t             retry_after;             /* Absolut time for a retry */
                     67:     HTNet *            net;                /* Information about socket etc. */
2.5       frystyk    68:     HTPriority         priority;               /* Priority for this request */
2.1       frystyk    69: </PRE>
                     70: 
                     71: <H3>Accept headers</H3>
                     72: 
                     73: <PRE>
                     74:     HTList *           conversions;
                     75:     BOOL               conv_local;
                     76: 
                     77:     HTList *           encodings;
                     78:     BOOL               enc_local;
                     79: 
2.22    ! frystyk    80:     HTList *           ctes;
        !            81:     BOOL               cte_local;
2.21      frystyk    82: 
2.1       frystyk    83:     HTList *           languages;
                     84:     BOOL               lang_local;
                     85: 
                     86:     HTList *           charsets;
                     87:     BOOL               char_local;
2.20      hallam     88: 
                     89:     HTList *           befores;
                     90:     BOOL               befores_local;
                     91: 
                     92:     HTList *           afters;
                     93:     BOOL               afters_local;
2.1       frystyk    94: </PRE>
                     95: 
                     96: <H3>Headers and header information</H3>
                     97: 
                     98: <PRE>
                     99:     HTGnHd             GenMask;
2.12      frystyk   100:     HTRsHd             ResponseMask;
2.1       frystyk   101:     HTRqHd             RequestMask;
                    102:     HTEnHd             EntityMask;
2.5       frystyk   103: 
                    104:     HTList *           parsers;
                    105:     BOOL               pars_local;
                    106: 
                    107:     HTList *           generators;
                    108:     BOOL               gens_local;
2.1       frystyk   109: </PRE>
                    110: 
                    111: <H3>Anchors</H3>
                    112: 
                    113: <PRE>
2.10      frystyk   114:     HTParentAnchor *   anchor;        /* The Client anchor for this request */
                    115: 
2.1       frystyk   116:     HTChildAnchor *    childAnchor;        /* For element within the object */
                    117:     HTParentAnchor *   parentAnchor;                   /* For referer field */
                    118: </PRE>
                    119: 
2.14      frystyk   120: <H4>Redirection</H4>
                    121: 
                    122: If we get a redirection back then we return the new destination for
                    123: this request to the application using this anchor.
                    124: 
                    125: <PRE>
                    126:     HTAnchor *         redirectionAnchor;                /* Redirection URL */
                    127: </PRE>
                    128: 
2.1       frystyk   129: <H3>Streams From Network to Application</H3>
                    130: 
                    131: <PRE>
                    132:     HTStream *         output_stream; 
                    133:     HTFormat           output_format;
                    134: 
                    135:     HTStream*          debug_stream;
                    136:     HTFormat           debug_format;
                    137: </PRE>
                    138: 
                    139: <H3>Streams From Application to Network</H3>
                    140: 
                    141: <PRE>
                    142:     HTStream *         input_stream; 
                    143:     HTFormat           input_format;
                    144: </PRE>
                    145: 
                    146: <H3>Callback Function for getting data down the Input Stream</H3>
                    147: 
                    148: <PRE>
2.5       frystyk   149:     HTPostCallback *   PostCallback;
2.1       frystyk   150: </PRE>
                    151: 
                    152: <H3>Context Swapping</H3>
                    153: 
                    154: <PRE>
                    155:     HTRequestCallback *        callback;
                    156:     void *             context;
                    157: </PRE>
                    158: 
                    159: <H3>Other Flags</H3>
                    160: 
                    161: <PRE>
2.13      frystyk   162:     BOOL               preemptive;
2.1       frystyk   163:     BOOL               ContentNegotiation;
                    164:     BOOL               using_proxy;
                    165: </PRE>
                    166: 
                    167: <H3>Error Manager</H3>
                    168: 
                    169: <PRE>
                    170:     HTList *           error_stack;                       /* List of errors */
                    171: </PRE>
                    172: 
                    173: <H3>PostWeb Information</H3>
                    174: 
                    175: <PRE>
                    176:     HTRequest *                source;              /* Source for request or itself */
2.16      frystyk   177:     HTParentAnchor *   source_anchor;            /* Source anchor or itself */
                    178: 
2.1       frystyk   179:     HTRequest *                mainDestination;             /* For the typical case */
                    180:     HTList *           destinations;            /* List of related requests */
                    181:     int                        destRequests;      /* Number of destination requests */
                    182:     int                        destStreams;        /* Number of destination streams */
                    183: </PRE>
                    184: 
                    185: <H3>Access Authentication Information</H3>
                    186: 
2.18      frystyk   187: The <CODE>challenge</CODE> and the <CODE>credentials</CODE> entries
                    188: are use by the authentication parsers and generators respectively. It
                    189: is required to have a <CODE>scheme</CODE> in order to find a parser
                    190: for an authentication scheme.
2.1       frystyk   191: 
                    192: <PRE>
2.17      frystyk   193:     char *             scheme;             /* Current authentication scheme */
                    194:     char *             realm;                              /* Current realm */
2.18      frystyk   195: 
2.17      frystyk   196:     HTAssocList *      challenge;           /* Challenge received by client */
                    197:     HTAssocList *      credentials;       /* Credentials received by server */
2.1       frystyk   198: </PRE>
                    199: 
                    200: <H3>Windows Specific Information</H3>
                    201: 
                    202: <PRE>
2.7       frystyk   203: #ifdef WWW_WIN_ASYNC
                    204:     HWND               hwnd;           /* Windows handle for MSWindows   */
                    205:     unsigned long      winMsg;         /* msg number of Windows eloop    */
                    206: #endif /* WWW_WIN_ASYNC */
2.1       frystyk   207: </PRE>
                    208: 
                    209: <PRE>
                    210: };
                    211: </PRE>
                    212: 
                    213: <H2>Post Web Management</H2>
                    214: 
                    215: These functions are mainly used internally in the Library but there is
                    216: no reason for them not to be public.
                    217: 
                    218: <PRE>
                    219: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
                    220: extern BOOL HTRequest_removeDestination        (HTRequest * dest);
2.14      frystyk   221: extern BOOL HTRequest_destinationsReady (HTRequest * me);
2.1       frystyk   222: 
                    223: extern BOOL HTRequest_linkDestination (HTRequest * dest);
                    224: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
                    225: 
                    226: extern BOOL HTRequest_removePostWeb (HTRequest * me);
                    227: extern BOOL HTRequest_killPostWeb (HTRequest * me);
                    228: 
                    229: #define        HTRequest_mainDestination(me) \
                    230:        ((me) &amp;&amp; (me)->source ? (me)->source->mainDestination : NULL)
                    231: #define HTRequest_isDestination(me) \
                    232:        ((me) &amp;&amp; (me)->source &amp;&amp; (me) != (me)->source)
                    233: #define HTRequest_isMainDestination(me) \
                    234:        ((me) &amp;&amp; (me)->source &amp;&amp; \
                    235:        (me) == (me)->source->mainDestination)
                    236: #define HTRequest_isSource(me) \
                    237:        ((me) &amp;&amp; (me)->source &amp;&amp; (me) == (me)->source)
2.3       frystyk   238: #define HTRequest_isPostWeb(me) ((me) &amp;&amp; (me)->source)
                    239: #define HTRequest_source(me) ((me) ? (me)->source : NULL)
2.1       frystyk   240: </PRE>
                    241: 
                    242: End of Declaration
                    243: 
                    244: <PRE>
                    245: #endif /* HTREQMAN_H */
                    246: </PRE>
2.21      frystyk   247: 
                    248: <HR>
                    249: <ADDRESS>
2.22    ! frystyk   250: @(#) $Id: HTReqMan.html,v 2.21 1996/04/12 17:48:42 frystyk Exp $
2.21      frystyk   251: </ADDRESS>
2.1       frystyk   252: </BODY>
                    253: </HTML>

Webmaster