Annotation of libwww/Library/src/HTReqMan.html, revision 2.23
2.1 frystyk 1: <HTML>
2: <HEAD>
2.23 ! frystyk 3: <!-- Changed by: Henrik Frystyk Nielsen, 19-May-1996 -->
! 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>"
38: </PRE>
2.23 ! frystyk 39: <P>
! 40: When a request is handled, all kinds of things about it need to be passed
! 41: along together with a request. It is intended to live as long as the request
! 42: is still active, but can be deleted as soon as it has terminated. Only the
! 43: anchor object stays around after the request itself is terminated.
2.1 frystyk 44: <PRE>
45: struct _HTRequest {
2.14 frystyk 46:
47: BOOL internal; /* Does the app knows about this one? */
48:
2.1 frystyk 49: HTMethod method;
50: HTReload reload;
51:
2.6 frystyk 52: char * boundary; /* MIME multipart boundary */
2.1 frystyk 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:
101: HTList * parsers;
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;
131:
132: HTStream* debug_stream;
133: HTFormat debug_format;
134: </PRE>
2.23 ! frystyk 135: <H3>
! 136: Streams From Application to Network
! 137: </H3>
2.1 frystyk 138: <PRE>
139: HTStream * input_stream;
140: HTFormat input_format;
141: </PRE>
2.23 ! frystyk 142: <H3>
! 143: Callback Function for getting data down the Input Stream
! 144: </H3>
2.1 frystyk 145: <PRE>
2.5 frystyk 146: HTPostCallback * PostCallback;
2.1 frystyk 147: </PRE>
2.23 ! frystyk 148: <H3>
! 149: Context Swapping
! 150: </H3>
2.1 frystyk 151: <PRE>
152: HTRequestCallback * callback;
153: void * context;
154: </PRE>
2.23 ! frystyk 155: <H3>
! 156: Other Flags
! 157: </H3>
2.1 frystyk 158: <PRE>
2.13 frystyk 159: BOOL preemptive;
2.1 frystyk 160: BOOL ContentNegotiation;
161: BOOL using_proxy;
162: </PRE>
2.23 ! frystyk 163: <H3>
! 164: Error Manager
! 165: </H3>
2.1 frystyk 166: <PRE>
167: HTList * error_stack; /* List of errors */
168: </PRE>
2.23 ! frystyk 169: <H3>
! 170: PostWeb Information
! 171: </H3>
2.1 frystyk 172: <PRE>
173: HTRequest * source; /* Source for request or itself */
2.16 frystyk 174: HTParentAnchor * source_anchor; /* Source anchor or itself */
175:
2.1 frystyk 176: HTRequest * mainDestination; /* For the typical case */
177: HTList * destinations; /* List of related requests */
178: int destRequests; /* Number of destination requests */
179: int destStreams; /* Number of destination streams */
180: </PRE>
2.23 ! frystyk 181: <H3>
! 182: Access Authentication Information
! 183: </H3>
! 184: <P>
! 185: The <CODE>challenge</CODE> and the <CODE>credentials</CODE> entries are use
! 186: by the authentication parsers and generators respectively. It is required
! 187: to have a <CODE>scheme</CODE> in order to find a parser for an authentication
! 188: scheme.
2.1 frystyk 189: <PRE>
2.17 frystyk 190: char * scheme; /* Current authentication scheme */
191: char * realm; /* Current realm */
2.18 frystyk 192:
2.17 frystyk 193: HTAssocList * challenge; /* Challenge received by client */
194: HTAssocList * credentials; /* Credentials received by server */
2.1 frystyk 195: </PRE>
2.23 ! frystyk 196: <H3>
! 197: Windows Specific Information
! 198: </H3>
2.1 frystyk 199: <PRE>
2.7 frystyk 200: #ifdef WWW_WIN_ASYNC
201: HWND hwnd; /* Windows handle for MSWindows */
202: unsigned long winMsg; /* msg number of Windows eloop */
203: #endif /* WWW_WIN_ASYNC */
2.1 frystyk 204: </PRE>
205: <PRE>
206: };
207: </PRE>
2.23 ! frystyk 208: <H2>
! 209: Post Web Management
! 210: </H2>
! 211: <P>
! 212: These functions are mainly used internally in the Library but there is no
! 213: reason for them not to be public.
2.1 frystyk 214: <PRE>
215: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
216: extern BOOL HTRequest_removeDestination (HTRequest * dest);
2.14 frystyk 217: extern BOOL HTRequest_destinationsReady (HTRequest * me);
2.1 frystyk 218:
219: extern BOOL HTRequest_linkDestination (HTRequest * dest);
220: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
221:
222: extern BOOL HTRequest_removePostWeb (HTRequest * me);
223: extern BOOL HTRequest_killPostWeb (HTRequest * me);
224:
225: #define HTRequest_mainDestination(me) \
2.23 ! frystyk 226: ((me) && (me)->source ? (me)->source->mainDestination : NULL)
2.1 frystyk 227: #define HTRequest_isDestination(me) \
2.23 ! frystyk 228: ((me) && (me)->source && (me) != (me)->source)
2.1 frystyk 229: #define HTRequest_isMainDestination(me) \
2.23 ! frystyk 230: ((me) && (me)->source && \
! 231: (me) == (me)->source->mainDestination)
2.1 frystyk 232: #define HTRequest_isSource(me) \
2.23 ! frystyk 233: ((me) && (me)->source && (me) == (me)->source)
! 234: #define HTRequest_isPostWeb(me) ((me) && (me)->source)
! 235: #define HTRequest_source(me) ((me) ? (me)->source : NULL)
2.1 frystyk 236: </PRE>
2.23 ! frystyk 237: <P>
2.1 frystyk 238: End of Declaration
239: <PRE>
240: #endif /* HTREQMAN_H */
241: </PRE>
2.23 ! frystyk 242: <P>
! 243: <HR>
2.21 frystyk 244: <ADDRESS>
2.23 ! frystyk 245: @(#) $Id: HTReqMan.html,v 2.22 1996/04/15 21:06:05 frystyk Exp $
2.21 frystyk 246: </ADDRESS>
2.23 ! frystyk 247: </BODY></HTML>
Webmaster