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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.28    ! 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.1       frystyk    50:     HTMethod           method;
                     51:     HTReload           reload;
                     52: 
                     53:     int                        retrys;               /* Number of automatic reloads */
                     54:     time_t             retry_after;             /* Absolut time for a retry */
                     55:     HTNet *            net;                /* Information about socket etc. */
2.5       frystyk    56:     HTPriority         priority;               /* Priority for this request */
2.1       frystyk    57: </PRE>
2.23      frystyk    58: <H3>
                     59:   User Profile
                     60: </H3>
                     61: <P>
                     62: Each request can be assigned a <A HREF="HTUser.html">user profile</A> containing
                     63: information about this host and the user issuing the request.
                     64: <PRE>
                     65:     HTUserProfile *    userprofile;
                     66: </PRE>
                     67: <H3>
                     68:   Accept headers
                     69: </H3>
2.1       frystyk    70: <PRE>
                     71:     HTList *           conversions;
                     72:     BOOL               conv_local;
                     73: 
                     74:     HTList *           encodings;
                     75:     BOOL               enc_local;
                     76: 
2.22      frystyk    77:     HTList *           ctes;
                     78:     BOOL               cte_local;
2.21      frystyk    79: 
2.1       frystyk    80:     HTList *           languages;
                     81:     BOOL               lang_local;
                     82: 
                     83:     HTList *           charsets;
                     84:     BOOL               char_local;
2.20      hallam     85: 
                     86:     HTList *           befores;
                     87:     BOOL               befores_local;
                     88: 
                     89:     HTList *           afters;
                     90:     BOOL               afters_local;
2.1       frystyk    91: </PRE>
2.23      frystyk    92: <H3>
                     93:   Headers and header information
                     94: </H3>
2.1       frystyk    95: <PRE>
                     96:     HTGnHd             GenMask;
2.12      frystyk    97:     HTRsHd             ResponseMask;
2.1       frystyk    98:     HTRqHd             RequestMask;
                     99:     HTEnHd             EntityMask;
2.5       frystyk   100: 
2.25      eric      101:     HTMIMEParseSet *   parseSet;
2.5       frystyk   102:     BOOL               pars_local;
                    103: 
                    104:     HTList *           generators;
                    105:     BOOL               gens_local;
2.1       frystyk   106: </PRE>
2.23      frystyk   107: <H3>
                    108:   Anchors
                    109: </H3>
2.1       frystyk   110: <PRE>
2.10      frystyk   111:     HTParentAnchor *   anchor;        /* The Client anchor for this request */
                    112: 
2.1       frystyk   113:     HTChildAnchor *    childAnchor;        /* For element within the object */
                    114:     HTParentAnchor *   parentAnchor;                   /* For referer field */
                    115: </PRE>
2.23      frystyk   116: <H4>
                    117:   Redirection
                    118: </H4>
                    119: <P>
                    120: If we get a redirection back then we return the new destination for this
                    121: request to the application using this anchor.
2.14      frystyk   122: <PRE>
                    123:     HTAnchor *         redirectionAnchor;                /* Redirection URL */
                    124: </PRE>
2.23      frystyk   125: <H3>
                    126:   Streams From Network to Application
                    127: </H3>
2.1       frystyk   128: <PRE>
                    129:     HTStream *         output_stream; 
                    130:     HTFormat           output_format;
2.26      frystyk   131:     BOOL               connected;
2.1       frystyk   132: 
                    133:     HTStream*          debug_stream;
                    134:     HTFormat           debug_format;
                    135: </PRE>
2.23      frystyk   136: <H3>
                    137:   Streams From Application to Network
                    138: </H3>
2.1       frystyk   139: <PRE>
                    140:     HTStream *         input_stream; 
                    141:     HTFormat           input_format;
                    142: </PRE>
2.23      frystyk   143: <H3>
                    144:   Callback Function for getting data down the Input Stream
                    145: </H3>
2.1       frystyk   146: <PRE>
2.5       frystyk   147:     HTPostCallback *   PostCallback;
2.1       frystyk   148: </PRE>
2.23      frystyk   149: <H3>
                    150:   Context Swapping
                    151: </H3>
2.1       frystyk   152: <PRE>
                    153:     HTRequestCallback *        callback;
                    154:     void *             context;
                    155: </PRE>
2.23      frystyk   156: <H3>
                    157:   Other Flags
                    158: </H3>
2.1       frystyk   159: <PRE>
2.13      frystyk   160:     BOOL               preemptive;
2.1       frystyk   161:     BOOL               ContentNegotiation;
                    162:     BOOL               using_proxy;
                    163: </PRE>
