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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.32      frystyk     3:   <!-- Changed by: Henrik Frystyk Nielsen, 15-Jul-1996 -->
2.23      frystyk     4:   <TITLE>W3C Reference Library libwww Private Request Definition</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
2.23      frystyk     7: <H1>
                      8:   Private Request Definition
                      9: </H1>
2.1       frystyk    10: <PRE>
                     11: /*
                     12: **     (c) COPYRIGHT MIT 1995.
                     13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
2.23      frystyk    16: <P>
                     17: This module is the private part of the request object. It has the functions
                     18: declarations that are private to the Library and that shouldn't be used by
                     19: applications. The module has been separated from the old HTAccess module.
                     20: See also the public part of the declarition in the <A HREF="HTReq.html">HTReq
                     21: Module</A>.
                     22: <P>
                     23: This module is implemented by <A HREF="HTReqMan.c">HTReqMan.c</A>, and it
                     24: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C Reference
                     25: Library</A>.
2.1       frystyk    26: <PRE>
                     27: #ifndef HTREQMAN_H
                     28: #define HTREQMAN_H
                     29: 
                     30: #include "<A HREF="HTReq.html">HTReq.h</A>"
                     31: #include "<A HREF="HTList.html">HTList.h</A>"
                     32: #include "<A HREF="HTFormat.html">HTFormat.h</A>"
                     33: #include "<A HREF="HTAnchor.html">HTAnchor.h</A>"
                     34: #include "<A HREF="HTMethod.html">HTMethod.h</A>"
                     35: #include "<A HREF="HTAABrow.html">HTAABrow.h</A>"
                     36: #include "<A HREF="HTStream.html">HTStream.h</A>"
                     37: #include "<A HREF="HTNet.html">HTNet.h</A>"
2.25      eric       38: #include "<A HREF="HTMIMPrs.html">HTMIMPrs.h</A>"
2.1       frystyk    39: </PRE>
2.23      frystyk    40: <P>
                     41: When a request is handled, all kinds of things about it need to be passed
                     42: along together with a request. It is intended to live as long as the request
                     43: is still active, but can be deleted as soon as it has terminated. Only the
                     44: anchor object stays around after the request itself is terminated.
2.1       frystyk    45: <PRE>
                     46: struct _HTRequest {
2.14      frystyk    47: 
                     48:     BOOL               internal;      /* Does the app knows about this one? */
                     49: 
2.33    ! frystyk    50:     time_t             date;      /* Time stamp when the request was issued */
        !            51: 
2.1       frystyk    52:     HTMethod           method;
                     53:     HTReload           reload;
                     54: 
                     55:     int                        retrys;               /* Number of automatic reloads */
                     56:     time_t             retry_after;             /* Absolut time for a retry */
                     57:     HTNet *            net;                /* Information about socket etc. */
2.5       frystyk    58:     HTPriority         priority;               /* Priority for this request */
2.1       frystyk    59: </PRE>
2.23      frystyk    60: <H3>
                     61:   User Profile
                     62: </H3>
                     63: <P>
                     64: Each request can be assigned a <A HREF="HTUser.html">user profile</A> containing
                     65: information about this host and the user issuing the request.
                     66: <PRE>
                     67:     HTUserProfile *    userprofile;
                     68: </PRE>
                     69: <H3>
                     70:   Accept headers
                     71: </H3>
2.1       frystyk    72: <PRE>
                     73:     HTList *           conversions;
                     74:     BOOL               conv_local;
                     75: 
                     76:     HTList *           encodings;
                     77:     BOOL               enc_local;
                     78: 
2.22      frystyk    79:     HTList *           ctes;
                     80:     BOOL               cte_local;
2.21      frystyk    81: 
2.1       frystyk    82:     HTList *           languages;
                     83:     BOOL               lang_local;
                     84: 
                     85:     HTList *           charsets;
                     86:     BOOL               char_local;
2.20      hallam     87: 
                     88:     HTList *           befores;
                     89:     BOOL               befores_local;
                     90: 
                     91:     HTList *           afters;
                     92:     BOOL               afters_local;
2.1       frystyk    93: </PRE>
2.23      frystyk    94: <H3>
                     95:   Headers and header information
                     96: </H3>
2.1       frystyk    97: <PRE>
                     98:     HTGnHd             GenMask;
2.12      frystyk    99:     HTRsHd             ResponseMask;
2.1       frystyk   100:     HTRqHd             RequestMask;
                    101:     HTEnHd             EntityMask;
2.5       frystyk   102: 
2.25      eric      103:     HTMIMEParseSet *   parseSet;
2.5       frystyk   104:     BOOL               pars_local;
                    105: 
                    106:     HTList *           generators;
                    107:     BOOL               gens_local;
