Annotation of libwww/Library/src/HTHome.html, revision 2.11
2.1 frystyk 1: <HTML>
2: <HEAD>
2.11 ! frystyk 3: <!-- Changed by: Henrik Frystyk Nielsen, 16-Jul-1996 -->
2.10 frystyk 4: <TITLE>W3C Reference Library libwww Home Page Management</TITLE>
2.1 frystyk 5: </HEAD>
6: <BODY>
2.7 frystyk 7: <H1>
2.10 frystyk 8: Home Page Management
2.7 frystyk 9: </H1>
2.1 frystyk 10: <PRE>
11: /*
12: ** (c) COPYRIGHT MIT 1995.
13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
2.7 frystyk 16: <P>
17: This module provides some "<I>make life easier</I>" functions in order to
18: get the application going. The functionality of this module was originally
19: in <A HREF="HTAccess.html">HTAccess</A>, but now it has been moved here as
20: a part of the <A HREF="WWWApp.html">application interface</A> where the
21: application <EM>may</EM> use it if desired.
22: <P>
23: This module is implemented by <A HREF="HTHome.c">HTHome.c</A>, and it is
24: a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C Reference
25: Library</A>.
2.1 frystyk 26: <PRE>
27: #ifndef HTHOME_H
28: #define HTHOME_H
2.3 frystyk 29: #include "WWWLib.h"
2.1 frystyk 30: </PRE>
2.7 frystyk 31: <P>
32: The <I>home page </I>is special in that this is is the first page to visit
33: when a client application starts up. Note that a home page is a generic
34: URL and hence can be any resouce - not only resources on the local file system.
2.10 frystyk 35: <H2>
2.7 frystyk 36: Personal Home Page
2.10 frystyk 37: </H2>
2.7 frystyk 38: <PRE>#define LOGICAL_DEFAULT "WWW_HOME" /* Defined to be the home page */
2.1 frystyk 39:
40: #ifndef PERSONAL_DEFAULT
2.7 frystyk 41: #define PERSONAL_DEFAULT "WWW/default.html" /* in home directory */
2.1 frystyk 42: #endif
43:
44: /* If the home page isn't found, use this file: */
45: #ifndef LAST_RESORT
2.7 frystyk 46: #define LAST_RESORT "http://www.w3.org/"
2.1 frystyk 47: #endif
2.7 frystyk 48: </PRE>
2.10 frystyk 49: <H2>
2.7 frystyk 50: Home Page for Remote Access
2.10 frystyk 51: </H2>
2.7 frystyk 52: <P>
53: Some Web applications can also be run remotely - for example as a telnet
54: login shell. The Line Mode Browser is an example of such an application. In
55: that case, the home page is often more generic than a personal home page.
56: <PRE>
2.1 frystyk 57: /* If one telnets to an access point it will look in this file for home page */
58: #ifndef REMOTE_POINTER
2.7 frystyk 59: #define REMOTE_POINTER "/etc/www-remote.url" /* can't be file */
2.1 frystyk 60: #endif
61:
62: /* and if that fails it will use this. */
63: #ifndef REMOTE_ADDRESS
2.7 frystyk 64: #define REMOTE_ADDRESS "http://www.w3.org/" /* can't be file */
2.1 frystyk 65: #endif
66:
67: #ifndef LOCAL_DEFAULT_FILE
2.7 frystyk 68: #define LOCAL_DEFAULT_FILE "/usr/local/lib/WWW/default.html"
2.1 frystyk 69: #endif
70: </PRE>
2.10 frystyk 71: <H2>
2.7 frystyk 72: Get an Anchor for the Home Page
2.10 frystyk 73: </H2>
2.7 frystyk 74: <P>
75: Getting an anchor for the <I>home page</I> involves looking for the (environment)
76: variables described in the section above. As this is something that almost
77: all client applications must do then we provide some simple methods that
78: do the work for you.
2.9 frystyk 79: <PRE>
80: extern HTParentAnchor * HTHomeAnchor (void);
2.7 frystyk 81: </PRE>
2.10 frystyk 82: <H2>
2.11 ! frystyk 83: <A NAME="temp">Create a New Anchor for Temporary Local Files</A>
! 84: </H2>
! 85: <P>
! 86: When the user starts writing a new document, the client application should
! 87: create a new anchor which can contain the document while it is created. This
! 88: can also be the location for backups and for security "auto-save" functionality.
! 89: This functions creates a new anchor with a URL pointing to the temporary
! 90: location defined by this user profile and returns that anchor.
! 91: <PRE>
! 92: extern HTParentAnchor * HTTmpAnchor (HTUserProfile * up);
! 93: </PRE>
! 94: <H2>
2.7 frystyk 95: Get The Current Directory in URL form
2.10 frystyk 96: </H2>
2.7 frystyk 97: <P>
98: Creates a local file URL that can be used as a relative name when calling
99: expanding other URLs relative to the current location in the local file system
100: tree where the application is running. The code for this routine originates
101: from the Line Mode Browser and was moved here by <EM>howcome@w3.org</EM>
102: in order for all clients to take advantage.
2.9 frystyk 103: <PRE>
104: #define HTFindRelatedName HTGetCurrentDirectoryURL
2.7 frystyk 105: extern char * HTGetCurrentDirectoryURL (void);
106: </PRE>
107: <H2>
2.8 frystyk 108: Handle Library Trace Messages
109: </H2>
110: <P>
111: Standard interface to libwww <A HREF="HTUtils.html#Debug">TRACE messages</A>.
112: Pass this function a string of characters and it will set up the appropriate
113: TRACE flags. The shortnames for the trace messages are not as intuitive as
114: they could be :-(. The string must be null terminated
2.9 frystyk 115: <PRE>
116: extern int HTSetTraceMessageMask (const char * shortnames);
2.8 frystyk 117: </PRE>
2.1 frystyk 118: <PRE>
119: #endif /* HTHOME_H */
120: </PRE>
2.7 frystyk 121: <P>
122: <HR>
2.5 frystyk 123: <ADDRESS>
2.11 ! frystyk 124: @(#) $Id: HTHome.html,v 2.10 1996/07/08 19:10:45 frystyk Exp $
2.5 frystyk 125: </ADDRESS>
2.7 frystyk 126: </BODY></HTML>
Webmaster