Default Initialization Methods

/*
**	(c) COPYRIGHT MIT 1995.
**	Please first read the full copyright statement in the file COPYRIGH.
*/

As mentioned in the Library Architecture, libwww consists of a small core and a large set of hooks for adding functionality. By itself, the core it not capable of performing any Web related tasks like accessing a HTTP server or parsing a HTML document. All this functionality must be registered by the application. This way, the core of libwww is kept application independent and can be used as the basic building block for any kind of Web application. The Library comes with a large set of default functions, for example for accessing HTTP and FTP servers, parsing RFC 822 headers etc. This module helps the application programmer setting up all this functionality, but it is important to note that none of it is required in order to use the Library.

This module is implemented by HTInit.c, and it is a part of the W3C Reference Library. You can also have a look at the other Initialization modules.

#ifndef HTINIT_H
#define HTINIT_H
#include "WWWLib.h"
#include "WWWApp.h"

Default Transport Protocol Modules

Register the default set of transport protocols.

#include "WWWTrans.h"

extern void HTTransportInit (void);

Default Protocol Modules

Set up default bindings between access schemes and the set of protocol modules in the Library.

#include "WWWHTTP.h"
#include "WWWFile.h"
#include "WWWFTP.h"
#include "WWWGophe.h"
#include "WWWTelnt.h"
#include "WWWNews.h"

#ifdef HT_DIRECT_WAIS
#include "WWWWAIS.h"
#endif

extern void HTAccessInit (void);

Default MIME Parsers

The core doesn't have any built in MIME parsers, but many of the protocols need them. For instance, many elements of the library rely on the Content-Length being correctly set. HTMIMEInit provides the minimal functionality needed for library reliablilty.

extern void HTMIMEInit (void);

Default Event Manager

libwww core does not have any default event loop - it has to be added by the application. However, it does come with an example implementation thta may be used. This implementation is based on a select system call using non-blocking and interleaved sockets.

#include "WWWApp.h"

extern void HTEventInit (void);

Default Media Type Conversions

The Converters are used to convert a media type to another media type, or to present it on screen. This is a part of the stream stack algorithm. The Presenters are also used in the stream stack, but are initialized separately.

#include "WWWMIME.h"
#include "WWWHTML.h"
#include "WWWStream.h"
#include "WWWDir.h"
#include "WWWRules.h"

extern void HTConverterInit	(HTList * conversions);

Presenters

The Presenters are used to present a media type to the use by calling an external program, for example a post script viewer. This is a part of the stream stack algorithm. The Converters are also used in the stream stack, but are initialized separately. The Presenters use the same include files as the Converters.

extern void HTPresenterInit	(HTList * conversions);

Converters and Presenters

This function is only defined in order to preserve backward compatibility.

extern void HTFormatInit	(HTList * conversions);

Default Content and Transfer Encodings

Content encoders and decoders can handle encodings like chunked etc.

#include "WWWHTTP.h"

extern void HTEncoderInit	(HTList * encodings);

Default BEFORE and AFTER Net Callback Functions

We register two often used callback functions: a BEFORE and a AFTER callback Not done automaticly - may be done by application!

#include "WWWApp.h"

extern void HTNetInit (void);

Default Message and Dialog Functions

We register a set of alert messages Not done automaticly - may be done by application!

#include "WWWApp.h"

extern void HTAlertInit (void);
#endif


@(#) $Id: HTInit.html,v 2.39 1996/06/15 00:24:52 frystyk Exp $