W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

Re: General questions

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Thu, 12 Nov 1998 23:22:24 -0500
To: www-lib@w3.org
Message-ID: <364BB3FF.87EE90E1@w3.org>
To: FOREST <laurent.forest@grenoble.sema.fr>

FOREST wrote:

> I am a beginner in libwww and I am confused (I have read the libwww architecture, overview, user's guide and some .h and .c files but I do not have yet an overall view of the library and of its possibilities). I have thousands of questions that I did not find the answers.
> I do not know if a role of the libwww group is to help the beginners. If not, just disintegrate this mail. If yes, thanks in advance.

No, this is the right place. The short answer is that libwww core doesn't do anything - it is simply a registry for handling protocols, transports, streams, and filters.

> Here are some of my thousands questions :

> 1) Termination callbacks
> -------------------------
> 1.1) HTNetAfter type
> 1.1.1) Does libwww checks the return value of a Callback ? If yes, what are the values a Callback can assign to the return code ?
>
> 1.1.2) What is the 'status' parameter of a Callback (the Protocol status ?) ?
> What are the possible values of this 'status' ?

The filters are described in more details in

    http://www.w3.org/Library/src/HTNet.html#callout

Filters can be registered either to handle all requests or to handle a specific request only. In certain cases, it is useful to be able to assign a specific set of filters to a specific request - this is what the "override" parameters allows you to do.

You can find a bunch of already implemented filters in

    http://www.w3.org/Library/src/HTFilter.html

the status parameter is the result of the request (and often the value which a particular filter has been registered to handle). For example, you can have a redirection filter, an authentication filter, etc. being called as a function of the status code. The status code is
passed to the filter as a single filter can be registered to handle multiple return codes.

> 1.1.3) HTRequest_addAfter, 'override' parameter
> What is the meaning of this parameter ?
> I guess it is :
> TRUE if I wish to replace the global filters by my Callback and FALSE if I wish to add a local filter (my Callback) to the global filters.
> Am I right or wrong ?

Yep

> 2) Anchor
> ----------
> What is the role of this class (I know what is an anchor in an HTML document but I cannot see what is an anchor in the libwww) ?
> Why some functions have an URI input parameter (eg HTLoadToChunk) while some others have an Anchor input parameter (eg HTPostFormAnchorToChunk) ?

An anchor is the internal representation of an URI and what we know about it (metainformation, the body of the document, etc). Furthermore, the anchor contains information about how one document is linked to other documents. The anchors are in effect a web representing what
the user has been in contact with while wondering about on the Web.

> 3) EventList
> -------------
> Why has the HTEventList_loop function a 'request' parameter ?
> The Event loop is not related to a given request but is common to all requests sent by the application. Right or wrong ?

Right on - it's just because the first version of the eventloop had a special request but that has since been removed - the additional work of changing the API wasn't worth it (I think).

Henrik
Received on Thursday, 12 November 1998 23:22:34 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 17:59:21 EDT