2.1       frystyk   108: </PRE>
2.23      frystyk   109: <H3>
                    110:   Anchors
                    111: </H3>
2.1       frystyk   112: <PRE>
2.10      frystyk   113:     HTParentAnchor *   anchor;        /* The Client anchor for this request */
                    114: 
2.1       frystyk   115:     HTChildAnchor *    childAnchor;        /* For element within the object */
                    116:     HTParentAnchor *   parentAnchor;                   /* For referer field */
                    117: </PRE>
2.23      frystyk   118: <H4>
                    119:   Redirection
                    120: </H4>
                    121: <P>
                    122: If we get a redirection back then we return the new destination for this
                    123: request to the application using this anchor.
2.14      frystyk   124: <PRE>
                    125:     HTAnchor *         redirectionAnchor;                /* Redirection URL */
                    126: </PRE>
2.23      frystyk   127: <H3>
                    128:   Streams From Network to Application
                    129: </H3>
2.1       frystyk   130: <PRE>
                    131:     HTStream *         output_stream; 
                    132:     HTFormat           output_format;
2.26      frystyk   133:     BOOL               connected;
2.1       frystyk   134: 
                    135:     HTStream*          debug_stream;
                    136:     HTFormat           debug_format;
                    137: </PRE>
2.23      frystyk   138: <H3>
                    139:   Streams From Application to Network
                    140: </H3>
2.1       frystyk   141: <PRE>
                    142:     HTStream *         input_stream; 
                    143:     HTFormat           input_format;
                    144: </PRE>
2.23      frystyk   145: <H3>
                    146:   Callback Function for getting data down the Input Stream
                    147: </H3>
2.1       frystyk   148: <PRE>
2.5       frystyk   149:     HTPostCallback *   PostCallback;
2.1       frystyk   150: </PRE>
2.23      frystyk   151: <H3>
                    152:   Context Swapping
                    153: </H3>
2.1       frystyk   154: <PRE>
                    155:     HTRequestCallback *        callback;
                    156:     void *             context;
                    157: </PRE>
2.23      frystyk   158: <H3>
                    159:   Other Flags
                    160: </H3>
2.1       frystyk   161: <PRE>
2.13      frystyk   162:     BOOL               preemptive;
2.1       frystyk   163:     BOOL               ContentNegotiation;
2.29      frystyk   164: 
                    165:     BOOL                full_uri;
                    166:     char *             proxy;
2.30      frystyk   167: 
                    168:     int                 max_forwards;
2.1       frystyk   169: </PRE>
2.23      frystyk   170: <H3>
                    171:   Error Manager
                    172: </H3>
2.1       frystyk   173: <PRE>
                    174:     HTList *           error_stack;                       /* List of errors */
                    175: </PRE>
2.23      frystyk   176: <H3>
                    177:   PostWeb Information
                    178: </H3>
2.1       frystyk   179: <PRE>
                    180:     HTRequest *                source;              /* Source for request or itself */
2.16      frystyk   181:     HTParentAnchor *   source_anchor;            /* Source anchor or itself */
                    182: 
2.1       frystyk   183:     HTRequest *                mainDestination;             /* For the typical case */
                    184:     HTList *           destinations;            /* List of related requests */
                    185:     int                        destRequests;      /* Number of destination requests */
                    186:     int                        destStreams;        /* Number of destination streams */
                    187: </PRE>
2.23      frystyk   188: <H3>
2.32      frystyk   189:   Cache Control Directives
                    190: </H3>
                    191: <P>
                    192: This association list is a list of the cache control directives that are
                    193: to be sent as part of the <CODE>Cache-Control</CODE> header.
2.33    ! frystyk   194: <CODE>Cache-control</CODE> directives can be sent in both directions - we
        !           195: keep the out-going ones here and the incoming becomes part of the
        !           196: <A HREF="HTAnchor.html">anchor object</A>.
        !           197: <PRE>
        !           198:     HTAssocList *       cache_control;
        !           199: </PRE>
        !           200: <H3>
        !           201:   Original Header Values
        !           202: </H3>
        !           203: <P>
        !           204: The cache uses (for the moment) the original header values when it creates
        !           205: a cache entry. We can pass the headers to the cache manager using this list
        !           206: <PRE>
        !           207:     HTAssocList *      headers;
2.32      frystyk   208: </PRE>
                    209: <H3>
                    210:   Connection Control Directives
                    211: </H3>
                    212: <P>
