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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.11      frystyk     3: <TITLE>Request Object</TITLE>
2.12    ! frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen,  8-Dec-1995 -->
2.1       frystyk     5: </HEAD>
                      6: <BODY>
                      7: 
2.11      frystyk     8: <H1>Request Object</H1>
2.1       frystyk     9: 
                     10: <PRE>
                     11: /*
                     12: **     (c) COPYRIGHT MIT 1995.
                     13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
                     16: 
2.11      frystyk    17: This module is the private part of the request object. It has the
2.1       frystyk    18: functions declarations that are private to the Library and that
                     19: shouldn't be used by applications. The module has been separated from
                     20: the old HTAccess module. See also the public part of the declarition
                     21: in the <A HREF="HTReq.html">HTReq Module</A>.<P>
                     22: 
                     23: This module is implemented by <A HREF="HTReqMan.c">HTReqMan.c</A>, and
2.3       frystyk    24: it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
                     25: Reference Library</A>. <P>
2.1       frystyk    26: 
                     27: <PRE>
                     28: #ifndef HTREQMAN_H
                     29: #define HTREQMAN_H
                     30: 
                     31: #include "<A HREF="HTReq.html">HTReq.h</A>"
                     32: #include "<A HREF="HTList.html">HTList.h</A>"
                     33: #include "<A HREF="HTFormat.html">HTFormat.h</A>"
                     34: #include "<A HREF="HTAnchor.html">HTAnchor.h</A>"
                     35: #include "<A HREF="HTMethod.html">HTMethod.h</A>"
                     36: #include "<A HREF="HTAABrow.html">HTAABrow.h</A>"
                     37: #include "<A HREF="HTStream.html">HTStream.h</A>"
2.8       frystyk    38: #include "<A HREF="HTSocket.html">HTSocket.h</A>"
2.1       frystyk    39: #include "<A HREF="HTNet.html">HTNet.h</A>"
                     40: </PRE>
                     41: 
                     42: <H2><A NAME="req">The Request structure</A></H2>
                     43: 
                     44: When a request is handled, all kinds of things about it need to be
                     45: passed along together with a request. It is intended to live as long
                     46: as the request is still active, but can be deleted as soon as it has
                     47: terminated. Only the anchor object stays around after the request
                     48: itself is terminated.
                     49: 
                     50: <PRE>
                     51: struct _HTRequest {
                     52:     HTMethod           method;
                     53:     HTReload           reload;
                     54: 
                     55:     char *             redirect;                         /* Location or URI */
2.6       frystyk    56:     char *             boundary;                 /* MIME multipart boundary */
2.1       frystyk    57:     int                        retrys;               /* Number of automatic reloads */
                     58:     time_t             retry_after;             /* Absolut time for a retry */
                     59:     HTNet *            net;                /* Information about socket etc. */
2.5       frystyk    60:     HTPriority         priority;               /* Priority for this request */
2.1       frystyk    61: </PRE>
                     62: 
                     63: <H3>Accept headers</H3>
                     64: 
                     65: <PRE>
                     66:     HTList *           conversions;
                     67:     BOOL               conv_local;
                     68: 
                     69:     HTList *           encodings;
                     70:     BOOL               enc_local;
                     71: 
                     72:     HTList *           languages;
                     73:     BOOL               lang_local;
                     74: 
                     75:     HTList *           charsets;
                     76:     BOOL               char_local;
                     77: </PRE>
                     78: 
                     79: <H3>Headers and header information</H3>
                     80: 
                     81: <PRE>
                     82:     HTGnHd             GenMask;
2.12    ! frystyk    83:     HTRsHd             ResponseMask;
2.1       frystyk    84:     HTRqHd             RequestMask;
                     85:     HTEnHd             EntityMask;
2.5       frystyk    86: 
                     87:     HTList *           parsers;
                     88:     BOOL               pars_local;
                     89: 
                     90:     HTList *           generators;
                     91:     BOOL               gens_local;
2.1       frystyk    92: </PRE>
                     93: 
                     94: <H3>Anchors</H3>
                     95: 
                     96: <PRE>
2.10      frystyk    97:     char *             access;        /* The Server access for this request */
                     98:     HTParentAnchor *   anchor;        /* The Client anchor for this request */
                     99: 
2.1       frystyk   100:     HTChildAnchor *    childAnchor;        /* For element within the object */
                    101:     HTParentAnchor *   parentAnchor;                   /* For referer field */
                    102: </PRE>
                    103: 
                    104: <H3>Streams From Network to Application</H3>
                    105: 
                    106: <PRE>
                    107:     HTStream *         output_stream; 
                    108:     HTFormat           output_format;
                    109: 
                    110:     HTStream*          debug_stream;
                    111:     HTFormat           debug_format;
                    112: </PRE>
                    113: 
                    114: <H3>Streams From Application to Network</H3>
                    115: 
                    116: <PRE>
                    117:     HTStream *         input_stream; 
                    118:     HTFormat           input_format;
                    119: </PRE>
                    120: 
                    121: <H3>Callback Function for getting data down the Input Stream</H3>
                    122: 
                    123: <PRE>