2.23      frystyk   164: <H3>
                    165:   Error Manager
                    166: </H3>
2.1       frystyk   167: <PRE>
                    168:     HTList *           error_stack;                       /* List of errors */
                    169: </PRE>
2.23      frystyk   170: <H3>
                    171:   PostWeb Information
                    172: </H3>
2.1       frystyk   173: <PRE>
                    174:     HTRequest *                source;              /* Source for request or itself */
2.16      frystyk   175:     HTParentAnchor *   source_anchor;            /* Source anchor or itself */
                    176: 
2.1       frystyk   177:     HTRequest *                mainDestination;             /* For the typical case */
                    178:     HTList *           destinations;            /* List of related requests */
                    179:     int                        destRequests;      /* Number of destination requests */
                    180:     int                        destStreams;        /* Number of destination streams */
                    181: </PRE>
2.23      frystyk   182: <H3>
                    183:   Access Authentication Information
                    184: </H3>
                    185: <P>
                    186: The <CODE>challenge</CODE> and the <CODE>credentials</CODE> entries are use
2.27      frystyk   187: by the authentication parsers and generators respectively.
2.28    ! frystyk   188: <PRE>    char *                realm;                              /* Current realm */
2.27      frystyk   189:     char *             scheme;                            /* Current scheme */
2.18      frystyk   190: 
2.17      frystyk   191:     HTAssocList *      challenge;           /* Challenge received by client */
                    192:     HTAssocList *      credentials;       /* Credentials received by server */
2.1       frystyk   193: </PRE>
2.23      frystyk   194: <H3>
2.28    ! frystyk   195:   Protocol Extension Protocol (PEP) Information
        !           196: </H3>
        !           197: <PRE>    HTAssocList * protocol;
        !           198:     HTAssocList *      protocol_info;
        !           199:     HTAssocList *      protocol_request;
        !           200: </PRE>
        !           201: <H3>
2.23      frystyk   202:   Windows Specific Information
                    203: </H3>
2.1       frystyk   204: <PRE>
2.7       frystyk   205: #ifdef WWW_WIN_ASYNC
                    206:     HWND               hwnd;           /* Windows handle for MSWindows   */
                    207:     unsigned long      winMsg;         /* msg number of Windows eloop    */
                    208: #endif /* WWW_WIN_ASYNC */
2.1       frystyk   209: </PRE>
                    210: <PRE>
                    211: };
                    212: </PRE>
2.23      frystyk   213: <H2>
                    214:   Post Web Management
                    215: </H2>
                    216: <P>
                    217: These functions are mainly used internally in the Library but there is no
                    218: reason for them not to be public.
2.1       frystyk   219: <PRE>
                    220: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
                    221: extern BOOL HTRequest_removeDestination        (HTRequest * dest);
2.14      frystyk   222: extern BOOL HTRequest_destinationsReady (HTRequest * me);
2.1       frystyk   223: 
                    224: extern BOOL HTRequest_linkDestination (HTRequest * dest);
                    225: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
                    226: 
                    227: extern BOOL HTRequest_removePostWeb (HTRequest * me);
                    228: extern BOOL HTRequest_killPostWeb (HTRequest * me);
                    229: 
                    230: #define        HTRequest_mainDestination(me) \
2.23      frystyk   231:        ((me) &amp;&amp; (me)-&gt;source ? (me)-&gt;source-&gt;mainDestination : NULL)
2.1       frystyk   232: #define HTRequest_isDestination(me) \
2.23      frystyk   233:        ((me) &amp;&amp; (me)-&gt;source &amp;&amp; (me) != (me)-&gt;source)
2.1       frystyk   234: #define HTRequest_isMainDestination(me) \
2.23      frystyk   235:        ((me) &amp;&amp; (me)-&gt;source &amp;&amp; \
                    236:        (me) == (me)-&gt;source-&gt;mainDestination)
2.1       frystyk   237: #define HTRequest_isSource(me) \
2.23      frystyk   238:        ((me) &amp;&amp; (me)-&gt;source &amp;&amp; (me) == (me)-&gt;source)
2.1       frystyk   239: </PRE>
2.23      frystyk   240: <P>
2.1       frystyk   241: End of Declaration
                    242: <PRE>
                    243: #endif /* HTREQMAN_H */
                    244: </PRE>
2.23      frystyk   245: <P>
                    246:   <HR>
2.21      frystyk   247: <ADDRESS>
2.28    ! frystyk   248:   @(#) $Id: HTReqMan.html,v 2.27 1996/07/08 19:10:57 frystyk Exp $
2.21      frystyk   249: </ADDRESS>
2.23      frystyk   250: </BODY></HTML>

Webmaster