Annotation of libwww/Library/src/HTReqMan.html, revision 2.5
2.1 frystyk 1: <HTML>
2: <HEAD>
3: <TITLE>Request Manager</TITLE>
2.5 ! frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 3-Nov-1995 -->
2.1 frystyk 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
2.3 frystyk 25: it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
26: Reference Library</A>. <P>
2.1 frystyk 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>"
2.2 frystyk 39: #include "<A HREF="HTSocket.h">HTSocket.h</A>"
2.1 frystyk 40: #include "<A HREF="HTNet.html">HTNet.h</A>"
41: </PRE>
42:
43: <H2><A NAME="req">The Request structure</A></H2>
44:
45: When a request is handled, all kinds of things about it need to be
46: passed along together with a request. It is intended to live as long
47: as the request is still active, but can be deleted as soon as it has
48: terminated. Only the anchor object stays around after the request
49: itself is terminated.
50:
51: <PRE>
52: struct _HTRequest {
53: HTMethod method;
54: HTReload reload;
55:
56: char * redirect; /* Location or URI */
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>
179: #ifdef _WINDOWS
180: HWND hwnd; /* Windows handle for MSWindows */
181: unsigned long winMsg; /* msg number of Windows eloop */
182: #endif /* _WINDOWS */
2.4 frystyk 183: </PRE>
184:
185: <H3>Temporary until we get a better server</H3>
186:
187: <PRE>
188: #if 1
189: HTAtom * content_type; /* Content-Type: */
190: HTAtom * content_language;/* Language */
191: HTAtom * content_encoding;/* Encoding */
192: int content_length; /* Content-Length: */
193: #endif
2.1 frystyk 194: </PRE>
195:
196: <PRE>
197: };
198: </PRE>
199:
200: <H2>Post Web Management</H2>
201:
202: These functions are mainly used internally in the Library but there is
203: no reason for them not to be public.
204:
205: <PRE>
206: extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest);
207: extern BOOL HTRequest_removeDestination (HTRequest * dest);
208:
209: extern BOOL HTRequest_linkDestination (HTRequest * dest);
210: extern BOOL HTRequest_unlinkDestination (HTRequest * dest);
211:
212: extern BOOL HTRequest_removePostWeb (HTRequest * me);
213: extern BOOL HTRequest_killPostWeb (HTRequest * me);
214:
215: #define HTRequest_mainDestination(me) \
216: ((me) && (me)->source ? (me)->source->mainDestination : NULL)
217: #define HTRequest_isDestination(me) \
218: ((me) && (me)->source && (me) != (me)->source)
219: #define HTRequest_isMainDestination(me) \
220: ((me) && (me)->source && \
221: (me) == (me)->source->mainDestination)
222: #define HTRequest_isSource(me) \
223: ((me) && (me)->source && (me) == (me)->source)
2.3 frystyk 224: #define HTRequest_isPostWeb(me) ((me) && (me)->source)
225: #define HTRequest_source(me) ((me) ? (me)->source : NULL)
2.1 frystyk 226: </PRE>
227:
228: End of Declaration
229:
230: <PRE>
231: #endif /* HTREQMAN_H */
232: </PRE>
233: end of HTAccess
234: </BODY>
235: </HTML>
Webmaster