2.5       frystyk   124:     HTPostCallback *   PostCallback;
2.1       frystyk   125: </PRE>
                    126: 
                    127: <H3>Context Swapping</H3>
                    128: 
                    129: <PRE>
                    130:     HTRequestCallback *        callback;
                    131:     void *             context;
                    132: </PRE>
                    133: 
                    134: <H3>Other Flags</H3>
                    135: 
                    136: <PRE>
                    137:     BOOL               preemtive;
                    138:     BOOL               ContentNegotiation;
                    139:     BOOL               using_proxy;
                    140: </PRE>
                    141: 
                    142: <H3>Error Manager</H3>
                    143: 
                    144: <PRE>
                    145:     HTList *           error_stack;                       /* List of errors */
                    146: </PRE>
                    147: 
                    148: <H3>PostWeb Information</H3>
                    149: 
                    150: <PRE>
                    151:     HTRequest *                source;              /* Source for request or itself */
                    152:     HTRequest *                mainDestination;             /* For the typical case */
                    153:     HTList *           destinations;            /* List of related requests */
                    154:     int                        destRequests;      /* Number of destination requests */
                    155:     int                        destStreams;        /* Number of destination streams */
                    156: </PRE>
                    157: 
                    158: <H3>Access Authentication Information</H3>
                    159: 
                    160: This will go into its own structure
                    161: 
                    162: <PRE>
                    163:     char *     WWWAAScheme;            /* WWW-Authenticate scheme */
                    164:     char *     WWWAARealm;             /* WWW-Authenticate realm */
                    165:     char *     WWWprotection;          /* WWW-Protection-Template */
                    166:     char *     authorization;          /* Authorization: field */
                    167:     HTAAScheme scheme;                 /* Authentication scheme used */
                    168:     HTList *   valid_schemes;          /* Valid auth.schemes             */
                    169:     HTAssocList **     scheme_specifics;/* Scheme-specific parameters    */
                    170:     char *     authenticate;           /* WWW-authenticate: field */
                    171:     char *     prot_template;          /* WWW-Protection-Template: field */
                    172:     HTAASetup *        setup;                  /* Doc protection info            */
                    173:     HTAARealm *        realm;                  /* Password realm                 */
                    174:     char *     dialog_msg;             /* Authentication prompt (client) */
                    175: 
2.10      frystyk   176: #if 0
2.1       frystyk   177:     HTInputSocket *    isoc;           /* InputSocket object for reading */
2.10      frystyk   178: #endif
2.1       frystyk   179: </PRE>
                    180: 
                    181: <H3>Windows Specific Information</H3>
                    182: 
                    183: <PRE>
2.7       frystyk   184: #ifdef WWW_WIN_ASYNC
                    185:     HWND               hwnd;           /* Windows handle for MSWindows   */
                    186:     unsigned long      winMsg;         /* msg number of Windows eloop    */
                    187: #endif /* WWW_WIN_ASYNC */
2.1       frystyk   188: </PRE>
                    189: 
                    190: <PRE>
                    191: };
                    192: </PRE>
                    193: 
                    194: <H2>Post Web Management</H2>
                    195: 
                    196: These functions are mainly used internally in the Library but there is
                    197: no reason for them not to be public.
                    198: 
                    199: <PRE>
                    200: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
                    201: extern BOOL HTRequest_removeDestination        (HTRequest * dest);
                    202: 
                    203: extern BOOL HTRequest_linkDestination (HTRequest * dest);
                    204: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
                    205: 
                    206: extern BOOL HTRequest_removePostWeb (HTRequest * me);
                    207: extern BOOL HTRequest_killPostWeb (HTRequest * me);
                    208: 
                    209: #define        HTRequest_mainDestination(me) \
                    210:        ((me) &amp;&amp; (me)->source ? (me)->source->mainDestination : NULL)
                    211: #define HTRequest_isDestination(me) \
                    212:        ((me) &amp;&amp; (me)->source &amp;&amp; (me) != (me)->source)
                    213: #define HTRequest_isMainDestination(me) \
                    214:        ((me) &amp;&amp; (me)->source &amp;&amp; \
                    215:        (me) == (me)->source->mainDestination)
                    216: #define HTRequest_isSource(me) \
                    217:        ((me) &amp;&amp; (me)->source &amp;&amp; (me) == (me)->source)
2.3       frystyk   218: #define HTRequest_isPostWeb(me) ((me) &amp;&amp; (me)->source)
                    219: #define HTRequest_source(me) ((me) ? (me)->source : NULL)
2.1       frystyk   220: </PRE>
                    221: 
                    222: End of Declaration
                    223: 
                    224: <PRE>
                    225: #endif /* HTREQMAN_H */
                    226: </PRE>
                    227: end of HTAccess
                    228: </BODY>
                    229: </HTML>

Webmaster