Annotation of libwww/Library/src/HTAccess.html, revision 2.69

2.9       timbl       1: <HTML>
                      2: <HEAD>
2.45      frystyk     3: <TITLE>Access manager  for libwww</TITLE>
2.69    ! frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen,  3-Dec-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.68      frystyk    37: <A NAME="Library"><H2>Generic Library Functions</H2></A>
                     38: 
                     39: These are functions that affect the overall behavior of the Library.
                     40: 
                     41: <H3><IMG SRC="../../Icons/32x32/warning.gif"> Initializing and
                     42: Terminating the Library</H3>
2.52      frystyk    43: 
                     44: These two functions initiates memory and settings for the Library and
                     45: cleans up memory kept by the Library when about to exit the
2.65      frystyk    46: application. They <B>must</B> be used!
2.52      frystyk    47: 
                     48: <PRE>
2.65      frystyk    49: extern BOOL HTLibInit (CONST char * AppName, CONST char * AppVersion);
2.63      frystyk    50: extern BOOL HTLibTerminate (void);
2.65      frystyk    51: </PRE>
                     52: 
2.68      frystyk    53: <H3>Library Name and Version</H3>
2.66      frystyk    54: 
                     55: You can get the generic name of the Library and the version by using
                     56: the following functions:
                     57: 
                     58: <PRE>
                     59: extern CONST char * HTLib_name (void);
                     60: extern CONST char * HTLib_version (void);
                     61: </PRE>
                     62: 
2.68      frystyk    63: <H3>Application Name and Version</H3>
2.65      frystyk    64: 
                     65: Returns the name of the application and the version number that was
                     66: passed to the <CODE>HTLibInit()</CODE> function.
                     67: 
                     68: <PRE>
                     69: extern CONST char * HTLib_appName (void);
                     70: extern CONST char * HTLib_appVersion (void);
2.52      frystyk    71: </PRE>
                     72: 
2.68      frystyk    73: <H3>Accessing the Local File System</H3>
2.64      frystyk    74: 
2.66      frystyk    75: The Library does normally use the local file system for dumping
                     76: unknown data objects, file cache etc. In some situations this is not
                     77: desired and we can therefore turn it off. This mode also prevents you
                     78: from being able to access other resources where you have to log in, fr
                     79: example telnet.
2.64      frystyk    80: 
                     81: <PRE>
2.66      frystyk    82: extern BOOL HTLib_secure (void);
                     83: extern void HTLib_setSecure (BOOL mode);
2.52      frystyk    84: </PRE>
                     85: 
2.68      frystyk    86: <A NAME="LoadDoc"><H2>LOAD Request Methods</H2></A>
2.33      frystyk    87: 
2.64      frystyk    88: <H3>Request a document from absolute name</H3>
2.33      frystyk    89: 
2.64      frystyk    90: Request a document referencd by an absolute URL.  Returns YES if
                     91: request accepted, else NO
2.33      frystyk    92: 
2.64      frystyk    93: <PRE>
                     94: extern BOOL HTLoadAbsolute (CONST char * url, HTRequest* request);
                     95: </PRE>
2.51      frystyk    96: 
2.64      frystyk    97: <H3>Request a document from absolute name to stream</H3>
2.51      frystyk    98: 
2.64      frystyk    99: Request a document referencd by an absolute URL and sending the data
                    100: down a stream. This is _excactly_ the same as HTLoadAbsolute as the
                    101: ourputstream is specified using the function.
                    102: HTRequest_setOutputStream(). 'filter' is ignored!  Returns YES if
                    103: request accepted, else NO
2.34      frystyk   104: 
                    105: <PRE>
2.64      frystyk   106: extern BOOL HTLoadToStream (CONST char * url, BOOL filter, HTRequest *request);
2.34      frystyk   107: </PRE>
                    108: 
2.64      frystyk   109: <H3>Request a document from relative name</H3>
2.39      frystyk   110: 
2.64      frystyk   111: Request a document referenced by a relative URL. The relative URL is
                    112: made absolute by resolving it relative to the address of the 'base'
                    113: anchor. Returns YES if request accepted, else NO
2.19      timbl     114: 
2.39      frystyk   115: <PRE>
2.64      frystyk   116: extern BOOL HTLoadRelative (CONST char *       relative,
                    117:                            HTParentAnchor *    base,
                    118:                            HTRequest *         request);
2.39      frystyk   119: </PRE>
                    120: 
2.64      frystyk   121: <H3>Request an anchor</H3>
2.46      frystyk   122: 
2.64      frystyk   123: Request the document referenced by the anchor Returns YES if request
                    124: accepted, else NO
2.39      frystyk   125: 
                    126: <PRE>
