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