Annotation of libwww/Library/src/HTHome.html, revision 2.5
2.1 frystyk 1: <HTML>
2: <HEAD>
2.4 frystyk 3: <TITLE>W3C Reference Library libwww APPLICATION</TITLE>
2.5 ! frystyk 4: <!-- Changed by: Henrik Frystyk Nielsen, 23-Mar-1996 -->
2.1 frystyk 5: <NEXTID N="z11">
6: </HEAD>
7: <BODY>
8:
2.3 frystyk 9: <H1>Application Stuff</H1>
2.1 frystyk 10:
11: <PRE>
12: /*
13: ** (c) COPYRIGHT MIT 1995.
14: ** Please first read the full copyright statement in the file COPYRIGH.
15: */
16: </PRE>
17:
18: This module provides some "make life easier" functions in order to get
19: the application going. The functionality of this module was originally
20: in <A HREF="HTAccess.html">HTAccess</A>, but now it has been moved
21: here as a part of the <A HREF="WWWApp.html">application interface</A>
22: where the application <EM>may</EM> use it if desired.<P>
23:
24: This module is implemented by <A HREF="HTHome.c">HTHome.c</A>, and it
25: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
26: Reference Library</A>. <P>
27:
28: <PRE>
29: #ifndef HTHOME_H
30: #define HTHOME_H
2.3 frystyk 31: #include "WWWLib.h"
2.1 frystyk 32: </PRE>
33:
34: <A NAME="Addresses"><H2>Default WWW Addresses</H2></A>
35:
36: These control the home page selection. To mess with these for normal
37: browses is asking for user confusion.
38:
39: <PRE>
40: #define LOGICAL_DEFAULT "WWW_HOME" /* Defined to be the home page */
41:
42: #ifndef PERSONAL_DEFAULT
43: #define PERSONAL_DEFAULT "WWW/default.html" /* in home directory */
44: #endif
45:
46: /* If the home page isn't found, use this file: */
47: #ifndef LAST_RESORT
48: #define LAST_RESORT "http://www.w3.org/"
49: #endif
50:
51: /* If one telnets to an access point it will look in this file for home page */
52: #ifndef REMOTE_POINTER
53: #define REMOTE_POINTER "/etc/www-remote.url" /* can't be file */
54: #endif
55:
56: /* and if that fails it will use this. */
57: #ifndef REMOTE_ADDRESS
58: #define REMOTE_ADDRESS "http://www.w3.org/" /* can't be file */
59: #endif
60:
61: #ifndef LOCAL_DEFAULT_FILE
62: #define LOCAL_DEFAULT_FILE "/usr/local/lib/WWW/default.html"
63: #endif
64: </PRE>
65:
2.3 frystyk 66: <H2>Home Anchor Generation</H2>
67:
68: We provide two small functions for finding the first anchor.
69:
70: <H3>Generate the Anchor for the Home Page</H4>
2.1 frystyk 71:
72: As it involves file access, this should only be done once when the
73: program first runs. This is a default algorithm using the
74: <CODE>WWW_HOME</CODE> environment variable.
75:
76: <PRE>
77: extern HTParentAnchor * HTHomeAnchor (void);
78: </PRE>
79:
2.3 frystyk 80: <H3>Find Related Name</H3>
2.1 frystyk 81:
82: Creates a local file URI that can be used as a relative name when
83: calling HTParse() to expand a relative file name to an absolute
84: one. The code for this routine originates from the Line Mode Browser
85: and was moved here by <EM>howcome@w3.org</EM> in order for all clients
86: to take advantage.<P>
87:
88: <PRE>
89: extern char * HTFindRelatedName (void);
2.2 frystyk 90: </PRE>
91:
2.3 frystyk 92: <H2>Net Manager Callback Functions</H2>
93:
94: These two functions are examples of callback functions from the <A
95: HREF="HTNet.html">Net Manager</A> which are called <EM>before</EM> and
96: <EM>after</EM> a request respectively. They do a lot of the stuff an
97: application often has to do anyway.
98:
99: <H3>BEFORE Request Callback</H3>
2.2 frystyk 100:
101: This function uses all the functionaly that the app part of the
102: Library gives for URL translations BEFORE a request is isseued. It
103: checks for Cache, proxy, and gateway (in that order)
104:
105: <PRE>
106: extern int HTLoadStart (HTRequest * request, int status);
107: </PRE>
108:
109: <H3>AFTER Request Callback</H3>
110:
111: This function uses all the functionaly that the app part of the Library
112: gives for handling AFTER a request.
113:
114: <PRE>
115: extern int HTLoadTerminate (HTRequest * request, int status);
2.1 frystyk 116: </PRE>
117:
118: <PRE>
119: #endif /* HTHOME_H */
120: </PRE>
121:
2.5 ! frystyk 122: <HR>
! 123: <ADDRESS>
! 124: @(#) $Id: Date Author State $
! 125: </ADDRESS>
2.1 frystyk 126: </BODY>
127: </HTML>
Webmaster