Annotation of libwww/Library/src/HTHome.html, revision 2.7

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.7     ! frystyk     3: <!-- Changed by: Henrik Frystyk Nielsen, 28-Jun-1996 -->
        !             4:   <TITLE>W3C Reference Library libwww Application Helper Functions</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
2.7     ! frystyk     7: <H1>
        !             8:   Application Helper Functions
        !             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: <H2>
        !            32:   Home Page Management
        !            33: </H2>
        !            34: <P>
        !            35: The <I>home page </I>is special in that this is is the first page to visit
        !            36: when &nbsp;a client application starts up. Note that a home page is a generic
        !            37: URL and hence can be any resouce - not only resources on the local file system.
        !            38: <H3>
        !            39:   Personal Home Page
        !            40: </H3>
        !            41: <PRE>#define LOGICAL_DEFAULT   "WWW_HOME"    /* Defined to be the home page */
2.1       frystyk    42: 
                     43: #ifndef PERSONAL_DEFAULT
2.7     ! frystyk    44: #define PERSONAL_DEFAULT       "WWW/default.html"      /* in home directory */
2.1       frystyk    45: #endif
                     46: 
                     47: /* If the home page isn't found, use this file: */
                     48: #ifndef LAST_RESORT
2.7     ! frystyk    49: #define LAST_RESORT            "http://www.w3.org/"
2.1       frystyk    50: #endif
2.7     ! frystyk    51: </PRE>
        !            52: <H3>
        !            53:   Home Page for Remote Access
        !            54: </H3>
        !            55: <P>
        !            56: Some Web applications can also be run remotely - for example as a telnet
        !            57: login shell. The Line Mode Browser is an example of such an application.&nbsp;In
        !            58: that case, the home page is often more generic than a personal home page.
        !            59: <PRE>
2.1       frystyk    60: /* If one telnets to an access point it will look in this file for home page */
                     61: #ifndef REMOTE_POINTER
2.7     ! frystyk    62: #define REMOTE_POINTER                  "/etc/www-remote.url"      /* can't be file */
2.1       frystyk    63: #endif
                     64: 
                     65: /* and if that fails it will use this. */
                     66: #ifndef REMOTE_ADDRESS
2.7     ! frystyk    67: #define REMOTE_ADDRESS         "http://www.w3.org/"        /* can't be file */
2.1       frystyk    68: #endif
                     69: 
                     70: #ifndef LOCAL_DEFAULT_FILE
2.7     ! frystyk    71: #define LOCAL_DEFAULT_FILE     "/usr/local/lib/WWW/default.html"
2.1       frystyk    72: #endif
                     73: </PRE>
2.7     ! frystyk    74: <H3>
        !            75:   Get an Anchor for the Home Page
        !            76: </H3>
        !            77: <P>
        !            78: Getting an anchor for the <I>home page</I> involves looking for the (environment)
        !            79: variables described in the section above. As this is something that almost
        !            80: all client applications must do then we provide some simple methods that
        !            81: do the work for you.
        !            82: <PRE>extern HTParentAnchor * HTHomeAnchor (void);
        !            83: </PRE>
        !            84: <H3>
        !            85:   Get The Current Directory in URL form
        !            86: </H3>
        !            87: <P>
        !            88: Creates a local file URL that can be used as a relative name when calling
        !            89: expanding other URLs relative to the current location in the local file system
        !            90: tree where the application is running. The code for this routine originates
        !            91: from the Line Mode Browser and was moved here by <EM>howcome@w3.org</EM>
        !            92: in order for all clients to take advantage.
        !            93: <PRE>#define HTFindRelatedName HTGetCurrentDirectoryURL
        !            94: extern char *  HTGetCurrentDirectoryURL (void);
        !            95: </PRE>
        !            96: <H2>
        !            97:   Net Manager Callback Functions
        !            98: </H2>
        !            99: <P>
        !           100: These two functions are examples of callback functions from the
        !           101: <A HREF="HTNet.html">Net Manager</A> which are called <EM>before</EM> and
        !           102: <EM>after</EM> a request respectively. They do a lot of the stuff an application
        !           103: often has to do anyway.
        !           104: <H3>
        !           105:   BEFORE Request Callback
        !           106: </H3>
        !           107: <P>
        !           108: This function uses all the functionaly that the app part of the Library gives
        !           109: for URL translations <I>BEFORE</I> a request is isseued. It checks for
        !           110: <B>cache</B>, <B>proxy</B>, and <B>gateway</B> (in that order)
        !           111: <PRE>extern HTNetCallback HTLoadStart;
        !           112: </PRE>
        !           113: <H3>
        !           114:   AFTER Request Callback
        !           115: </H3>
        !           116: <P>
        !           117: This function uses all the functionaly that the app part of the Library gives
        !           118: for handling <I>AFTER</I> a request.
        !           119: <PRE>extern HTNetCallback HTLoadTerminate;
2.1       frystyk   120: </PRE>
                    121: <PRE>
                    122: #endif /* HTHOME_H */
                    123: </PRE>
2.7     ! frystyk   124: <P>
        !           125:   <HR>
2.5       frystyk   126: <ADDRESS>
2.7     ! frystyk   127:   @(#) $Id: HTHome.html,v 2.6 1996/04/14 01:23:06 frystyk Exp $
2.5       frystyk   128: </ADDRESS>
2.7     ! frystyk   129: </BODY></HTML>

Webmaster