Annotation of libwww/Library/src/HTReqMan.html, revision 2.16
2.1 frystyk 1: <HTML>
2: <HEAD>
2.11 frystyk 3: <TITLE>Request Object</TITLE>
2.16 ! frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 1-Feb-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: HTParentAnchor * anchor; /* The Client anchor for this request */
100:
2.1 frystyk 101: HTChildAnchor * childAnchor; /* For element within the object */
102: HTParentAnchor * parentAnchor; /* For referer field */
103: </PRE>
104:
2.14 frystyk 105: <H4>Redirection</H4>
106:
107: If we get a redirection back then we return the new destination for
108: this request to the application using this anchor.
109:
110: <PRE>
111: HTAnchor * redirectionAnchor; /* Redirection URL */
112: </PRE>
113:
2.1 frystyk 114: <H3>Streams From Network to Application</H3>
115:
116: <PRE>
117: HTStream * output_stream;
118: HTFormat output_format;
119:
120: HTStream* debug_stream;
121: HTFormat debug_format;
122: </PRE>
123:
124: <H3>Streams From Application to Network</H3>
125:
126: <PRE>
127: HTStream * input_stream;
128: HTFormat input_format;
129: </PRE>
130:
131: <H3>Callback Function for getting data down the Input Stream</H3>
132:
133: <PRE>
2.5 frystyk 134: HTPostCallback * PostCallback;
2.1 frystyk 135: </PRE>
136:
137: <H3>Context Swapping</H3>
138:
139: <PRE>
140: HTRequestCallback * callback;
141: void * context;
142: </PRE>
143:
144: <H3>Other Flags</H3>
145:
146: <PRE>
2.13 frystyk 147: BOOL preemptive;
2.1 frystyk 148: BOOL ContentNegotiation;
149: BOOL using_proxy;
150: </PRE>
151:
152: <H3>Error Manager</H3>
153:
154: <PRE>
155: HTList * error_stack; /* List of errors */
156: </PRE>
157:
158: <H3>PostWeb Information</H3>
159:
160: <PRE>
161: HTRequest * source; /* Source for request or itself */
2.16 ! frystyk 162: HTParentAnchor * source_anchor; /* Source anchor or itself */
! 163:
2.1 frystyk 164: HTRequest * mainDestination; /* For the typical case */
165: HTList * destinations; /* List of related requests */
166: int destRequests; /* Number of destination requests */
167: int destStreams; /* Number of destination streams */
168: </PRE>
169:
170: <H3>Access Authentication Information</H3>
171:
172: This will go into its own structure
173:
174: <PRE>
175: char * WWWAAScheme; /* WWW-Authenticate scheme */
176: char * WWWAARealm; /* WWW-Authenticate realm */
177: char * WWWprotection; /* WWW-Protection-Template */
178: char * authorization; /* Authorization: field */
179: HTAAScheme scheme; /* Authentication scheme used */
180: HTList * valid_schemes; /* Valid auth.schemes */
181: HTAssocList ** scheme_specifics;/* Scheme-specific parameters */
182: char * authenticate; /* WWW-authenticate: field */
183: char * prot_template; /* WWW-Protection-Template: field */
184: HTAASetup * setup; /* Doc protection info */
185: HTAARealm * realm; /* Password realm */
186: char * dialog_msg; /* Authentication prompt (client) */
187: </PRE>
188:
189: <H3>Windows Specific Information</H3>
190:
191: <PRE>
2.7 frystyk 192: #ifdef WWW_WIN_ASYNC
193: HWND hwnd; /* Windows handle for MSWindows */
194: unsigned long winMsg; /* msg number of Windows eloop */
195: #endif /* WWW_WIN_ASYNC */
2.1 frystyk 196: </PRE>
197:
198: <PRE>
199: };
200: </PRE>
201:
202: <H2>Post Web Management</H2>
203:
204: These functions are mainly used internally in the Library but there is
205: no reason for them not to be public.
206:
207: <PRE>
208: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
209: extern BOOL HTRequest_removeDestination (HTRequest * dest);
2.14 frystyk 210: extern BOOL HTRequest_destinationsReady (HTRequest * me);
2.1 frystyk 211:
212: extern BOOL HTRequest_linkDestination (HTRequest * dest);
213: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
214:
215: extern BOOL HTRequest_removePostWeb (HTRequest * me);
216: extern BOOL HTRequest_killPostWeb (HTRequest * me);
217:
218: #define HTRequest_mainDestination(me) \
219: ((me) && (me)->source ? (me)->source->mainDestination : NULL)
220: #define HTRequest_isDestination(me) \
221: ((me) && (me)->source && (me) != (me)->source)
222: #define HTRequest_isMainDestination(me) \
223: ((me) && (me)->source && \
224: (me) == (me)->source->mainDestination)
225: #define HTRequest_isSource(me) \
226: ((me) && (me)->source && (me) == (me)->source)
2.3 frystyk 227: #define HTRequest_isPostWeb(me) ((me) && (me)->source)
228: #define HTRequest_source(me) ((me) ? (me)->source : NULL)
2.1 frystyk 229: </PRE>
230:
231: End of Declaration
232:
233: <PRE>
234: #endif /* HTREQMAN_H */
235: </PRE>
236: end of HTAccess
237: </BODY>
238: </HTML>
Webmaster