Annotation of libwww/Library/src/HTInit.html, revision 2.40
2.6 timbl 1: <HTML>
2: <HEAD>
2.40 ! frystyk 3: <!-- Changed by: Henrik Frystyk Nielsen, 28-Jun-1996 -->
2.36 frystyk 4: <TITLE>W3C Reference Library libwww Default Initialization</TITLE>
2.6 timbl 5: </HEAD>
6: <BODY>
2.36 frystyk 7: <H1>
8: Default Initialization Methods
9: </H1>
2.11 frystyk 10: <PRE>
11: /*
2.16 frystyk 12: ** (c) COPYRIGHT MIT 1995.
2.11 frystyk 13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
2.36 frystyk 16: <P>
17: As mentioned in the <A HREF="../User/Architecture/">Library Architecture</A>,
18: libwww consists of a small core and a large set of hooks for adding
19: functionality. By itself, the core it not capable of performing any Web related
20: tasks like accessing a HTTP server or parsing a HTML document. All this
21: functionality must be registered by the application. This way, the core of
22: libwww is kept application independent and can be used as the basic building
23: block for any kind of Web application. The Library comes with a large set
24: of default functions, for example for accessing HTTP and FTP servers, parsing
25: <A HREF="http://info.internet.isi.edu:80/in-notes/rfc/files/rfc822.txt">RFC
26: 822</A> headers etc. This module helps the application programmer setting
27: up all this functionality, but it is important to note that none of it is
28: <I>required</I> in order to use the Library.
29: <P>
30: This module is implemented by <A HREF="HTInit.c">HTInit.c</A>, and it is
31: a part of the <A HREF="http://www.w3.org/pub/WWW/Library/">W3C Reference
32: Library</A>. You can also have a look at the other
33: <A HREF="WWWInit.html">Initialization modules</A>.
2.9 frystyk 34: <PRE>
2.13 frystyk 35: #ifndef HTINIT_H
36: #define HTINIT_H
2.27 frystyk 37: #include "WWWLib.h"
2.37 eric 38: #include "WWWApp.h"
2.9 frystyk 39: </PRE>
2.36 frystyk 40: <H2>
41: Default Transport Protocol Modules
42: </H2>
43: <P>
2.32 frystyk 44: Register the default set of transport protocols.
45: <PRE>
2.36 frystyk 46: #include "WWWTrans.h"
2.32 frystyk 47:
48: extern void HTTransportInit (void);
49: </PRE>
2.36 frystyk 50: <H2>
51: Default Protocol Modules
52: </H2>
53: <P>
54: Set up default bindings between access schemes and the set of protocol modules
55: in the Library.
2.32 frystyk 56: <PRE>
57: #include "WWWHTTP.h"
58: #include "WWWFile.h"
59: #include "WWWFTP.h"
60: #include "WWWGophe.h"
61: #include "WWWTelnt.h"
62: #include "WWWNews.h"
63:
64: #ifdef HT_DIRECT_WAIS
65: #include "WWWWAIS.h"
66: #endif
67:
2.40 ! frystyk 68: #define HTAccessInit HTProtocolInit
! 69: extern void HTProtocolInit (void);
2.32 frystyk 70: </PRE>
2.36 frystyk 71: <H2>
2.40 ! frystyk 72: <A NAME="MIME">Default MIME Parsers</A>
2.37 eric 73: </H2>
74: <P>
2.38 frystyk 75: The core doesn't have any built in MIME parsers, but many of the protocols
2.39 frystyk 76: need them. For instance, many elements of the library rely on the
77: <CODE>Content-Length</CODE> being correctly set. HTMIMEInit provides the
78: minimal functionality needed for library reliablilty.
2.40 ! frystyk 79: <PRE>
! 80: #include "WWWMIME.h"
! 81: #include "WWWApp.h"
! 82:
! 83: extern void HTMIMEInit (void);
2.37 eric 84: </PRE>
85: <H2>
2.36 frystyk 86: Default Event Manager
87: </H2>
88: <P>
2.39 frystyk 89: libwww core does not have any default event loop - it has to be added by
90: the application. However, it does come with an example implementation thta
91: may be used. This implementation is based on a <CODE>select</CODE> system
92: call using non-blocking and interleaved sockets.
2.35 frystyk 93: <PRE>
2.39 frystyk 94: #include "WWWApp.h"
95:
96: extern void HTEventInit (void);
2.35 frystyk 97: </PRE>
2.36 frystyk 98: <H2>
2.40 ! frystyk 99: <A NAME="Converter">Default Media Type Conversions</A>
2.36 frystyk 100: </H2>
101: <P>
102: The <EM>Converters</EM> are used to convert a media type to another media
103: type, or to present it on screen. This is a part of the stream stack algorithm.
104: The Presenters are also used in the stream stack, but are initialized separately.
2.38 frystyk 105: <PRE>#include "WWWMIME.h"
2.32 frystyk 106: #include "WWWHTML.h"
107: #include "WWWStream.h"
108: #include "WWWDir.h"
109: #include "WWWRules.h"
2.23 frystyk 110:
2.21 frystyk 111: extern void HTConverterInit (HTList * conversions);
2.14 frystyk 112: </PRE>
2.36 frystyk 113: <H3>
114: Presenters
115: </H3>
116: <P>
117: The <EM>Presenters</EM> are used to present a media type to the use by calling
118: an external program, for example a post script viewer. This is a part of
119: the stream stack algorithm. The <I>Converters</I> are also used in the stream
120: stack, but are initialized separately. The <I>Presenters</I> use the same
121: include files as the <I>Converters</I>.
2.14 frystyk 122: <PRE>
2.21 frystyk 123: extern void HTPresenterInit (HTList * conversions);
2.14 frystyk 124: </PRE>
2.36 frystyk 125: <H3>
126: Converters and Presenters
127: </H3>
128: <P>
129: This function is only defined in order to preserve backward compatibility.
2.21 frystyk 130: <PRE>
131: extern void HTFormatInit (HTList * conversions);
2.9 frystyk 132: </PRE>
2.36 frystyk 133: <H2>
134: Default Content and Transfer Encodings
135: </H2>
136: <P>
137: Content encoders and decoders can handle encodings like <EM>chunked</EM>
138: etc.
139: <PRE>#include "WWWHTTP.h"
2.9 frystyk 140:
2.33 frystyk 141: extern void HTEncoderInit (HTList * encodings);
142: </PRE>
2.36 frystyk 143: <H2>
144: Default BEFORE and AFTER Net Callback Functions
145: </H2>
146: <P>
2.40 ! frystyk 147: We register two often used callback functions: a <CODE>BEFORE</CODE> and
! 148: a <CODE>AFTER</CODE> callback Not done automaticly - may be done by application!
2.36 frystyk 149: <PRE>#include "WWWApp.h"
2.33 frystyk 150:
2.27 frystyk 151: extern void HTNetInit (void);
152: </PRE>
2.36 frystyk 153: <H2>
154: Default Message and Dialog Functions
155: </H2>
156: <P>
157: We register a set of alert messages Not done automaticly - may be done by
158: application!
159: <PRE>#include "WWWApp.h"
2.27 frystyk 160:
161: extern void HTAlertInit (void);
162: </PRE>
2.40 ! frystyk 163: <H2>
! 164: Default Icons for Directory Listings
! 165: </H2>
! 166: <P>
! 167: The WWWDir interface contains support for including references (URLs and
! 168: ALT text tags) to icons in directory listings. The icons are selected as
! 169: a function of the media type and the content encoding of the file in question.
! 170: That is - you can set up icons for compressed files, postscript files etc.
! 171: There is also a small set of specific icons representing directories etc.
! 172: <PRE>#include "<A HREF="WWWFile.html">WWWFile.h</A>"
! 173:
! 174: extern void HTIconInit (const char * url_prefix);
! 175: </PRE>
2.27 frystyk 176: <PRE>
2.13 frystyk 177: #endif
2.9 frystyk 178: </PRE>
2.36 frystyk 179: <P>
180: <HR>
2.31 frystyk 181: <ADDRESS>
2.40 ! frystyk 182: @(#) $Id: HTInit.html,v 2.39 1996/06/15 00:24:52 frystyk Exp $
2.31 frystyk 183: </ADDRESS>
2.36 frystyk 184: </BODY></HTML>
Webmaster