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

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

Webmaster