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