2.33    ! frystyk   213: This association list is a list of the connection control directives that
        !           214: are to be sent as part of the <CODE>Connection</CODE> header.
        !           215: <CODE>Connection</CODE> directives can be sent in both directions - that
        !           216: is - from the server to the client and vise-verse. In order to separate outgoing
        !           217: from incoming connections directives, we keep two lists - one for outgoing
        !           218: and one for incoming.
        !           219: <PRE>
        !           220:     HTAssocList *       client_connection;
        !           221:     HTAssocList *       server_connection;
2.32      frystyk   222: </PRE>
                    223: <H3>
2.23      frystyk   224:   Access Authentication Information
                    225: </H3>
                    226: <P>
                    227: The <CODE>challenge</CODE> and the <CODE>credentials</CODE> entries are use
2.27      frystyk   228: by the authentication parsers and generators respectively.
2.28      frystyk   229: <PRE>    char *                realm;                              /* Current realm */
2.27      frystyk   230:     char *             scheme;                            /* Current scheme */
2.18      frystyk   231: 
2.17      frystyk   232:     HTAssocList *      challenge;           /* Challenge received by client */
                    233:     HTAssocList *      credentials;       /* Credentials received by server */
2.1       frystyk   234: </PRE>
2.23      frystyk   235: <H3>
2.28      frystyk   236:   Protocol Extension Protocol (PEP) Information
                    237: </H3>
2.31      frystyk   238: <PRE>
                    239:     HTAssocList *      protocol;
2.28      frystyk   240:     HTAssocList *      protocol_info;
                    241:     HTAssocList *      protocol_request;
2.33    ! frystyk   242: </PRE>
        !           243: <P>
        !           244: As a small alternative to the PEP protocol headers, we also support the extension
        !           245: header which works pretty much the same way but is somewhat simpler in use.
        !           246: <PRE>
        !           247:     HTAssocList *       client_extension;
        !           248:     HTAssocList *       server_extension;
2.28      frystyk   249: </PRE>
                    250: <H3>
2.23      frystyk   251:   Windows Specific Information
                    252: </H3>
2.1       frystyk   253: <PRE>
2.7       frystyk   254: #ifdef WWW_WIN_ASYNC
                    255:     HWND               hwnd;           /* Windows handle for MSWindows   */
                    256:     unsigned long      winMsg;         /* msg number of Windows eloop    */
                    257: #endif /* WWW_WIN_ASYNC */
2.1       frystyk   258: </PRE>
                    259: <PRE>
                    260: };
                    261: </PRE>
2.23      frystyk   262: <H2>
                    263:   Post Web Management
                    264: </H2>
                    265: <P>
                    266: These functions are mainly used internally in the Library but there is no
                    267: reason for them not to be public.
2.1       frystyk   268: <PRE>
                    269: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
                    270: extern BOOL HTRequest_removeDestination        (HTRequest * dest);
2.14      frystyk   271: extern BOOL HTRequest_destinationsReady (HTRequest * me);
2.1       frystyk   272: 
                    273: extern BOOL HTRequest_linkDestination (HTRequest * dest);
                    274: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
                    275: 
                    276: extern BOOL HTRequest_removePostWeb (HTRequest * me);
                    277: extern BOOL HTRequest_killPostWeb (HTRequest * me);
                    278: 
                    279: #define        HTRequest_mainDestination(me) \
2.23      frystyk   280:        ((me) &amp;&amp; (me)-&gt;source ? (me)-&gt;source-&gt;mainDestination : NULL)
2.1       frystyk   281: #define HTRequest_isDestination(me) \
2.23      frystyk   282:        ((me) &amp;&amp; (me)-&gt;source &amp;&amp; (me) != (me)-&gt;source)
2.1       frystyk   283: #define HTRequest_isMainDestination(me) \
2.23      frystyk   284:        ((me) &amp;&amp; (me)-&gt;source &amp;&amp; \
                    285:        (me) == (me)-&gt;source-&gt;mainDestination)
2.1       frystyk   286: #define HTRequest_isSource(me) \
2.23      frystyk   287:        ((me) &amp;&amp; (me)-&gt;source &amp;&amp; (me) == (me)-&gt;source)
2.1       frystyk   288: </PRE>
2.23      frystyk   289: <P>
2.1       frystyk   290: End of Declaration
                    291: <PRE>
                    292: #endif /* HTREQMAN_H */
                    293: </PRE>
2.23      frystyk   294: <P>
                    295:   <HR>
2.21      frystyk   296: <ADDRESS>
2.33    ! frystyk   297:   @(#) $Id: HTReqMan.html,v 2.32 1996/08/24 18:10:16 frystyk Exp $
2.21      frystyk   298: </ADDRESS>
2.23      frystyk   299: </BODY></HTML>

Webmaster