Annotation of libwww/Library/src/HTReqMan.html, revision 2.1
2.1 ! frystyk 1: <HTML>
! 2: <HEAD>
! 3: <TITLE>Request Manager</TITLE>
! 4: <!-- Changed by: Henrik Frystyk Nielsen, 8-Sep-1995 -->
! 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
! 25: it is a part of the <A HREF="http://www.w3.org/hypertext/WWW/Library/">
! 26: W3C Reference Library</A>. <P>
! 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>"
! 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: typedef int HTPostCbf (HTRequest *request, HTStream * target);
! 52:
! 53: struct _HTRequest {
! 54: HTMethod method;
! 55: HTReload reload;
! 56:
! 57: char * redirect; /* Location or URI */
! 58: int retrys; /* Number of automatic reloads */
! 59: time_t retry_after; /* Absolut time for a retry */
! 60: HTNet * net; /* Information about socket etc. */
! 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;
! 85: char * ExtraHeaders;
! 86: </PRE>
! 87:
! 88: <H3>Anchors</H3>
! 89:
! 90: <PRE>
! 91: HTParentAnchor * anchor;
! 92: HTChildAnchor * childAnchor; /* For element within the object */
! 93: HTParentAnchor * parentAnchor; /* For referer field */
! 94: </PRE>
! 95:
! 96: <H3>Streams From Network to Application</H3>
! 97:
! 98: <PRE>
! 99: HTStream * output_stream;
! 100: HTFormat output_format;
! 101:
! 102: HTStream* debug_stream;
! 103: HTFormat debug_format;
! 104: </PRE>
! 105:
! 106: <H3>Streams From Application to Network</H3>
! 107:
! 108: <PRE>
! 109: HTStream * input_stream;
! 110: HTFormat input_format;
! 111: </PRE>
! 112:
! 113: <H3>Callback Function for getting data down the Input Stream</H3>
! 114:
! 115: <PRE>
! 116: HTPostCbf * PostCallBack;
! 117: </PRE>
! 118:
! 119: <H3>Context Swapping</H3>
! 120:
! 121: <PRE>
! 122: HTRequestCallback * callback;
! 123: void * context;
! 124: </PRE>
! 125:
! 126: <H3>Other Flags</H3>
! 127:
! 128: <PRE>
! 129: BOOL preemtive;
! 130: BOOL ContentNegotiation;
! 131: BOOL using_proxy;
! 132: </PRE>
! 133:
! 134: <H3>Error Manager</H3>
! 135:
! 136: <PRE>
! 137: HTList * error_stack; /* List of errors */
! 138: </PRE>
! 139:
! 140: <H3>PostWeb Information</H3>
! 141:
! 142: <PRE>
! 143: HTRequest * source; /* Source for request or itself */
! 144: HTRequest * mainDestination; /* For the typical case */
! 145: HTList * destinations; /* List of related requests */
! 146: int destRequests; /* Number of destination requests */
! 147: int destStreams; /* Number of destination streams */
! 148: </PRE>
! 149:
! 150: <H3>Access Authentication Information</H3>
! 151:
! 152: This will go into its own structure
! 153:
! 154: <PRE>
! 155: char * WWWAAScheme; /* WWW-Authenticate scheme */
! 156: char * WWWAARealm; /* WWW-Authenticate realm */
! 157: char * WWWprotection; /* WWW-Protection-Template */
! 158: char * authorization; /* Authorization: field */
! 159: HTAAScheme scheme; /* Authentication scheme used */
! 160: HTList * valid_schemes; /* Valid auth.schemes */
! 161: HTAssocList ** scheme_specifics;/* Scheme-specific parameters */
! 162: char * authenticate; /* WWW-authenticate: field */
! 163: char * prot_template; /* WWW-Protection-Template: field */
! 164: HTAASetup * setup; /* Doc protection info */
! 165: HTAARealm * realm; /* Password realm */
! 166: char * dialog_msg; /* Authentication prompt (client) */
! 167:
! 168: HTInputSocket * isoc; /* InputSocket object for reading */
! 169: </PRE>
! 170:
! 171: <H3>Windows Specific Information</H3>
! 172:
! 173: <PRE>
! 174: #ifdef _WINDOWS
! 175: HWND hwnd; /* Windows handle for MSWindows */
! 176: unsigned long winMsg; /* msg number of Windows eloop */
! 177: #endif /* _WINDOWS */
! 178: </PRE>
! 179:
! 180: <PRE>
! 181: };
! 182: </PRE>
! 183:
! 184: <H2>Post Web Management</H2>
! 185:
! 186: These functions are mainly used internally in the Library but there is
! 187: no reason for them not to be public.
! 188:
! 189: <PRE>
! 190: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
! 191: extern BOOL HTRequest_removeDestination (HTRequest * dest);
! 192:
! 193: extern BOOL HTRequest_linkDestination (HTRequest * dest);
! 194: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
! 195:
! 196: extern BOOL HTRequest_removePostWeb (HTRequest * me);
! 197: extern BOOL HTRequest_killPostWeb (HTRequest * me);
! 198:
! 199: #define HTRequest_mainDestination(me) \
! 200: ((me) && (me)->source ? (me)->source->mainDestination : NULL)
! 201: #define HTRequest_isDestination(me) \
! 202: ((me) && (me)->source && (me) != (me)->source)
! 203: #define HTRequest_isMainDestination(me) \
! 204: ((me) && (me)->source && \
! 205: (me) == (me)->source->mainDestination)
! 206: #define HTRequest_isSource(me) \
! 207: ((me) && (me)->source && (me) == (me)->source)
! 208: #define HTRequest_isPostWeb(me) \
! 209: ((me) && (me)->source)
! 210: </PRE>
! 211:
! 212: End of Declaration
! 213:
! 214: <PRE>
! 215: #endif /* HTREQMAN_H */
! 216: </PRE>
! 217: end of HTAccess
! 218: </BODY>
! 219: </HTML>
Webmaster