Internals - Library Interfaces

# Library Interfaces

This is the overall set of interfaces in the W3C Reference Library. An interface can cover multiple related C modules and it is defined by a WWW*.h include file, for example WWWCore.h. On Windows platforms, each interface corresponds to a DLL with a DLL definition file defining all exported methods and data objects.

## Core Interfaces

The core interfaces must be included in all applications.

### wwwdll.dll

The wwwdll library is a tiny library that contains a pointer to the TTYPrint function. When Windows loads a DLL, the exported function and data pointers get "fixed up" in the other modules. Consequently, what may be a directly addressable piece of data in it's home library will be a pointer in the other libraries and executables that dynamically link to it. The TTYPrint pointer is exported to the other modules and referenced via the TTYPrint macro in HTUtils.h. wwwdll.dll also contains the WWW_TraceFlag to the same end of macroing the indirection.

- Definition list of exported API

### wwwutils.dll

The Utility modules are mostly container modules, dynamic strings and other stuff that you can't live without when building applications. The modules are used by the core part of the W3C Reference Library but can also be used by the application. See also the main Library include file called WWWLib.h which contains all converters and protocol modules known to the Library. You can include this one if the application is to use all the functionality of the Library.

- Definition list of exported API
- Interface include file

### wwwcore.dll

This is the basic include file for the core of the W3C Reference Library. Together with the WWWUtil module it contains all core specific modules which are required to compile and build the Library. The core part of the Library is designed as a set of registration modules with no real functionality in itself. Instead all the functionality comes when the application registers the modules that provides a desired functionality, for example accessing HTTP servers or the local file system. The Library has a special include file called WWWApp.h which a lot of application helper modules that makes it easier to use the core.

- Definition list of exported API
- Interface include file

## Stream Interfaces

### wwwcache.dll

The cache contains details of temporary disk files which contain the contents of remote documents.

- Definition list of exported API
- Interface include file

### wwwhtml.dll

This is the include file for the basic HTML module that can be used together with the core of the W3C Reference Library. It contains all HTML specific modules which are required to compile and build the HTML DLL. Please note that as the HText is not included in this interface. The reason is that the HText interface only is declared by the Library but must be defined by the application. Therefore it can not be part of a DLL but must be included directly in the application.

- Definition list of exported API
- Interface include file

### wwwdir.dll

This is the include file for the directory handling modules that can be used together with the core of the W3C Reference Library. It contains all Directory specific modules which are required to compile and build the DIRECTORY DLL.

- Definition list of exported API
- Interface include file

### wwwguess.dll

This interface provides functionality for guessing unknown media types from magic words. The stream is a one that reads first a chunk of stuff, tries to figure out the format, and calls `HTStreamStack()`. This is a kind of lazy-evaluation of `HTStreamStack()`. This could be extended arbitrarily to recognize all the possible file formats in the world, if someone only had time to do it.

- Definition list of exported API
- Interface include file

### wwwmime.dll

This is the module for basic RFC822/MIME parsing that can be used together with the core of the W3C Reference Library. It contains all MIME specific modules which are required to compile and build the MIME DLL.

- Definition list of exported API
- Interface include file

## Application Interfaces

### wwwrules.dll

A way to initialize applications is to use a rule file, also known as a configuration file. This is for example the case with the W3C httpd and the W3C Line Mode Browser. This module provides basic support for configuration file management and the application can use this is desired. The module is not referred to by the Library. Reading a rule file is implemented as a stream converter so that a rule file can come from anywhere, even across the network!

Applications do not have to provide native support for all protocols, they can in many situations rely on the support of proxies and gateways to help doing the job. Proxy servers are often used to carry client requests through a firewall where they can provide services like corporate caching and other network optimizations. Both Proxy servers and gateways can serve as "protocol translators" which can convert a request in the main Web protocol, HTTP, to an equivalent request in another protocol, for example NNTP, FTP, or Gopher. In case a proxy server or a gateway is available to the application, it can therefore by use of HTTP forward all requests to for example a proxy server which then handle the communications with the remote server, for example using FTP about the document and return it to the application (proxy client) using HTTP.

- Definition list of exported API
- Interface include file

### wwwapp.dll

This module provides some "make life easier" functions in order to get the application going. They help you generate the first anchor, also called the home anchor. It also contains a nice set of default WWW addresses.

- Definition list of exported API
- Interface include file

### Initialization Modules

The core parts of the Library is a framework for adding functionality. It has hooks for adding protocol modules, like for example HTTP, FTP, and also for adding streams that can convert from one media type to some other type, or presenting the result to the user. In the distribution file of the Library you will find a large set of protocol modules and streams already implemented. However, in order to use these you need to initialize them. This can be done by using the methods in the WWWInit module. You can modify these modules as you like to fit your particular needs. The modules in this interface are not part of any DLL and so must be included directly if desired.

- WWWInit Interface include file

## Protocol Interfaces

### wwwfile.dll

This is the include file for local file handling modules that can be used together with the core of the W3C Reference Library. It contains modules which are required to compile and build the FILE DLL.

- Definition list of exported API
- Interface include file

### wwwftp.dll

This is the include file for the basic FTP module that can be used together with the core of the W3C Reference Library. It contains all FTP specific modules which are required to compile and build the FTP DLL.

- Definition list of exported API
- Interface include file

### wwwgophe.dll

This is the include file for the basic GOPHER module that can be used together with the core of the W3C Reference Library. It contains all GOPHER specific modules which are required to compile and build the GOPHER DLL.

- Definition list of exported API
- Interface include file

### wwwhttp.dll

This is the include file for all HTTP access including the server side and the client side. It can be used together with the core of the W3C Reference Library. It contains all HTTP specific modules which are required to compile and build the HTTP DLL.

- Definition list of exported API
- Interface include file

### wwwnews.dll

This is the include file for the basic NNTP module that can be used together with the core of the W3C Reference Library. It contains all News specific modules which are required to compile and build the News DLL.

- Definition list of exported API
- Interface include file

### wwwtelnt.dll

This is the include file for the basic Telnet, rlogin, and TN3270 module that can be used together with the core of the W3C Reference Library. It contains all Telnet, rlogin, and TN3270 specific modules which are required to compile and build the Telnet, rlogin, and TN3270 DLL.

- Definition list of exported API
- Interface include file

### wwwwais.dll

This is the include file for the basic WAIS module that can be used together with the core of the W3C Reference Library. It contains all WAIS specific modules which are required to compile and build the WAIS DLL.

- Definition list of exported API
- Interface include file