Annotation of libwww/Library/src/HTLib.html, revision 2.8

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.6       frystyk     3:   <TITLE>W3C Sample Code Library libwww Initialization</TITLE>
2.1       frystyk     4: </HEAD>
                      5: <BODY>
                      6: <H1>
2.6       frystyk     7:   Libwww Initialization
2.1       frystyk     8: </H1>
                      9: <PRE>
                     10: /*
                     11: **     (c) COPYRIGHT MIT 1995.
                     12: **     Please first read the full copyright statement in the file COPYRIGH.
                     13: */
                     14: </PRE>
                     15: <P>
                     16: This module contains some generic functions for getting the name and version
                     17: of libwww. It also contains some global configuration options like if you
                     18: can access the local file system, for example.
                     19: <P>
2.6       frystyk    20: This module is implemented by <A HREF="HTLib.c">HTLib.c</A>, and it is a
                     21: part of the <A HREF="http://www.w3.org/Library/"> W3C Sample Code Library</A>.
2.1       frystyk    22: <PRE>
                     23: #ifndef HTLIB_H
                     24: #define HTLIB_H
                     25: 
2.6       frystyk    26: #include "<A HREF="HTUser.html">HTUser.h</A>"
2.8     ! vbancrof   27: 
        !            28: #ifdef __cplusplus
        !            29: extern "C" { 
        !            30: #endif 
2.1       frystyk    31: </PRE>
2.6       frystyk    32: <H2>
                     33:   Initializing and Terminating libwww
                     34: </H2>
                     35: <P>
2.7       kahan      36: These two functions initialize memory and settings for the libwww core and
2.6       frystyk    37: cleans up memory kept by libwww core when exiting the application. They
                     38: &nbsp;MUST be used as libwww otherwise is in a undefined state.
2.1       frystyk    39: <PRE>extern BOOL HTLibInit (const char * AppName, const char * AppVersion);
                     40: extern BOOL HTLibTerminate (void);
                     41: </PRE>
2.6       frystyk    42: <H2>
                     43:   Libwww Name and Version
                     44: </H2>
2.1       frystyk    45: <P>
                     46: You can get the generic name of the Library and the version by using the
                     47: following functions:
                     48: <PRE>extern const char * HTLib_name (void);
                     49: extern const char * HTLib_version (void);
                     50: </PRE>
2.6       frystyk    51: <H2>
                     52:   Is libwww Initalized?
                     53: </H2>
2.2       frystyk    54: <P>
                     55: Returns YES or NO
                     56: <PRE>extern BOOL HTLib_isInitialized (void);
                     57: </PRE>
2.6       frystyk    58: <H2>
                     59:   Application Name and Version
                     60: </H2>
                     61: <P>
                     62: Returns the name of the application name and the version number. The name
                     63: and version SHOULD be short and to the point. They MUST NOT be used for
                     64: advertising or other non-essential information. Although any token character
                     65: MAY appear in a product-version, this token SHOULD only be used for a version
                     66: identifier.
2.2       frystyk    67: <H3>
2.6       frystyk    68:   Set or get the application name
2.1       frystyk    69: </H3>
                     70: <P>
2.6       frystyk    71: The name can not contain any spaces as it is used as part of the user agent
                     72: field. For the same reason, the string MUST be in US-ASCII. For example,
                     73: "<B>SmartApp</B>"
2.1       frystyk    74: <PRE>
                     75: extern const char * HTLib_appName (void);
2.6       frystyk    76: extern BOOL HTLib_setAppName (const char * name);
                     77: </PRE>
                     78: <H3>
                     79:   Set or get the application version
                     80: </H3>
                     81: <P>
                     82: The version token can not contain any spaces as it is used as part of the
                     83: user agent field. For the same reason, the string MUST be in US-ASCII. For
                     84: example, "<B>1.0</B>". 
                     85: <PRE>
2.1       frystyk    86: extern const char * HTLib_appVersion (void);
2.6       frystyk    87: extern BOOL HTLib_setAppVersion (const char * version);
2.1       frystyk    88: </PRE>
2.6       frystyk    89: <H2>
2.3       frystyk    90:   <A NAME="Secure">Accessing the Local File System</A>
2.6       frystyk    91: </H2>
2.1       frystyk    92: <P>
2.6       frystyk    93: Libwww does normally use the local file system for dumping unknown data objects,
2.7       kahan      94: file cache etc. In some situations this is not desired, and we can therefore
2.6       frystyk    95: turn it off. This mode also prevents you from being able to access other
                     96: resources where you have to login telnet, for example.
2.1       frystyk    97: <PRE>extern BOOL HTLib_secure (void);
                     98: extern void HTLib_setSecure (BOOL mode);
                     99: </PRE>
2.6       frystyk   100: <H2>
2.1       frystyk   101:   Default User Profile
2.6       frystyk   102: </H2>
2.1       frystyk   103: <P>
                    104: The default <A HREF="HTUser.html">user profile</A> is automatically created
                    105: by the libwww in order to get information about the <I>hostname</I>, default
                    106: <I>email -address </I>etc. All <A HREF="HTReq.html">request objects</A> will
                    107: be created with this default user profile. The application may assign individual
                    108: user profiles to every request object or may set the default user profile.
                    109: <PRE>extern HTUserProfile * HTLib_userProfile (void);
                    110: extern BOOL HTLib_setUserProfile (HTUserProfile * up);
                    111: </PRE>
                    112: <PRE>
2.8     ! vbancrof  113: #ifdef __cplusplus
        !           114: }
        !           115: #endif
        !           116: 
2.1       frystyk   117: #endif /* HTLIB_H */
                    118: </PRE>
                    119: <P>
                    120:   <HR>
                    121: <ADDRESS>
2.8     ! vbancrof  122:   @(#) $Id: HTLib.html,v 2.7 2000/07/12 10:44:41 kahan Exp $
2.1       frystyk   123: </ADDRESS>
                    124: </BODY></HTML>

Webmaster