Annotation of libwww/Library/src/HTAccess.html, revision 2.67
2.9 timbl 1: <HTML>
2: <HEAD>
2.45 frystyk 3: <TITLE>Access manager for libwww</TITLE>
2.67 ! frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 17-Nov-1995 -->
2.19 timbl 5: <NEXTID N="z11">
2.9 timbl 6: </HEAD>
2.5 timbl 7: <BODY>
2.39 frystyk 8:
2.33 frystyk 9: <H1>Access Manager</H1>
2.39 frystyk 10:
2.41 frystyk 11: <PRE>
12: /*
2.50 frystyk 13: ** (c) COPYRIGHT MIT 1995.
2.41 frystyk 14: ** Please first read the full copyright statement in the file COPYRIGH.
15: */
16: </PRE>
17:
2.64 frystyk 18: This module is the application interface module to the <A
19: HREF="HTReq.html">Request Manager</A>. You can use the Request Manager
20: directly but this module makes it easier to use by providing a lot of
21: small request functions using the Request Manager in different
22: ways. It contains help functions for accessing documents and for
2.63 frystyk 23: uploading documents to a remote server.<P>
2.39 frystyk 24:
25: This module is implemented by <A HREF="HTAccess.c">HTAccess.c</A>, and
2.64 frystyk 26: it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
27: Reference Library</A>. <P>
2.39 frystyk 28:
2.33 frystyk 29: <PRE>
30: #ifndef HTACCESS_H
1.1 timbl 31: #define HTACCESS_H
2.44 roeber 32:
2.64 frystyk 33: #include "HTReq.h"
34: #include "HTAnchor.h"
2.52 frystyk 35: </PRE>
36:
2.67 ! frystyk 37: <A NAME="Library"><H2><IMG SRC="../../Icons/32x32/warning.gif"> Initializing and Terminating the Library</H2></A>
2.52 frystyk 38:
39: These two functions initiates memory and settings for the Library and
40: cleans up memory kept by the Library when about to exit the
2.65 frystyk 41: application. They <B>must</B> be used!
2.52 frystyk 42:
43: <PRE>
2.65 frystyk 44: extern BOOL HTLibInit (CONST char * AppName, CONST char * AppVersion);
2.63 frystyk 45: extern BOOL HTLibTerminate (void);
2.65 frystyk 46: </PRE>
47:
2.66 frystyk 48: <H2>Library Name and Version</H2>
49:
50: You can get the generic name of the Library and the version by using
51: the following functions:
52:
53: <PRE>
54: extern CONST char * HTLib_name (void);
55: extern CONST char * HTLib_version (void);
56: </PRE>
57:
2.65 frystyk 58: <H2>Application Name and Version</H2>
59:
60: Returns the name of the application and the version number that was
61: passed to the <CODE>HTLibInit()</CODE> function.
62:
63: <PRE>
64: extern CONST char * HTLib_appName (void);
65: extern CONST char * HTLib_appVersion (void);
2.52 frystyk 66: </PRE>
67:
2.66 frystyk 68: <H2>Accessing the Local File System</H2>
2.64 frystyk 69:
2.66 frystyk 70: The Library does normally use the local file system for dumping
71: unknown data objects, file cache etc. In some situations this is not
72: desired and we can therefore turn it off. This mode also prevents you
73: from being able to access other resources where you have to log in, fr
74: example telnet.
2.64 frystyk 75:
76: <PRE>
2.66 frystyk 77: extern BOOL HTLib_secure (void);
78: extern void HTLib_setSecure (BOOL mode);
2.52 frystyk 79: </PRE>
80:
2.64 frystyk 81: <A NAME="LoadDoc"><H2>Functions for Requesting an Object</H2></A>
2.33 frystyk 82:
2.64 frystyk 83: <H3>Request a document from absolute name</H3>
2.33 frystyk 84:
2.64 frystyk 85: Request a document referencd by an absolute URL. Returns YES if
86: request accepted, else NO
2.33 frystyk 87:
2.64 frystyk 88: <PRE>
89: extern BOOL HTLoadAbsolute (CONST char * url, HTRequest* request);
90: </PRE>
2.51 frystyk 91:
2.64 frystyk 92: <H3>Request a document from absolute name to stream</H3>
2.51 frystyk 93:
2.64 frystyk 94: Request a document referencd by an absolute URL and sending the data
95: down a stream. This is _excactly_ the same as HTLoadAbsolute as the
96: ourputstream is specified using the function.
97: HTRequest_setOutputStream(). 'filter' is ignored! Returns YES if
98: request accepted, else NO
2.34 frystyk 99:
100: <PRE>
2.64 frystyk 101: extern BOOL HTLoadToStream (CONST char * url, BOOL filter, HTRequest *request);
2.34 frystyk 102: </PRE>
103:
2.64 frystyk 104: <H3>Request a document from relative name</H3>
2.39 frystyk 105:
2.64 frystyk 106: Request a document referenced by a relative URL. The relative URL is
107: made absolute by resolving it relative to the address of the 'base'
108: anchor. Returns YES if request accepted, else NO
2.19 timbl 109:
2.39 frystyk 110: <PRE>
2.64 frystyk 111: extern BOOL HTLoadRelative (CONST char * relative,
112: HTParentAnchor * base,
113: HTRequest * request);
2.39 frystyk 114: </PRE>
115:
2.64 frystyk 116: <H3>Request an anchor</H3>
2.46 frystyk 117:
2.64 frystyk 118: Request the document referenced by the anchor Returns YES if request
119: accepted, else NO
2.39 frystyk 120:
121: <PRE>
2.64 frystyk 122: extern BOOL HTLoadAnchor (HTAnchor * anchor, HTRequest * request);
2.39 frystyk 123: </PRE>
124:
2.64 frystyk 125: <H3>Request an anchor</H3>
2.52 frystyk 126:
2.64 frystyk 127: Same as HTLoadAnchor but any information in the Error Stack in the
128: request object is kept, so that any error messages in one This
129: function is almost identical to HTLoadAnchor, but it doesn't clear the
130: error stack so that the information in there is kept. Returns YES if
131: request accepted, else NO
2.51 frystyk 132:
133: <PRE>
2.64 frystyk 134: extern BOOL HTLoadAnchorRecursive (HTAnchor * anchor, HTRequest * request);
2.46 frystyk 135: </PRE>
136:
2.64 frystyk 137: <H3>Search an Anchor</H3>
2.52 frystyk 138:
139: Performs a keyword search on word given by the user. Adds the keyword
140: to the end of the current address and attempts to open the new
2.64 frystyk 141: address. The list of keywords must be a space-separated list and
142: spaces will be converted to '+' before the request is issued. Search
143: can also be performed by HTLoadAbsolute() etc. Returns YES if request
144: accepted, else NO
2.46 frystyk 145:
146: <PRE>
2.64 frystyk 147: extern BOOL HTSearch (CONST char * keywords,
148: HTParentAnchor * base,
149: HTRequest * request);
2.46 frystyk 150: </PRE>
151:
2.64 frystyk 152: <H3>Search a document from absolute name</H3>
2.52 frystyk 153:
2.64 frystyk 154: Request a document referencd by an absolute URL appended with the
155: keywords given. The URL can NOT contain any fragment identifier! The
156: list of keywords must be a space-separated list and spaces will be
157: converted to '+' before the request is issued. Returns YES if request
158: accepted, else NO
2.39 frystyk 159:
160: <PRE>
2.64 frystyk 161: extern BOOL HTSearchAbsolute (CONST char * keywords,
162: CONST char * url,
163: HTRequest * request);
2.39 frystyk 164: </PRE>
165:
2.64 frystyk 166: <H3>Copy an anchor</H3>
2.45 frystyk 167:
2.64 frystyk 168: Fetch the URL (possibly local file URL) and send it using either PUT
169: or POST to the remote destination using HTTP. The caller can decide the
170: exact method used and which HTTP header fields to transmit by setting
171: the user fields in the request structure.
172: Returns YES if request accepted, else NO
2.39 frystyk 173:
2.47 frystyk 174: <PRE>
2.64 frystyk 175: extern BOOL HTCopyAnchor (HTAnchor * src_anchor, HTRequest * main_req);
2.47 frystyk 176: </PRE>
177:
2.52 frystyk 178: <H3>Upload an Anchor</H3>
2.39 frystyk 179:
2.64 frystyk 180: Send the contents (in hyperdoc) of the source anchor using either PUT
181: or POST to the remote destination using HTTP. The caller can decide
182: the exact method used and which HTTP header fields to transmit by
183: setting the user fields in the request structure. Returns YES if
184: request accepted, else NO
2.43 frystyk 185:
186: <PRE>
2.64 frystyk 187: extern BOOL HTUploadAnchor (HTAnchor * src_anchor,
188: HTParentAnchor * dest_anchor,
189: HTRequest * dest_req);
2.46 frystyk 190: </PRE>
191:
2.25 luotonen 192: <PRE>
2.63 frystyk 193: #endif /* HTACCESS_H */
2.38 howcome 194: </PRE>
195:
2.52 frystyk 196: End of Declaration
2.25 luotonen 197: </BODY>
2.9 timbl 198: </HTML>
Webmaster