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