Functional components of Netlib

This document attempts to break down the current netlib functionality into smaller more maintainable libraries. The current Netlib (circa 7/96) can be broken down into the following parts:

See also: proposed changes to the URL struct

URL parsing library
URL_Type, MakeAbsoluteURL, SpaceToPlus, EscapeURL, etc.
URL Loader Library
Net_GetURL, ProcessNet, InterruptWindow, etc.
Protocol library
Low level HTTP, FTP, etc. + mime header parsing
stream registration and setup library
StreamBuilder, RegisterContentTypeConverter, etc.
file extension to MIME type mapper
the cinfo stuff borrowed from the server team
Cache library
Disk and memory cache code
Random stream converters
view source converter, plaintext converter, etc.
Random XP Utilities
Help file parser, ScanForURL's, EscapeHTML
Stuff that belongs in the XFE
Mailcap parser and UNIX external viewer code
Stuff that belongs in MSGlib
Newsgroup handling code



Below is each of the libraries and a list of all the current Netlib PUBLIC API's sorted under the new library headings

(note that this list will have to be extended to export previously MODULE_PUBLIC api's that were shared only within the Netlib)

URL Parsing Library Public API

All functions are prepended by "URL_"

URL Lib dependancies

URL Struct Library Public API

This library will probably get folded into the URL loader library if it doesn't get larger.

All functions are prepended by "URLS_"

URLS Lib dependancies

URL Loader Library Public API

All functions are prepended by "LOADURL_"

Load URL lib dependancies

Protocol Library Public API

This library will likely be broken down further into one library per protocol.

Each protocol will have it's own directory and will be modeled after the JAVA URL Connection API.

All functions are prepended by "PROTO_"

PROTO dependancies

Stream Library Public API

All functions are prepended by "NETSTREAM_"

Stream lib dependancies

MIME type Library Public API

All functions are prepended by "MIMETYPE_"

mime type mapping library dependancies

Cache Library Public API

All functions are prepended by "CACHE_"

cache lib dependancies

Client Stream Converter Library Public API

All functions are prepended by "CSCL_"

client stream converter lib dependancies

XP Utility Library Public API

All functions are prepended by "XPUL_"

misc XP util dependancies

Functions that should be moved into the XFE

Functions that should be moved into the Message Lib

Changes to the URL struct

The URL struct can be broken down into two parts.

One part describes what is necessary to load the URL:

URL_Load_Struct
->address
->method
->post_data
->etc...

Another part describes the object after it is loaded:

URL_Desc_Struct
->content_type
->content_length
->last_modified
->etc...

The URL struct can then be expressed as a combination of the URL_Load_Struct and the URL_Desc_Struct.

Comments?
montulli@netscape.com