2.64      frystyk   127: extern BOOL HTLoadAnchor (HTAnchor * anchor, HTRequest * request);
2.39      frystyk   128: </PRE>
                    129: 
2.64      frystyk   130: <H3>Request an anchor</H3>
2.52      frystyk   131: 
2.64      frystyk   132: Same as HTLoadAnchor but any information in the Error Stack in the
                    133: request object is kept, so that any error messages in one This
                    134: function is almost identical to HTLoadAnchor, but it doesn't clear the
                    135: error stack so that the information in there is kept.  Returns YES if
                    136: request accepted, else NO
2.51      frystyk   137: 
                    138: <PRE>
2.64      frystyk   139: extern BOOL HTLoadAnchorRecursive (HTAnchor * anchor, HTRequest * request);
2.46      frystyk   140: </PRE>
                    141: 
2.64      frystyk   142: <H3>Search an Anchor</H3>
2.52      frystyk   143: 
                    144: Performs a keyword search on word given by the user. Adds the keyword
                    145: to the end of the current address and attempts to open the new
2.64      frystyk   146: address.  The list of keywords must be a space-separated list and
                    147: spaces will be converted to '+' before the request is issued.  Search
                    148: can also be performed by HTLoadAbsolute() etc.  Returns YES if request
                    149: accepted, else NO
2.46      frystyk   150: 
                    151: <PRE>
2.64      frystyk   152: extern BOOL HTSearch (CONST char *     keywords,
                    153:                      HTParentAnchor *  base,
                    154:                      HTRequest *       request);
2.46      frystyk   155: </PRE>
                    156: 
2.64      frystyk   157: <H3>Search a document from absolute name</H3>
2.52      frystyk   158: 
2.64      frystyk   159: Request a document referencd by an absolute URL appended with the
                    160: keywords given. The URL can NOT contain any fragment identifier!  The
                    161: list of keywords must be a space-separated list and spaces will be
                    162: converted to '+' before the request is issued.  Returns YES if request
                    163: accepted, else NO
2.39      frystyk   164: 
                    165: <PRE>
2.64      frystyk   166: extern BOOL HTSearchAbsolute (CONST char *     keywords,
                    167:                              CONST char *      url,
                    168:                              HTRequest *       request);
2.39      frystyk   169: </PRE>
                    170: 
2.68      frystyk   171: <A NAME="PostDoc"><H2>POST Request Methods</H2></A>
                    172: 
2.64      frystyk   173: <H3>Copy an anchor</H3>
2.45      frystyk   174: 
2.64      frystyk   175: Fetch the URL (possibly local file URL) and send it using either PUT
                    176: or POST to the remote destination using HTTP. The caller can decide the
                    177: exact method used and which HTTP header fields to transmit by setting
                    178: the user fields in the request structure.
                    179: Returns YES if request accepted, else NO
2.39      frystyk   180: 
2.47      frystyk   181: <PRE>
2.64      frystyk   182: extern BOOL HTCopyAnchor (HTAnchor * src_anchor, HTRequest * main_req);
2.47      frystyk   183: </PRE>
                    184: 
2.52      frystyk   185: <H3>Upload an Anchor</H3>
2.39      frystyk   186: 
2.64      frystyk   187: Send the contents (in hyperdoc) of the source anchor using either PUT
                    188: or POST to the remote destination using HTTP. The caller can decide
                    189: the exact method used and which HTTP header fields to transmit by
                    190: setting the user fields in the request structure.  Returns YES if
                    191: request accepted, else NO
2.43      frystyk   192: 
                    193: <PRE>
2.64      frystyk   194: extern BOOL HTUploadAnchor (HTAnchor *         src_anchor,
                    195:                            HTParentAnchor *    dest_anchor,
                    196:                            HTRequest *         dest_req);
2.68      frystyk   197: </PRE>
                    198: 
                    199: <A NAME="ServerDoc"><H2>SERVER Request Methods</H2></A>
                    200: 
                    201: <H3>Service a Request</H3>
                    202: 
                    203: This function sets up a request to service a document using the
                    204: specified access scheme.
                    205: 
                    206: <PRE>
2.69    ! frystyk   207: extern BOOL HTServDocument (HTRequest *                request,
        !           208:                            SOCKET              master,
        !           209:                            CONST char *        access);
2.46      frystyk   210: </PRE>
                    211: 
2.25      luotonen  212: <PRE>
2.63      frystyk   213: #endif /* HTACCESS_H */
2.38      howcome   214: </PRE>
                    215: 
2.52      frystyk   216: End of Declaration
2.25      luotonen  217: </BODY>
2.9       timbl     218: </HTML>

Webmaster