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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.11    ! frystyk     3: <TITLE>Request Object</TITLE>
        !             4: <!-- Changed by: Henrik Frystyk Nielsen,  4-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;
                     83:     HTRqHd             RequestMask;
                     84:     HTEnHd             EntityMask;
2.5       frystyk    85: 
                     86:     HTList *           parsers;
                     87:     BOOL               pars_local;
                     88: 
                     89:     HTList *           generators;
                     90:     BOOL               gens_local;
2.1       frystyk    91: </PRE>
                     92: 
                     93: <H3>Anchors</H3>
                     94: 
                     95: <PRE>
2.10      frystyk    96:     char *             access;        /* The Server access for this request */
                     97:     HTParentAnchor *   anchor;        /* The Client anchor for this request */
                     98: 
2.1       frystyk    99:     HTChildAnchor *    childAnchor;        /* For element within the object */
                    100:     HTParentAnchor *   parentAnchor;                   /* For referer field */
                    101: </PRE>
                    102: 
                    103: <H3>Streams From Network to Application</H3>
                    104: 
                    105: <PRE>
                    106:     HTStream *         output_stream; 
                    107:     HTFormat           output_format;
                    108: 
                    109:     HTStream*          debug_stream;
                    110:     HTFormat           debug_format;
                    111: </PRE>
                    112: 
                    113: <H3>Streams From Application to Network</H3>
                    114: 
                    115: <PRE>
                    116:     HTStream *         input_stream; 
                    117:     HTFormat           input_format;
                    118: </PRE>
                    119: 
                    120: <H3>Callback Function for getting data down the Input Stream</H3>
                    121: 
                    122: <PRE>
2.5       frystyk   123:     HTPostCallback *   PostCallback;
2.1       frystyk   124: </PRE>
                    125: 
                    126: <H3>Context Swapping</H3>
                    127: 
                    128: <PRE>
                    129:     HTRequestCallback *        callback;
                    130:     void *             context;
                    131: </PRE>
                    132: 
                    133: <H3>Other Flags</H3>
                    134: 
                    135: <PRE>
                    136:     BOOL               preemtive;
                    137:     BOOL               ContentNegotiation;
                    138:     BOOL               using_proxy;
                    139: </PRE>
                    140: 
                    141: <H3>Error Manager</H3>
                    142: 
                    143: <PRE>
                    144:     HTList *           error_stack;                       /* List of errors */
                    145: </PRE>
                    146: 
                    147: <H3>PostWeb Information</H3>
                    148: 
                    149: <PRE>
                    150:     HTRequest *                source;              /* Source for request or itself */
                    151:     HTRequest *                mainDestination;             /* For the typical case */
                    152:     HTList *           destinations;            /* List of related requests */
                    153:     int                        destRequests;      /* Number of destination requests */
                    154:     int                        destStreams;        /* Number of destination streams */
                    155: </PRE>
                    156: 
                    157: <H3>Access Authentication Information</H3>
                    158: 
                    159: This will go into its own structure
                    160: 
                    161: <PRE>
                    162:     char *     WWWAAScheme;            /* WWW-Authenticate scheme */
                    163:     char *     WWWAARealm;             /* WWW-Authenticate realm */
                    164:     char *     WWWprotection;          /* WWW-Protection-Template */
                    165:     char *     authorization;          /* Authorization: field */
                    166:     HTAAScheme scheme;                 /* Authentication scheme used */
                    167:     HTList *   valid_schemes;          /* Valid auth.schemes             */
                    168:     HTAssocList **     scheme_specifics;/* Scheme-specific parameters    */
                    169:     char *     authenticate;           /* WWW-authenticate: field */
                    170:     char *     prot_template;          /* WWW-Protection-Template: field */
                    171:     HTAASetup *        setup;                  /* Doc protection info            */
                    172:     HTAARealm *        realm;                  /* Password realm                 */
                    173:     char *     dialog_msg;             /* Authentication prompt (client) */
                    174: 
2.10      frystyk   175: #if 0
2.1       frystyk   176:     HTInputSocket *    isoc;           /* InputSocket object for reading */
2.10      frystyk   177: #endif
2.1       frystyk   178: </PRE>
                    179: 
                    180: <H3>Windows Specific Information</H3>
                    181: 
                    182: <PRE>
2.7       frystyk   183: #ifdef WWW_WIN_ASYNC
                    184:     HWND               hwnd;           /* Windows handle for MSWindows   */
                    185:     unsigned long      winMsg;         /* msg number of Windows eloop    */
                    186: #endif /* WWW_WIN_ASYNC */
2.1       frystyk   187: </PRE>
                    188: 
                    189: <PRE>
                    190: };
                    191: </PRE>
                    192: 
                    193: <H2>Post Web Management</H2>
                    194: 
                    195: These functions are mainly used internally in the Library but there is
                    196: no reason for them not to be public.
                    197: 
                    198: <PRE>
                    199: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
                    200: extern BOOL HTRequest_removeDestination        (HTRequest * dest);
                    201: 
                    202: extern BOOL HTRequest_linkDestination (HTRequest * dest);
                    203: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
                    204: 
                    205: extern BOOL HTRequest_removePostWeb (HTRequest * me);
                    206: extern BOOL HTRequest_killPostWeb (HTRequest * me);
                    207: 
                    208: #define        HTRequest_mainDestination(me) \
                    209:        ((me) &amp;&amp; (me)->source ? (me)->source->mainDestination : NULL)
                    210: #define HTRequest_isDestination(me) \
                    211:        ((me) &amp;&amp; (me)->source &amp;&amp; (me) != (me)->source)
                    212: #define HTRequest_isMainDestination(me) \
                    213:        ((me) &amp;&amp; (me)->source &amp;&amp; \
                    214:        (me) == (me)->source->mainDestination)
                    215: #define HTRequest_isSource(me) \
                    216:        ((me) &amp;&amp; (me)->source &amp;&amp; (me) == (me)->source)
2.3       frystyk   217: #define HTRequest_isPostWeb(me) ((me) &amp;&amp; (me)->source)
                    218: #define HTRequest_source(me) ((me) ? (me)->source : NULL)
2.1       frystyk   219: </PRE>
                    220: 
                    221: End of Declaration
                    222: 
                    223: <PRE>
                    224: #endif /* HTREQMAN_H */
                    225: </PRE>
                    226: end of HTAccess
                    227: </BODY>
                    228: </HTML>

Webmaster