HTAlert.h   HTAlert.h 
skipping to change at line 94 skipping to change at line 94
typedef BOOL HTAlertCallback (HTRequest * request, HTAlertOpcode op, typedef BOOL HTAlertCallback (HTRequest * request, HTAlertOpcode op,
int msgnum, const char * dfault, void * inpu t, int msgnum, const char * dfault, void * inpu t,
HTAlertPar * reply); HTAlertPar * reply);
/* /*
If you don't expect any return values then reply can be NULL. If you don't expect any return values then reply can be NULL.
The return value of the callback function can be used to indicate confirmat ion The return value of the callback function can be used to indicate confirmat ion
on a prompt (Yes or No). on a prompt (Yes or No).
( .
String Messages User Prompts and Questions
) .
This is an enumerated list of messages that can be converted into a string This is an enumerated list of messages that can be converted into a string
table etc. table etc. See the HTDialog module for
default initialization of these strings.
*/ */
typedef enum _HTAlertMsg { typedef enum _HTAlertMsg {
HT_MSG_NULL = -1, HT_MSG_NULL = -1,
HT_MSG_UID = 0, HT_MSG_UID = 0,
HT_MSG_PROXY_UID, HT_MSG_PROXY_UID,
HT_MSG_FTP_UID, HT_MSG_FTP_UID,
HT_MSG_PW, HT_MSG_PW,
HT_MSG_FILENAME, HT_MSG_FILENAME,
HT_MSG_ACCOUNT, HT_MSG_ACCOUNT,
skipping to change at line 123 skipping to change at line 124
HT_MSG_FILE_REPLACE, HT_MSG_FILE_REPLACE,
HT_MSG_RETRY_AUTHENTICATION, HT_MSG_RETRY_AUTHENTICATION,
HT_MSG_RETRY_PROXY_AUTH, HT_MSG_RETRY_PROXY_AUTH,
HT_MSG_REDO, HT_MSG_REDO,
HT_MSG_BIG_PUT, HT_MSG_BIG_PUT,
HT_MSG_SOURCE_MOVED, HT_MSG_SOURCE_MOVED,
HT_MSG_DESTINATION_MOVED, HT_MSG_DESTINATION_MOVED,
HT_MSG_REDIRECTION, HT_MSG_REDIRECTION,
HT_MSG_PROXY, HT_MSG_PROXY,
HT_MSG_CACHE_LOCK, HT_MSG_CACHE_LOCK,
HT_MSG_ACCEPT_COOKIE,
HT_MSG_ELEMENTS /* This MUST be the last element */ HT_MSG_ELEMENTS /* This MUST be the last element */
} HTAlertMsg; } HTAlertMsg;
#define HT_MSG_ENGLISH_INITIALIZER \
"Please enter username:", \
"Please enter username for proxy authentication:", \
"Please enter username for this FTP server:", \
"Password:", \
"Please give name of file to save in:", \
"Plase enter account:", \
"You might not be allowed to use this method here, continue?", \
"Location has moved, continue?", \
"A new set of rules is requested to be added to your setup - continue?"
, \
"This file already exists - replace existing file?", \
"Authentication failed - retry?", \
"Proxy authentication failed - retry?", \
"This method has already been performed - repeat operation?", \
"This document is very big - continue operation?", \
"The source document for this operation has moved - continue operation
\
with new location?", \
"The destination document for this operation has moved - continue \
operation with new location?", \
"A redirection may change the behavior of this method - proceed anyway?
", \
"An automatic request for changing proxy has been encountered - continu
e?", \
"The persistent cache is already in use by another user. If this is not
\
the case then you can manually delete this lock and restart."
/* /*
. .
Enable or Disable Messages Enable or Disable Messages
. .
If you really don't want the library to prompt for anything at all then ena ble If you really don't want the library to prompt for anything at all then ena ble
this constant. The default value is Interactive. this constant. The default value is Interactive.
*/ */
extern void HTAlert_setInteractive (BOOL interative); extern void HTAlert_setInteractive (BOOL interative);
skipping to change at line 333 skipping to change at line 311
extern HTAlertCallback * HTAlert_find (HTAlertOpcode opcode); extern HTAlertCallback * HTAlert_find (HTAlertOpcode opcode);
/* /*
*/ */
#endif #endif
/* /*
@(#) $Id: HTAlert.html,v 2.54 1998/11/20 15:53:48 frystyk Exp $ @(#) $Id: HTAlert.html,v 2.55 1999/04/01 19:35:39 frystyk Exp $
*/ */
 End of changes. 5 change blocks. 
34 lines changed or deleted 7 lines changed or added


 HTBufWrt.h   HTBufWrt.h 
skipping to change at line 66 skipping to change at line 66
/* /*
. .
Buffered Write Stream Buffered Write Stream
. .
*/ */
extern HTOutput_new HTBufferWriter_new; extern HTOutput_new HTBufferWriter_new;
/* /*
.
Buffered Write Converter Stream
.
*/
extern HTOutputConverter_new HTBufferConverter_new;
/*
*/ */
#endif #endif
/* /*
@(#) $Id: HTBufWrt.html,v 2.5 1998/05/14 02:10:18 frystyk Exp $ @(#) $Id: HTBufWrt.html,v 2.6 1999/04/04 00:12:00 frystyk Exp $
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 HTCache.h   HTCache.h 
/* W3C Sample Code Library libwww Persis /*
tent Cache Manager
PERSISTENT CACHE MANAGER W3C Sample Code Library libwww Persi
stent Cache Manager
!
Persistent Cache Manager
!
*/
*/
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH ** Please first read the full copyright statement in the file COPYRIGH.
.
*/ */
/* /*
The cache contains details of persistent files which contain the content The cache contains details of persistent files which contain the contents
s of remote of remote documents. The existing cache manager is somewhat naive - especia
documents. The existing cache manager is somewhat naive - especially in lly
its garbage in its garbage collection but it is just an example of how it can be
collection but it is just an example of how it can be done.However, it i done.However, it is a fully HTTP/1.1 compliant cache manager. More adv
s a fully anced
HTTP/1.1 compliant cache manager. More advanced implementations are welc implementations are welcome!
ome!
This module is implemented by HTCache.c, and it is a part of the W3C Sam This module is implemented by HTCache.c, and it is
ple Code a part of the W3C Sample Code Library.
Library. */
*/
#ifndef HTCACHE_H #ifndef HTCACHE_H
#define HTCACHE_H #define HTCACHE_H
#include "WWWLib.h" #include "WWWLib.h"
/*
INITIALIZE AND TERMINATE THE PERSISTENT CACHE /*
.
The cache_root is the URI of the location of the persistent cache. An ex Initialize and Terminate the Persistent Cache
ample is .
"file:/tmp/w3c-lib". If cache_root is NULL then determine a cache root u
sing the
following algorithm:
Look for any environment variables (if supported) in the following or The cache_root is the URI of the location of the persistent
der: WWW_CACHE, cache. An example is "file:/tmp/w3c-lib". If
TMP, and TEMP. If none are set then then fall back on "/tmp". cache_root is NULL then determine a cache root
using the following algorithm:
Append the folder name "w3c-cache" to the root identified above o
Look for any environment variables (if supported) in the follow
ing order:
WWW_CACHE, TMP, and TEMP. If none
are set then then fall back on "/tmp".
o
Append the folder name "w3c-cache" to the root identified above
The cache_root location does not have to exist, it will be created autom The cache_root location does not have to exist, it will be created
atically if automatically if not. An empty string will make '/' the cache root.
not. An empty string will make '/' the cache root.
The size is the total size in MBytes - the default size is 20M. The cach The size is the total size in MBytes - the default size is 20M. The cache
e can not be can not be less than 5M.
less than 5M.
We can only enable the cache if we are in secure mode where we can not a We can only enable the cache if we are in secure
ccess the local mode where we can not access the local file system. This is for example
file system. This is for example the case if using an application as a t the case if using an application as a telnet shell.
elnet shell. */
*/
extern BOOL HTCacheInit (const char * cache_root, int size); extern BOOL HTCacheInit (const char * cache_root, int size);
/* /*
After the cache has been terminated it can not be used anymore unless yo After the cache has been terminated it can not be used anymore unless you
u do another do another HTCacheInit() call.
HTCacheInit() call. */
*/
extern BOOL HTCacheTerminate (void); extern BOOL HTCacheTerminate (void);
/*
CACHE MODE PARAMETERS /*
.
The persistent cache has a set of overall parameters that you can adjust Cache Mode Parameters
.
The persistent cache has a set of overall parameters that you can adjust
(
Enable and Disable the Cache Enable and Disable the Cache
)
The cache can be temporarily suspended by using the enable/disable flag. The cache can be temporarily suspended by using the enable/disable flag.
This does not This does not prevent the cache from being enabled/disable at a later point
prevent the cache from being enabled/disable at a later point in time. in time.
*/
*/
extern void HTCacheMode_setEnabled (BOOL mode); extern void HTCacheMode_setEnabled (BOOL mode);
extern BOOL HTCacheMode_enabled (void); extern BOOL HTCacheMode_enabled (void);
/* /*
The cache can be setup to whether cache password protected documents thr The cache can be setup to whether cache password protected documents thru t
u the protected he
flag. By default this flag is turned off. protected flag. By default this flag is turned off.
*/
*/
extern void HTCacheMode_setProtected (BOOL mode); extern void HTCacheMode_setProtected (BOOL mode);
extern BOOL HTCacheMode_protected (void); extern BOOL HTCacheMode_protected (void);
/*
/*
(
What is the current Cache Root? What is the current Cache Root?
)
Return the value of the cache root. The cache root can only be set throu Return the value of the cache root. The cache root can only be set through
gh the the HTCacheInit() function. The string returned MUST be freed
HTCacheInit() function. The string returned MUST be freed by the caller by the caller
*/
*/
extern char * HTCacheMode_getRoot (void); extern char * HTCacheMode_getRoot (void);
/*
/*
(
Total Cache Size Total Cache Size
)
We set the default cache size to 20M. We set the minimum size to 5M in o We set the default cache size to 20M. We set the minimum size to 5M in orde
rder not to get r
into weird problems while writing the cache. The size is indicated in Me not to get into weird problems while writing the cache. The size is indicat
ga bytes. The ed
size is given in MBytes and is also returned in MBytes. We don't conside in Mega bytes. The size is given in MBytes and is also returned in MBytes.
r the We don't consider the metainformation as part of the total cache size which
metainformation as part of the total cache size which is the the reason is the the reason for why the min cache size should not be less than 5M.
for why the min */
cache size should not be less than 5M.
*/
extern BOOL HTCacheMode_setMaxSize (int size); extern BOOL HTCacheMode_setMaxSize (int size);
extern int HTCacheMode_maxSize (void); extern int HTCacheMode_maxSize (void);
/*
/*
(
Max Size of a Single Cache Entry Max Size of a Single Cache Entry
)
It is also possible to control the max size of a single cache entry so t It is also possible to control the max size of a single cache entry so that
hat the cache the cache doesn't get filled with a very few, very large cached entries.
doesn't get filled with a very few, very large cached entries. The defau The default max size for a single cached entry is 3M. The value indicated
lt max size for must be in Mbytes, for example, a vaue of 3 would mean 3 MBytes.
a single cached entry is 3M. The value indicated must be in Mbytes, for */
example, a vaue
of 3 would mean 3 MBytes.
*/
extern BOOL HTCacheMode_setMaxCacheEntrySize (int size); extern BOOL HTCacheMode_setMaxCacheEntrySize (int size);
extern int HTCacheMode_maxCacheEntrySize (void); extern int HTCacheMode_maxCacheEntrySize (void);
/*
/*
(
How do we handle Expiration of Cached Objects? How do we handle Expiration of Cached Objects?
)
There are various ways of handling Expires header when met in a history There are various ways of handling Expires header when met in
list. Either it a history list. Either it can be ignored all together, the user can
can be ignored all together, the user can be notified with a warning, or be notified with a warning, or the document can be reloaded automatically.
the document This flag decides what action to be taken. The default action is
can be reloaded automatically. This flag decides what action to be taken HT_EXPIRES_IGNORE. In HT_EXPIRES_NOTIFY mode ,
. The default we push a message on to the Error stack which is presented to the user.
action is HT_EXPIRES_IGNORE. In HT_EXPIRES_NOTIFY mode , we push a messa */
ge on to the
Error stack which is presented to the user.
*/
typedef enum _HTExpiresMode { typedef enum _HTExpiresMode {
HT_EXPIRES_IGNORE = 0, HT_EXPIRES_IGNORE = 0,
HT_EXPIRES_NOTIFY, HT_EXPIRES_NOTIFY,
HT_EXPIRES_AUTO HT_EXPIRES_AUTO
} HTExpiresMode; } HTExpiresMode;
extern void HTCacheMode_setExpires (HTExpiresMode mode); extern void HTCacheMode_setExpires (HTExpiresMode mode);
extern HTExpiresMode HTCacheMode_expires (void); extern HTExpiresMode HTCacheMode_expires (void);
/*
/*
(
Disconnected Operation Disconnected Operation
)
The cache can be set to handle disconnected operation where it does not The cache can be set to handle disconnected operation where it does not use
use the network the network to validate entries and do not attempt to load new documents.
to validate entries and do not attempt to load new documents. All reques All requests that can not be fulfilled by the cache will be returned with
ts that can not a "504 Gateway Timeout" response. There are two modes of how
be fulfilled by the cache will be returned with a "504 Gateway Timeout" the cache can operate in disconnected mode:
response. There
are two modes of how the cache can operate in disconnected mode:
No network activity at all No network activity at all
Here is uses its own persistent cache
Forward all disconnected requests to a proxy cache Here is uses its own persistent cache
Here it uses the HTTP/1.1 cache-control to indicat
e that the Forward all disconnected requests to a proxy cache
proxy should operate in disconnected mode. This mo
de only really Here it uses the HTTP/1.1 cache-control to indicate that the proxy shou
makes sense when you are using a proxy, of course. ld
operate in disconnected mode. This mode only really makes sense when yo
u
are using a proxy, of course.
*/
*/
typedef enum _HTDisconnectedMode { typedef enum _HTDisconnectedMode {
HT_DISCONNECT_NONE = 0, HT_DISCONNECT_NONE = 0,
HT_DISCONNECT_NORMAL = 1, HT_DISCONNECT_NORMAL = 1,
HT_DISCONNECT_EXTERNAL = 2 HT_DISCONNECT_EXTERNAL = 2
} HTDisconnectedMode; } HTDisconnectedMode;
extern void HTCacheMode_setDisconnected (HTDisconnectedMode mode); extern void HTCacheMode_setDisconnected (HTDisconnectedMode mode);
extern HTDisconnectedMode HTCacheMode_disconnected (void); extern HTDisconnectedMode HTCacheMode_disconnected (void);
extern BOOL HTCacheMode_isDisconnected (HTReload mode); extern BOOL HTCacheMode_isDisconnected (HTReload mode);
/*
THE CACHE INDEX
The persistent cache keeps an index of its current entries so that garba /*
ge collection .
and lookup becomes more efficient. This index is stored automatically at The Cache Index
regular .
intervals so that we don't get out of sync. Also, it is automatically lo
aded at startup
and saved at closedown of the cache.
The persistent cache keeps an index of its current entries so that garbage
collection and lookup becomes more efficient. This index is stored automati
cally
at regular intervals so that we don't get out of sync. Also, it is automati
cally
loaded at startup and saved at closedown of the cache.
(
Reading the Cache Index Reading the Cache Index
)
Read the saved set of cached entries from disk. we only allow the index Read the saved set of cached entries from disk. we only allow the index ro
ro be read when be read when there is no entries in memory. That way we can ensure consista
there is no entries in memory. That way we can ensure consistancy. ncy.
*/
*/
extern BOOL HTCacheIndex_read (const char * cache_root); extern BOOL HTCacheIndex_read (const char * cache_root);
/*
/*
(
Write the Cache Index Write the Cache Index
)
Walk through the list of cached objects and save them to disk. We overri Walk through the list of cached objects and save them to disk. We override
de any existing any existing version but that is normally OK as we have already read its
version but that is normally OK as we have already read its contents. contents.
*/
*/
extern BOOL HTCacheIndex_write (const char * cache_root); extern BOOL HTCacheIndex_write (const char * cache_root);
/*
THE HTCACHE OBJECT /*
.
The HTCache Object
.
The cache object is what we store about a cached objet in memory. The cache object is what we store about a cached objet in memory.
*/
*/
typedef struct _HTCache HTCache; typedef struct _HTCache HTCache;
/*
/*
(
Create and Update a Cache Object Create and Update a Cache Object
)
Filling the cache is done as all other transportation of bulk data in li Filling the cache is done as all other transportation of bulk data in libww
bwww using w
streams. The cache object creater is a stream which in many cases sits o using streams. The cache object creater is a
n a T stream so stream which in many cases sits on a T stream so
that we get the original feed and at the same time can parse the content that we get the original feed and at the same time can parse the contents.
s.
In some situations, we want to append data to an already exiting cache e In some situations, we want to append data to an already exiting cache entr
ntry. This is y.
the case when a use has interrupted a download and we are stuck with a s This is the case when a use has interrupted a download and we are stuck wit
ubpart of the h
document. If the user later on whishes to download the object again we c a subpart of the document. If the user later on whishes to download the obj
an issue a ect
range request and continue from where we were. This will in many situati again we can issue a range request and continue from where we were. This
ons save a lot will in many situations save a lot of bandwidth.
of bandwidth. */
*/
extern HTConverter HTCacheWriter, HTCacheAppend; extern HTConverter HTCacheWriter, HTCacheAppend;
/* /*
This function writes the metainformation along with the data object stor This function writes the metainformation along with the data object stored
ed by the by the HTCacheWriter stream above. If no headers are available then the met
HTCacheWriter stream above. If no headers are available then the meta fi a
le is empty file is empty
*/
*/
extern BOOL HTCache_writeMeta (HTCache * cache, HTRequest * request, extern BOOL HTCache_writeMeta (HTCache * cache, HTRequest * request,
HTResponse * response); HTResponse * response);
/* /*
In case we received a "304 Not Modified" response then we do not have to In case we received a "304 Not Modified" response then we do
tough the body not have to tough the body but must merge the metainformation with the prev
but must merge the metainformation with the previous version. Therefore ious
we need a version. Therefore we need a special metainformation update function.
special metainformation update function. */
*/
extern BOOL HTCache_updateMeta (HTCache * cache, HTRequest * request, extern BOOL HTCache_updateMeta (HTCache * cache, HTRequest * request,
HTResponse * response); HTResponse * response);
/*
/*
(
Check Cached Entry Check Cached Entry
)
After we get a response back, we should check whether we can still cache After we get a response back, we should check whether we can still cache
an entry an entry and/or we should add an entry for a resource that has just been
and/or we should add an entry for a resource that has just been created created so that we can remember the etag and other things. The latter allow
so that we can s
remember the etag and other things. The latter allows us to guarantee th us to guarantee that we don't loose data due to the lost update problem.
at we don't */
loose data due to the lost update problem.
*/
extern HTCache * HTCache_touch (HTRequest * request, HTResponse * response, extern HTCache * HTCache_touch (HTRequest * request, HTResponse * response,
HTParentAnchor * anchor); HTParentAnchor * anchor);
/* /*
(
Load a Cached Object Load a Cached Object
)
Loading a cached object is also done as all other loads in libwww by usi Loading a cached object is also done as all other loads in libwww by using
ng a protocol a protocol load module. For the moment, this load
load module. For the moment, this load function handles the persistent c function handles the persistent cache as if it was on local file but in fac
ache as if it t
was on local file but in fact it could be anywhere.  it could be anywhere.
*/
*/
extern HTProtCallback HTLoadCache; extern HTProtCallback HTLoadCache;
/*
/*
(
Delete a Cache Object Delete a Cache Object
)
Remove a HTCache object from memory and from disk. You must explicitly r Remove a HTCache object from memory and from disk. You must explicitly remo
emove a lock ve
before this operation can succeed a lock before this operation can succeed
*/
*/
extern BOOL HTCache_remove (HTCache * cache); extern BOOL HTCache_remove (HTCache * cache);
/*
/*
(
Delete All Cache Objects in Memory Delete All Cache Objects in Memory
)
Destroys all cache entried in memory but does not write anything to disk Destroys all cache entried in memory but does not write anything to disk.
. Use the index Use the index methods above for doing that. We do not delete the disk conte
methods above for doing that. We do not delete the disk contents. nts.
*/
*/
extern BOOL HTCache_deleteAll (void); extern BOOL HTCache_deleteAll (void);
/*
/*
(
Delete all Cache Object and File Entries Delete all Cache Object and File Entries
)
Destroys all cache entried in memory and on disk. This call basically re Destroys all cache entried in memory and on disk. This call basically
sets the cache resets the cache to the inital state but it does not terminate the cache.
to the inital state but it does not terminate the cache. That is, you do That is, you don't have to reinitialize the cache before you can use it aga
n't have to in.
reinitialize the cache before you can use it again. */
*/
extern BOOL HTCache_flushAll (void); extern BOOL HTCache_flushAll (void);
/*
/*
(
Find a Cached Object Find a Cached Object
)
Verifies if a cache object exists for this URL and if so returns a URL f Verifies if a cache object exists for this URL and if so returns a URL for
or the cached the cached object. It does not verify whether the object is valid or not,
object. It does not verify whether the object is valid or not, for examp for example it might have expired. Use the cache validation methods for che
le it might cking
have expired. Use the cache validation methods for checking this. this.
*/
*/
extern HTCache * HTCache_find (HTParentAnchor * anchor); extern HTCache * HTCache_find (HTParentAnchor * anchor);
/*
/*
(
Verify if an Object is Fresh Verify if an Object is Fresh
)
This function checks whether a document has expired or not. The check is This function checks whether a document has expired or not. The check is
based on the based on the metainformation passed in the anchor object The function retur
metainformation passed in the anchor object The function returns the lev ns
el of the level of validation needed for getting a fresh version. We also check
validation needed for getting a fresh version. We also check the cache c the cache control directives in the request to see if they change the fresh
ontrol ness
directives in the request to see if they change the freshness discission discission.
. */
*/
extern HTReload HTCache_isFresh (HTCache * me, HTRequest * request); extern HTReload HTCache_isFresh (HTCache * me, HTRequest * request);
/*
/*
(
Register a Cache Hit Register a Cache Hit
)
As a cache hit may occur several places, we have a public function where As a cache hit may occur several places, we have a public function where
we can declare we can declare a download to be a true cache hit. The number of hits a cach
a download to be a true cache hit. The number of hits a cache object has e
affects its object has affects its status when we are doing garbage collection.
status when we are doing garbage collection. */
*/
extern BOOL HTCache_addHit (HTCache * cache); extern BOOL HTCache_addHit (HTCache * cache);
/*
/*
(
Find the Location of a Cached Object Find the Location of a Cached Object
)
Is we have a valid entry in the cache then we also need a location where Is we have a valid entry in the cache then we also need a location where
we can get it. we can get it. Hopefully, we may be able to access it thourgh one of our
Hopefully, we may be able to access it thourgh one of our protocol modul protocol modules, for example the local file module.
es, for example The name returned is in URL syntax and must be freed by the caller
the local file module. The name returned is in URL syntax and must be fr */
eed by the
caller
*/
extern char * HTCache_name (HTCache * cache); extern char * HTCache_name (HTCache * cache);
/*
/*
(
Locking a Cache Object Locking a Cache Object
)
While we are creating a new cache object or while we are validating an e While we are creating a new cache object or while we are validating an exis
xisting one, we ting
must have a lock on the entry so that not other requests can get to it i one, we must have a lock on the entry so that not other requests can get
n the mean to it in the mean while. A lock can be broken if the same request tries to
while. A lock can be broken if the same request tries to create the cach create the cache entry again. This means that we have tried to validate the
e entry again. cache entry but we got a new shipment of bytes back from the origin server
This means that we have tried to validate the cache entry but we got a n or an intermediary proxy.
ew shipment of */
bytes back from the origin server or an intermediary proxy.
*/
extern BOOL HTCache_getLock (HTCache * cache, HTRequest * request); extern BOOL HTCache_getLock (HTCache * cache, HTRequest * request);
extern BOOL HTCache_breakLock (HTCache * cache, HTRequest * request); extern BOOL HTCache_breakLock (HTCache * cache, HTRequest * request);
extern BOOL HTCache_hasLock (HTCache * cache); extern BOOL HTCache_hasLock (HTCache * cache);
extern BOOL HTCache_releaseLock (HTCache * cache); extern BOOL HTCache_releaseLock (HTCache * cache);
/* /*
*/
*/
#endif #endif
/*
___________________________________ /*
@(#) $Id: HTCache.html,v 2.22 1999/02/22 15:56 :04 kahan Exp $ @(#) $Id: HTCache.html,v 2.22 1999/02/22 15:56:04 kahan Exp $
*/ */
 End of changes. 138 change blocks. 
242 lines changed or deleted 270 lines changed or added


 HTDialog.h   HTDialog.h 
/* /*
W3C Sample Code Library libwww messa ges and dialogs W3C Sample Code Library libwww Messa ges and Dialogs
! !
Application side Error Messages And the like Application side Error Messages And the like
! !
*/ */
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH. ** Please first read the full copyright statement in the file COPYRIGH.
*/ */
skipping to change at line 28 skipping to change at line 28
application going. The functionality of this module was originally in application going. The functionality of this module was originally in
HTAccess, but now It is part of the HTAccess, but now It is part of the
application interface which the application application interface which the application
may use it if desired. may use it if desired.
This module is implemented by HTHome.c, and it is This module is implemented by HTHome.c, and it is
a part of the W3C Sample Code a part of the W3C Sample Code
Library. Library.
*/ */
#ifndef HTMSG_H #ifndef HTDIALOG_H
#define HTMSG_H #define HTDIALOG_H
#include "WWWLib.h" #include "WWWLib.h"
/* /*
. .
English Error Messages and Progress Notifications Default English Error Messages and Progress Notifications
. .
The following functions provide a default set of error messages and prompts
in plain English. You can of course change this as you like.
(
Default English User Prompts and Questions
)
This list corresponds to the enumeration list defined in the
HTAlert module
*/
#define HT_MSG_ENGLISH_INITIALIZER \
"Please enter username:", \
"Please enter username for proxy authentication:", \
"Please enter username for this FTP server:", \
"Password:", \
"Please give name of file to save in:", \
"Plase enter account:", \
"You might not be allowed to use this method here, continue?", \
"Location has moved, continue?", \
"A new set of rules is requested to be added to your setup - continue?"
, \
"This file already exists - replace existing file?", \
"Authentication failed - retry?", \
"Proxy authentication failed - retry?", \
"This method has already been performed - repeat operation?", \
"This document is very big - continue operation?", \
"The source document for this operation has moved - continue operation
\
with new location?", \
"The destination document for this operation has moved - continue \
operation with new location?", \
"A redirection may change the behavior of this method - proceed anyway?
", \
"An automatic request for changing proxy has been encountered - continu
e?", \
"The persistent cache is already in use by another user. If this is not
\
the case then you can manually delete this lock and restart.", \
"The server has sent you a cookie - accept?"
/*
(
Default English Messages and Progress Notifications
)
This list corresponds to the enumeration list defined in the
HTError module
*/
/* CODE ERROR MESSAGE ERROR URL */
#define HTERR_ENGLISH_INITIALIZER \
{ 100, "Continue", "information
" }, \
{ 101, "Switching Protocols", "information" }, \
{ 200, "OK", "success" }, \
{ 201, "Created", "success" }, \
{ 202, "Accepted", "success" },
\
{ 203, "Non-authoritative Information", "success" }, \
{ 204, "Document Updated", "success" }, \
{ 205, "Reset Content", "success" }, \
{ 206, "Partial Content", "success" }, \
{ 207, "Partial Update OK", "success" },
\
{ 300, "Multiple Choices", "redirection" }, \
{ 301, "Moved Permanently", "redirection
" }, \
{ 302, "Found", "redirection" }, \
{ 303, "See Other", "redirection
" }, \
{ 304, "Not Modified", "redirection" }, \
{ 305, "Use Proxy", "redirection
" }, \
{ 306, "Proxy Redirect", "redirection" }, \
{ 307, "Temporary Redirect", "redirection" }, \
{ 400, "Bad Request", "client_error" }, \
{ 401, "Unauthorized", "client_error" }, \
{ 402, "Payment Required", "client_erro
r" }, \
{ 403, "Forbidden", "client_error" }, \
{ 404, "Not Found", "client_erro
r" }, \
{ 405, "Method Not Allowed", "client_error" }, \
{ 406, "Not Acceptable", "client_error" }, \
{ 407, "Proxy Authentication Required", "client_error" }, \
{ 408, "Request Timeout", "client_error" }, \
{ 409, "Conflict", "client_error" }, \
{ 410, "Gone", "client_error" }, \
{ 411, "Length Required", "client_error" }, \
{ 412, "Precondition Failed", "client_error" }, \
{ 413, "Request Entity Too Large", "client_error" }, \
{ 414, "Request-URI Too Large", "client_error" }, \
{ 415, "Unsupported Media Type", "client_error" }, \
{ 416, "Range Not Satisfiable", "client_error" }, \
{ 417, "Expectation Failed", "client_error" }, \
{ 418, "Reauthentication Required", "client_erro
r" }, \
{ 419, "Proxy Reauthentication Reuired", "client_error" }, \
{ 500, "Internal Server Error", "server_error" }, \
{ 501, "Not Implemented", "server_error" }, \
{ 502, "Bad Gateway", "server_error" }, \
{ 503, "Service Unavailable", "server_error" }, \
{ 504, "Gateway Timeout", "server_error" }, \
{ 505, "HTTP Version not supported", "server_error" }, \
{ 506, "Partial update Not Implemented", "server_error" }, \
\
/* Cache Warnings */ \
{ 10, "Response is Stale", "cache" }, \
{ 11, "Revalidation Failed", "cache" }, \
{ 12, "Disconnected Opeartion", "cache" }, \
{ 13, "Heuristic Expiration", "cache" }, \
{ 14, "Transformation Applied", "cache" }, \
{ 99, "Cache warning", "cache" }, \
\
/* Non-HTTP Error codes and warnings */ \
{ 0, "Can't locate remote host", "internal" }
, \
{ 0, "No host name found", "internal" }, \
{ 0, "No file name found or file not accessible", "internal" }, \
{ 0, "FTP server replies", "internal" }, \
{ 0, "FTP server doesn't reply", "internal" }
, \
{ 0, "FTP login failure", "internal" }, \
{ 0, "Server timed out", "internal" }
, \
{ 0, "Gopher-server replies", "internal" }, \
{ 0, "Data transfer interrupted", "internal" }, \
{ 0, "Connection establishment interrupted", "internal" }, \
{ 0, "CSO-server replies", "internal" }, \
{ 0, "This is probably a HTTP server 0.9 or less","internal" }, \
{ 0, "Bad, Incomplete, or Unknown Response", "internal" }, \
{ 0, "Unknown access authentication scheme", "internal" }, \
{ 0, "News-server replies", "internal" }, \
{ 0, "Trying `ftp://' instead of `file://'", "internal" }, \
{ 0, "Too many redirections", "internal" }, \
{ 0, "Method not suited for automatic redirection","internal" }, \
{ 0, "Premature End Of File", "internal" }, \
{ 0, "Response from WAIS Server too Large - Extra lines \
ignored","internal"}, \
{ 0, "WAIS-server doesn't return any data", "internal" }, \
{ 0, "Can't connect to WAIS-server", "internal" }, \
{ 0, "operation failed", "internal" }, \
{ 0, "Wrong or unknown access scheme", "internal" }, \
{ 0, "Access scheme not allowed in this context", "internal" }
, \
{ 0, "When you are connected, you can log in", "internal" }, \
{ 0, "This version has expired and will be automatically reloaded", "
internal" }, \
{ 0, "Loading new rules must be explicitly acknowledged", "internal"
}, \
{ 0, "Automatic proxy redirection must be explicitly acknowledged", "
internal" }
/*
(
Generate a Default Error Message
)
This function provides an unformatted English string containing the possibl y This function provides an unformatted English string containing the possibl y
nested status message that explains the result of a request. This is essent ially nested status message that explains the result of a request. This is essent ially
"flattening out" the information provided in the request "flattening out" the information provided in the request
error strack. The string must be freed by the caller. error strack. The string must be freed by the caller.
*/ */
extern char * HTDialog_errorMessage (HTRequest * request, HTAlertOpcode op, extern char * HTDialog_errorMessage (HTRequest * request, HTAlertOpcode op,
int msgnum, const char * dfault, int msgnum, const char * dfault,
void * input); void * input);
/* /*
(
Generate a Default Progress Notification Message
)
This function provides a string containin an English progress message that This function provides a string containin an English progress message that
the application can present to the user if desired. The string must be free d the application can present to the user if desired. The string must be free d
by the caller. by the caller.
*/ */
extern char * HTDialog_progressMessage (HTRequest * request, HTAlertOpcode op, extern char * HTDialog_progressMessage (HTRequest * request, HTAlertOpcode op,
int msgnum, const char * dfault, int msgnum, const char * dfault,
void * input); void * input);
skipping to change at line 171 skipping to change at line 311
can then be multi-linguistic. can then be multi-linguistic.
*/ */
extern BOOL HTError_response (HTRequest * request, HTAlertOpcode op, extern BOOL HTError_response (HTRequest * request, HTAlertOpcode op,
int msgnum, const char * dfault, void * input, int msgnum, const char * dfault, void * input,
HTAlertPar * reply); HTAlertPar * reply);
/* /*
*/ */
#endif /* HTHOME_H */ #endif /* HTDIALOG_H */
/* /*
@(#) $Id: HTDialog.html,v 2.8 1998/10/13 19:18:30 frystyk Exp $ @(#) $Id: HTDialog.html,v 2.9 1999/04/01 19:35:39 frystyk Exp $
*/ */
 End of changes. 7 change blocks. 
6 lines changed or deleted 167 lines changed or added


 HTError.h   HTError.h 
skipping to change at line 48 skipping to change at line 48
ERR_FATAL = 0x1, ERR_FATAL = 0x1,
ERR_NON_FATAL = 0x2, ERR_NON_FATAL = 0x2,
ERR_WARN = 0x4, ERR_WARN = 0x4,
ERR_INFO = 0x8 ERR_INFO = 0x8
} HTSeverity; } HTSeverity;
#include "HTReq.h" #include "HTReq.h"
/* /*
. .
Error Codes and Messages
.
Note: All non-HTTP error codes have (index number >
HTERR_HTTP_CODES), and they will not be shown in the error-message
generated.
(
The Error Message Object The Error Message Object
) .
An error consists of a messsage code, a short, natural language specific An error consists of a messsage code, a short, natural language specific
message, and a URI which can point to more information. This module also message, and a URI which can point to more information. This module also
provides a default set of error objects with English text. provides a default set of error objects with English text.
Errors are registered together with a severity and you can also set the mod e Errors are registered together with a severity and you can also set the mod e
for what class of error severities should be shown and which for what class of error severities should be shown and which
should be ignored. should be ignored.
*/ */
typedef struct _HTErrorMessage { typedef struct _HTErrorMessage {
int code; /* Error number */ int code; /* Error number */
char * msg; /* Short explanation */ char * msg; /* Short explanation */
char * url; /* Explaning URL */ char * url; /* Explaning URL */
} HTErrorMessage; } HTErrorMessage;
/* /*
( (
Error Message Index Error Message Index
) )
Note: All non-HTTP error codes have (index number >
HTERR_HTTP_CODES), and they will not be shown in the error-message
generated.
Error codes are registered in an array where the following enumerations ser ve Error codes are registered in an array where the following enumerations ser ve
as an index. They must not be replaced! as an index. They must not be replaced! See the
HTDialog module for default initialization
of these messages.
*/ */
typedef enum _HTErrorElement { typedef enum _HTErrorElement {
HTERR_CONTINUE = 0, /* 100 */ HTERR_CONTINUE = 0, /* 100 */
HTERR_SWITCHING, /* 101 */ HTERR_SWITCHING, /* 101 */
HTERR_OK, /* 200 */ HTERR_OK, /* 200 */
HTERR_CREATED, /* 201 */ HTERR_CREATED, /* 201 */
HTERR_ACCEPTED, /* 202 */ HTERR_ACCEPTED, /* 202 */
HTERR_NON_AUTHORITATIVE, /* 203 */ HTERR_NON_AUTHORITATIVE, /* 203 */
HTERR_NO_CONTENT, /* 204 */ HTERR_NO_CONTENT, /* 204 */
skipping to change at line 175 skipping to change at line 174
HTERR_NO_AUTO_PROXY, HTERR_NO_AUTO_PROXY,
HTERR_ELEMENTS /* This MUST be the last element */ HTERR_ELEMENTS /* This MUST be the last element */
} HTErrorElement; } HTErrorElement;
/* /*
( (
Default English Language Messages Default English Language Messages
) )
Default set of error messages arranged in an array into which the Default set of error messages arranged in an array into which the
index codes serve as index. These error objects can index codes serve as index. See the
of course be initialized as you like. HTDialog module for default initialization
*/ of these strings.
/* CODE ERROR MESSAGE ERROR URL */
#define HTERR_ENGLISH_INITIALIZER \
{ 100, "Continue", "information
" }, \
{ 101, "Switching Protocols", "information" }, \
{ 200, "OK", "success" }, \
{ 201, "Created", "success" }, \
{ 202, "Accepted", "success" },
\
{ 203, "Non-authoritative Information", "success" }, \
{ 204, "Document Updated", "success" }, \
{ 205, "Reset Content", "success" }, \
{ 206, "Partial Content", "success" }, \
{ 207, "Partial Update OK", "success" },
\
{ 300, "Multiple Choices", "redirection" }, \
{ 301, "Moved Permanently", "redirection
" }, \
{ 302, "Found", "redirection" }, \
{ 303, "See Other", "redirection
" }, \
{ 304, "Not Modified", "redirection" }, \
{ 305, "Use Proxy", "redirection
" }, \
{ 306, "Proxy Redirect", "redirection" }, \
{ 307, "Temporary Redirect", "redirection" }, \
{ 400, "Bad Request", "client_error" }, \
{ 401, "Unauthorized", "client_error" }, \
{ 402, "Payment Required", "client_erro
r" }, \
{ 403, "Forbidden", "client_error" }, \
{ 404, "Not Found", "client_erro
r" }, \
{ 405, "Method Not Allowed", "client_error" }, \
{ 406, "Not Acceptable", "client_error" }, \
{ 407, "Proxy Authentication Required", "client_error" }, \
{ 408, "Request Timeout", "client_error" }, \
{ 409, "Conflict", "client_error" }, \
{ 410, "Gone", "client_error" }, \
{ 411, "Length Required", "client_error" }, \
{ 412, "Precondition Failed", "client_error" }, \
{ 413, "Request Entity Too Large", "client_error" }, \
{ 414, "Request-URI Too Large", "client_error" }, \
{ 415, "Unsupported Media Type", "client_error" }, \
{ 416, "Range Not Satisfiable", "client_error" }, \
{ 417, "Expectation Failed", "client_error" }, \
{ 418, "Reauthentication Required", "client_erro
r" }, \
{ 419, "Proxy Reauthentication Reuired", "client_error" }, \
{ 500, "Internal Server Error", "server_error" }, \
{ 501, "Not Implemented", "server_error" }, \
{ 502, "Bad Gateway", "server_error" }, \
{ 503, "Service Unavailable", "server_error" }, \
{ 504, "Gateway Timeout", "server_error" }, \
{ 505, "HTTP Version not supported", "server_error" }, \
{ 506, "Partial update Not Implemented", "server_error" }, \
\
/* Cache Warnings */ \
{ 10, "Response is Stale", "cache" }, \
{ 11, "Revalidation Failed", "cache" }, \
{ 12, "Disconnected Opeartion", "cache" }, \
{ 13, "Heuristic Expiration", "cache" }, \
{ 14, "Transformation Applied", "cache" }, \
{ 99, "Cache warning", "cache" }, \
\
/* Non-HTTP Error codes and warnings */ \
{ 0, "Can't locate remote host", "internal" }
, \
{ 0, "No host name found", "internal" }, \
{ 0, "No file name found or file not accessible", "internal" }, \
{ 0, "FTP server replies", "internal" }, \
{ 0, "FTP server doesn't reply", "internal" }
, \
{ 0, "FTP login failure", "internal" }, \
{ 0, "Server timed out", "internal" }
, \
{ 0, "Gopher-server replies", "internal" }, \
{ 0, "Data transfer interrupted", "internal" }, \
{ 0, "Connection establishment interrupted", "internal" }, \
{ 0, "CSO-server replies", "internal" }, \
{ 0, "This is probably a HTTP server 0.9 or less","internal" }, \
{ 0, "Bad, Incomplete, or Unknown Response", "internal" }, \
{ 0, "Unknown access authentication scheme", "internal" }, \
{ 0, "News-server replies", "internal" }, \
{ 0, "Trying `ftp://' instead of `file://'", "internal" }, \
{ 0, "Too many redirections", "internal" }, \
{ 0, "Method not suited for automatic redirection","internal" }, \
{ 0, "Premature End Of File", "internal" }, \
{ 0, "Response from WAIS Server too Large - Extra lines \
ignored","internal"}, \
{ 0, "WAIS-server doesn't return any data", "internal" }, \
{ 0, "Can't connect to WAIS-server", "internal" }, \
{ 0, "operation failed", "internal" }, \
{ 0, "Wrong or unknown access scheme", "internal" }, \
{ 0, "Access scheme not allowed in this context", "internal" }
, \
{ 0, "When you are connected, you can log in", "internal" }, \
{ 0, "This version has expired and will be automatically reloaded", "
internal" }, \
{ 0, "Loading new rules must be explicitly acknowledged", "internal"
}, \
{ 0, "Automatic proxy redirection must be explicitly acknowledged", "
internal" }
/*
. .
What Errors should be Ignored or Passed Through? What Errors should be Ignored or Passed Through?
. .
This variable dictates which errors should be put out when generating the This variable dictates which errors should be put out when generating the
message to the user. The first four enumerations make it possible to see message to the user. The first four enumerations make it possible to see
`everything as bad or worse than' this level, e.g. HT_ERR_SHOW_NON_FATAL `everything as bad or worse than' this level, e.g. HT_ERR_SHOW_NON_FATAL
shows messages of type HT_ERR_SHOW_NON_FATAL and shows messages of type HT_ERR_SHOW_NON_FATAL and
HT_ERR_SHOW_FATAL. HT_ERR_SHOW_FATAL.
skipping to change at line 436 skipping to change at line 345
( (
Where did it happen? Where did it happen?
) )
*/ */
extern const char * HTError_location (HTError * info); extern const char * HTError_location (HTError * info);
/* /*
*/ */
#endif #endif /* HTERROR_H */
/* /*
@(#) $Id: HTError.html,v 2.49 1998/10/26 21:36:25 frystyk Exp $ @(#) $Id: HTError.html,v 2.50 1999/04/01 19:35:39 frystyk Exp $
*/ */
 End of changes. 7 change blocks. 
120 lines changed or deleted 13 lines changed or added


 HTFormat.h   HTFormat.h 
skipping to change at line 178 skipping to change at line 178
#define WWW_HTML HTAtom_for("text/html") #define WWW_HTML HTAtom_for("text/html")
#define WWW_PLAINTEXT HTAtom_for("text/plain") #define WWW_PLAINTEXT HTAtom_for("text/plain")
#define WWW_FORM HTAtom_for("application/x-www-form-urlencoded") #define WWW_FORM HTAtom_for("application/x-www-form-urlencoded")
#define WWW_MIME HTAtom_for("message/rfc822") #define WWW_MIME HTAtom_for("message/rfc822")
#define WWW_MIME_HEAD HTAtom_for("message/x-rfc822-head") #define WWW_MIME_HEAD HTAtom_for("message/x-rfc822-head")
#define WWW_MIME_FOOT HTAtom_for("message/x-rfc822-foot") #define WWW_MIME_FOOT HTAtom_for("message/x-rfc822-foot")
#define WWW_MIME_PART HTAtom_for("message/x-rfc822-partial") #define WWW_MIME_PART HTAtom_for("message/x-rfc822-partial")
#define WWW_MIME_CONT HTAtom_for("message/x-rfc822-cont") #define WWW_MIME_CONT HTAtom_for("message/x-rfc822-cont")
#define WWW_MIME_UPGRADE HTAtom_for("message/x-rfc822-upgrade")
#define WWW_AUDIO HTAtom_for("audio/basic") #define WWW_AUDIO HTAtom_for("audio/basic")
#define WWW_VIDEO HTAtom_for("video/mpeg") #define WWW_VIDEO HTAtom_for("video/mpeg")
#define WWW_GIF HTAtom_for("image/gif") #define WWW_GIF HTAtom_for("image/gif")
#define WWW_JPEG HTAtom_for("image/jpeg") #define WWW_JPEG HTAtom_for("image/jpeg")
#define WWW_TIFF HTAtom_for("image/tiff") #define WWW_TIFF HTAtom_for("image/tiff")
#define WWW_PNG HTAtom_for("image/png") #define WWW_PNG HTAtom_for("image/png")
skipping to change at line 754 skipping to change at line 755
double secs_per_byte; double secs_per_byte;
} HTPresentation; } HTPresentation;
/* /*
*/ */
#endif /* HTFORMAT */ #endif /* HTFORMAT */
/* /*
@(#) $Id: HTFormat.html,v 2.83 1999/02/07 18:27:49 frystyk Exp $ @(#) $Id: HTFormat.html,v 2.84 1999/02/27 01:28:40 frystyk Exp $
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 HTHost.h   HTHost.h 
skipping to change at line 87 skipping to change at line 87
) )
Searches the cache of known hosts to see if we already have information abo ut Searches the cache of known hosts to see if we already have information abo ut
this host. If not then we return NULL. this host. If not then we return NULL.
*/ */
extern HTHost * HTHost_find (char * host); extern HTHost * HTHost_find (char * host);
/* /*
( (
Delete the Host table
)
Cleanup and delete the host table.
*/
extern void HTHost_deleteAll (void);
/*
(
Is Host Idle? Is Host Idle?
) )
You can use this function to see whether a host object is idle or in use. You can use this function to see whether a host object is idle or in use.
We have several modes describing how and when a host is idle. This is a fun ction We have several modes describing how and when a host is idle. This is a fun ction
of the Transport Object of the Transport Object
*/ */
extern BOOL HTHost_isIdle (HTHost * host); extern BOOL HTHost_isIdle (HTHost * host);
skipping to change at line 488 skipping to change at line 498
at any one time on a single, persistent connection. The higher the number, at any one time on a single, persistent connection. The higher the number,
the more we have to recover if the server closes the connection prematurely . the more we have to recover if the server closes the connection prematurely .
The default is about 50 requests which is enough to fill most links. The default is about 50 requests which is enough to fill most links.
*/ */
extern BOOL HTHost_setMaxPipelinedRequests (int max); extern BOOL HTHost_setMaxPipelinedRequests (int max);
extern int HTHost_maxPipelinedRequests (void); extern int HTHost_maxPipelinedRequests (void);
/* /*
( (
How many Pending and Outstanding Net objects are there on a Host?
)
You can query how many Het objects (essentially requests) are outstanding
or pending on a host object using these methods:
*/
extern int HTHost_numberOfOutstandingNetObjects (HTHost * host);
extern int HTHost_numberOfPendingNetObjects (HTHost * host);
/*
(
Pipeline Recovery Pipeline Recovery
) )
Pipelines normally run by themselves (requests are issued and responses Pipelines normally run by themselves (requests are issued and responses
recieved). However, it may be necessry to either prematurely abort a pipeli ne recieved). However, it may be necessry to either prematurely abort a pipeli ne
or to recover a broken pipeline due to communication problems with the serv er. or to recover a broken pipeline due to communication problems with the serv er.
In case a pipeline is broken then we have to recover it and start again. In case a pipeline is broken then we have to recover it and start again.
This is handled automatically by the host object, so you do not have to cal l This is handled automatically by the host object, so you do not have to cal l
this one explicitly. this one explicitly.
*/ */
skipping to change at line 614 skipping to change at line 636
(HTHost_ActivateRequestCallback * cbf); (HTHost_ActivateRequestCallback * cbf);
/* /*
*/ */
#endif /* HTHOST_H */ #endif /* HTHOST_H */
/* /*
@(#) $Id: HTHost.html,v 2.26 1999/02/07 18:20:31 frystyk Exp $ @(#) $Id: HTHost.html,v 2.28 1999/03/31 19:48:21 frystyk Exp $
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 23 lines changed or added


 HTIOStream.h   HTIOStream.h 
skipping to change at line 197 skipping to change at line 197
Transport Output Stream Transport Output Stream
) )
*/ */
typedef HTOutputStream * HTOutput_new (HTHost * host, typedef HTOutputStream * HTOutput_new (HTHost * host,
HTChannel * ch, HTChannel * ch,
void * param, void * param,
int mode); int mode);
/* /*
(
Transport Output Stream Converter
)
*/
typedef HTOutputStream * HTOutputConverter_new(
HTHost * host,
HTChannel * ch,
void * param,
int mode,
HTOutputStream * target);
/*
*/ */
#endif /* HTIOSTREAM_H */ #endif /* HTIOSTREAM_H */
/* /*
@(#) $Id: HTIOStream.html,v 2.5 1998/05/14 02:10:35 frystyk Exp $ @(#) $Id: HTIOStream.html,v 2.6 1999/04/04 00:12:00 frystyk Exp $
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 14 lines changed or added


 HTInit.h   HTInit.h 
/* W3C Sample Code Library libwww Defa /*
ult Initialization
DEFAULT INITIALIZATION METHODS W3C Sample Code Library libwww Defau
lt Initialization
!
Default Initialization Methods
!
*/
*/
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH ** Please first read the full copyright statement in the file COPYRIGH.
.
*/ */
/* /*
As mentioned in the Library Architecture, libwww consists of a small cor As mentioned in the Library Architecture,
e and a large libwww consists of a small core and a large set of hooks for adding
set of hooks for adding functionality. By itself, the core it not capabl functionality. By itself, the core it not capable of performing any Web rel
e of performing ated
any Web related tasks like accessing a HTTP server or parsing a HTML doc tasks like accessing a HTTP server or parsing a HTML document. All this
ument. All this functionality must be registered by the application. This way, the core of
functionality must be registered by the application. This way, the core libwww is kept application independent and can be used as the basic buildin
of libwww is g
kept application independent and can be used as the basic building block block for any kind of Web application. The Library comes with a large set
for any kind of default functions, for example for accessing HTTP and FTP servers, parsi
of Web application. The Library comes with a large set of default functi ng
ons, for RFC
example for accessing HTTP and FTP servers, parsing RFC 822 headers etc. 822 headers etc. This module helps the application programmer setting
This module up all this functionality, but it is important to note that none of it is
helps the application programmer setting up all this functionality, but required in order to use the Library.
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 Samp This module is implemented by HTInit.c, and it is
le Code a part of the W3C Sample Code
Library. You can also have a look at the other Initialization modules. Library. You can also have a look at the other
Initialization modules.
*/
*/
#ifndef HTINIT_H #ifndef HTINIT_H
#define HTINIT_H #define HTINIT_H
#include "WWWLib.h" #include "WWWLib.h"
#include "WWWApp.h" #include "WWWApp.h"
/*
DEFAULT TRANSPORT PROTOCOL MODULES /*
.
Default Transport Protocol Modules
.
Register the default set of transport protocols. Register the default set of transport protocols.
*/
*/
#include "WWWTrans.h" #include "WWWTrans.h"
extern void HTTransportInit (void); extern void HTTransportInit (void);
/*
DEFAULT PROTOCOL MODULES /*
.
Default Protocol Modules
.
Set up default bindings between access schemes and the set of protocol m Set up default bindings between access schemes and the set of protocol modu
odules in the les
Library. The preemptive version registers all protocol modules to use bl in the Library. The preemptive version registers all protocol modules to
ocking sockets. use blocking sockets.
*/
*/
#include "WWWHTTP.h" #include "WWWHTTP.h"
#include "WWWFile.h" #include "WWWFile.h"
#include "WWWFTP.h" #include "WWWFTP.h"
#include "WWWGophe.h" #include "WWWGophe.h"
#include "WWWTelnt.h" #include "WWWTelnt.h"
#include "WWWNews.h" #include "WWWNews.h"
#ifdef HT_DIRECT_WAIS #ifdef HT_DIRECT_WAIS
#include "WWWWAIS.h" #include "WWWWAIS.h"
#endif #endif
#ifndef FTP_PORT #ifndef FTP_PORT
#define FTP_PORT 21 #define FTP_PORT 21
#endif #endif
#ifndef NEWS_PORT #ifndef NEWS_PORT
#define NEWS_PORT 119 #define NEWS_PORT 119
#endif #endif
#ifndef GOPHER_PORT #ifndef GOPHER_PORT
#define GOPHER_PORT 70 #define GOPHER_PORT 70
#endif #endif
#ifndef WAIS_PORT #ifndef WAIS_PORT
#define WAIS_PORT 666 #define WAIS_PORT 666
#endif #endif
#ifndef HTTP_PORT #ifndef HTTP_PORT
#define HTTP_PORT 80 #define HTTP_PORT 80
#endif #endif
#define HTAccessInit HTProtocolInit #define HTAccessInit HTProtocolInit
extern void HTProtocolInit (void); extern void HTProtocolInit (void);
extern void HTProtocolPreemptiveInit (void); extern void HTProtocolPreemptiveInit (void);
/*
DEFAULT MIME PARSERS /*
.
Default MIME Parsers
.
The core doesn't have any built in MIME parsers, but many of the protoco The core doesn't have any built in MIME parsers, but many of the protocols
ls need them. need them. For instance, many elements of the library rely on the
For instance, many elements of the library rely on the Content-Length be Content-Length being correctly set. HTMIMEInit()
ing correctly provides the minimal functionality needed for library reliabilty.
set. HTMIMEInit() provides the minimal functionality needed for library */
reliabilty.
*/
#include "WWWMIME.h" #include "WWWMIME.h"
#include "WWWApp.h" #include "WWWApp.h"
extern void HTMIMEInit (void); extern void HTMIMEInit (void);
/*
DEFAULT EVENT MANAGER /*
.
Default Event Manager
.
libwww core does not have any default event loop - it has to be added by libwww core does not have any default event loop - it has to be added by
the the application. However, it does come with an example implementation thta
application. However, it does come with an example implementation thta m may be used. This implementation is based on a select system
ay be used. call using non-blocking and interleaved sockets.
This implementation is based on a select system call using non-blocking */
and interleaved
sockets.
*/
#include "WWWApp.h" #include "WWWApp.h"
/*
DEFAULT MEDIA TYPE CONVERSIONS /*
.
Default Media Type Conversions
.
The Converters are used to convert a media type to another media type, o The Converters are used to convert a media type to another media
r to present it type, or to present it on screen. This is a part of the stream stack algori
on screen. This is a part of the stream stack algorithm. The Presenters thm.
are also used The Presenters are also used in the stream stack, but are initialized separ
in the stream stack, but are initialized separately. ately.
*/
*/
#include "WWWMIME.h" #include "WWWMIME.h"
#include "WWWHTML.h" #include "WWWHTML.h"
#include "WWWStream.h" #include "WWWStream.h"
#include "WWWDir.h" #include "WWWDir.h"
#include "WWWCache.h" #include "WWWCache.h"
#ifdef HT_EXPAT #ifdef HT_EXPAT
#include "WWWXML.h" #include "WWWXML.h"
#endif #endif
extern void HTConverterInit (HTList * conversions); extern void HTConverterInit (HTList * conversions);
/*
/*
(
Presenters Presenters
)
The Presenters are used to present a media type to the use by calling an The Presenters are used to present a media type to the use by calling
external an external program, for example a post script viewer. This is a part of
program, for example a post script viewer. This is a part of the stream the stream stack algorithm. The Converters are also used in the stream
stack stack, but are initialized separately. The Presenters use the same
algorithm. The Converters are also used in the stream stack, but are ini include files as the Converters.
tialized */
separately. The Presenters use the same include files as the Converters.
*/ extern void HTPresenterInit (HTList * conversions);
extern void HTPresenterInit (HTList * conversions);
/*
/*
(
Converters and Presenters Converters and Presenters
)
This function is only defined in order to preserve backward compatibilit This function is only defined in order to preserve backward compatibility.
y. */
*/
extern void HTFormatInit (HTList * conversions);
/*
DEFAULT TRANSFER ENCODINGS extern void HTFormatInit (HTList * conversions);
Transfer encoders and decoders can handle encodings like chunked etc. /*
.
Default Transfer Encodings
.
*/ Transfer encoders and decoders can handle encodings like chunked
etc.
*/
#include "WWWHTTP.h" #include "WWWHTTP.h"
extern void HTTransferEncoderInit (HTList * encodings); extern void HTTransferEncoderInit (HTList * encodings);
/*
DEFAULT CONTENT ENCODINGS
Content encoders and decoders can handle encodings like deflate etc. /*
.
Default Content Encodings
.
*/ Content encoders and decoders can handle encodings like deflate
etc.
*/
#include "WWWZip.h" #include "WWWZip.h"
extern void HTContentEncoderInit (HTList * encodings); extern void HTContentEncoderInit (HTList * encodings);
/*
DEFAULT BEFORE AND AFTER FILTERS
This module provides a set of default BEFORE and AFTER filters that can /*
be registered .
by the Net manager to be called before and after a request. All filters Default BEFORE and AFTER Filters
can be .
registered either to be called globally (all requests) or locally (pr re
quest basis).
Not done automaticly - may be done by application!
This module provides a set of default BEFORE and AFTER filters
that can be registered by the Net manager to be
called before and after a request. All filters can be registered either to
be called globally (all requests) or locally (pr request basis).
Not done automaticly - may be done by application!
(
BEFORE Filters BEFORE Filters
)
The BEFORE filters handle proxies, caches, rule files etc. The filters a The BEFORE filters handle proxies, caches, rule
re called in files etc. The filters are called in the order by which the are registered
the order by which the are registered */
*/
#include "WWWApp.h" #include "WWWApp.h"
extern void HTBeforeInit (void); extern void HTBeforeInit (void);
/*
/*
(
AFTER Filters AFTER Filters
)
The AFTER filters handle error messages, logging, redirection, authentic The AFTER filters handle error messages, logging, redirection,
ation etc. The authentication etc. The filters are called in the order by which the are
filters are called in the order by which the are registered registered
*/
*/
extern void HTAfterInit (void); extern void HTAfterInit (void);
/*
/*
(
BEFORE and AFTER Filters BEFORE and AFTER Filters
)
This is just a short cut for registrating both BEFORE and AFTER at once This is just a short cut for registrating both BEFORE and AFTER
at once
*/ */
extern void HTNetInit (void); extern void HTNetInit (void);
/*
DEFAULT ACCESS AUTHENTICATION MODULES
The Access Manager which is implemented as a BEFORE and an AFTER filter
(automatically
registered in HTNetInit()) does not by default know of any access authen
tication
schemes. As everything else, this must be registered! This function does
the job and
should be all you need.
*/
extern void HTAAInit (void);
/* /*
.
Default Access Authentication Modules
.
DEFAULT MESSAGE AND DIALOG FUNCTIONS The Access Manager which is implemented as a
BEFORE and an AFTER filter (automatically registered in
HTNetInit()) does not by default know of any access authentication
schemes. As everything else, this must be registered! This function does
the job and should be all you need.
*/
extern void HTAAInit (void);
We register a set of alert messages Not done automaticly - may be done b /*
y application! .
Default Message and Dialog Functions
.
*/ We register a set of alert messages Not done automaticly - may be done by
application!
*/
#include "WWWApp.h" #include "WWWApp.h"
extern void HTAlertInit (void); extern void HTAlertInit (void);
/*
DEFAULT ICONS FOR DIRECTORY LISTINGS
The WWWDir interface contains support for including references (URLs and /*
ALT text tags) .
to icons in directory listings. The icons are selected as a function of Default Icons for Directory Listings
the media type .
and the content encoding of the file in question. That is - you can set
up icons for
compressed files, postscript files etc. There is also a small set of spe
cific icons
representing directories etc.
*/ The WWWDir interface contains support for including
references (URLs and ALT text tags) to icons in directory listings.
The icons are selected as a function of the media type and the content enco
ding
of the file in question. That is - you can set up icons for compressed file
s,
postscript files etc. There is also a small set of specific icons represent
ing
directories etc.
*/
#include "WWWFile.h" #include "WWWFile.h"
extern void HTIconInit (const char * url_prefix); extern void HTIconInit (const char * url_prefix);
/* /*
*/
*/
#endif #endif
/*
___________________________________ /*
@(#) $Id: HTInit.html,v 2.53 1999/02/22 23:34:3 4 frystyk Exp $ @(#) $Id: HTInit.html,v 2.53 1999/02/22 23:34:34 frystyk Exp $
*/ */
 End of changes. 76 change blocks. 
159 lines changed or deleted 176 lines changed or added


 HTLink.h   HTLink.h 
/* /*
W3C Sample Code Library libwww Link Class W3C Sample Code Library libwww Link Class
! !The Link Class!
The Link Class
!
*/ */
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH. ** Please first read the full copyright statement in the file COPYRI
GH.
*/ */
/* /*
A Link represents the link between anchor objects. The HTLink class represents links between anchor objects. By keeping the li
By keeping the link as a object and not as part of the anchor we are capabl nk as a object and
e not as part of the anchor we are capable of handling link semantics in a mu
of handling link semantics in a much more organized way. For example, we ch
can then search for link types among all the link objects that we have crea more organized way. For example, we can then search for link types among al
ted. l
Anchor objects are bound together using Link the link objects that we have created. Anchor
objects. Each anchor can be the source or destination of zero, one, or more objects are bound together using Link objects. Each anchor can be the
links from and to other anchors. source or destination of zero, one, or more links from and to other
anchors.
This module is implemented by HTLink.c, and it is Link information can come from many places - two classic examples are the
a part of the W3C Sample Code HTML LINK element and the HTTP Link header field.
Libwww supports both - the HTML LINK element is handled by the HTML parser
and the HTTP Link header field
is handled by the MIME parser.
The Webbot uses the link class to maintain the
information of the Web that it is seeing when traversing the Web as a
robot.
This module is implemented by HTLink.c, and it is a
part of the W3C Sample Code
Library. Library.
*/ */
#ifndef HTLINK_H #ifndef HTLINK_H
#define HTLINK_H #define HTLINK_H
typedef struct _HTLink HTLink; typedef struct _HTLink HTLink;
#include "WWWUtil.h" #include "WWWUtil.h"
#include "HTMethod.h" #include "HTMethod.h"
#include "HTAnchor.h" #include "HTAnchor.h"
/* /*
.
Creation and Deletion Methods .Creation and Deletion Methods.
.
These are the methods for crating and deleting new link objects These are the methods for crating and deleting new link objects
(
Create a new Link Object (Create a new Link Object)
)
*/ */
typedef HTAtom * HTLinkType; typedef HTAtom * HTLinkType;
typedef enum _HTLinkResult { typedef enum _HTLinkResult {
HT_LINK_INVALID = -1, HT_LINK_INVALID = -1,
HT_LINK_NONE = 0, HT_LINK_NONE = 0,
HT_LINK_ERROR, HT_LINK_ERROR,
HT_LINK_OK HT_LINK_OK
} HTLinkResult; } HTLinkResult;
struct _HTLink { struct _HTLink {
HTAnchor * dest; /* The anchor to which this leads HTAnchor * dest; /* The anchor to which this lead
*/ s */
HTLinkType type; /* Semantics of this link HTLinkType type; /* Semantics of this lin
*/ k */
HTMethod method; /* Method for this link, e.g. PUT HTMethod method; /* Method for this link, e.g. PU
*/ T */
HTLinkResult result; /* Result of any attempt to get this link HTLinkResult result; /* Result of any attempt to get this lin
*/ k */
}; };
HTLink * HTLink_new (void); HTLink * HTLink_new (void);
/* /*
(
Delete a Link Object (Delete a Link Object)
)
A link can be removed as any other object A link can be removed as any other object
*/ */
BOOL HTLink_delete (HTLink * link); BOOL HTLink_delete (HTLink * link);
/* /*
(
Remove All Link Information from an Anchor (Remove All Link Information from an Anchor)
)
This is normally a part of deleting anchor objects. This is normally a part of deleting anchor objects.
*/ */
extern BOOL HTLink_removeAll (HTAnchor * me); extern BOOL HTLink_removeAll (HTAnchor * me);
/*
.Predefined Link Types.
Just for ease of use, we define a seet of commonly used link types. You can
ofcourse use any other link type you want.
*/
#define HT_LR_PERM_REDIRECT HTAtom_for("PERMANENT_REDIRECTION")
#define HT_LR_TEMP_REDIRECT HTAtom_for("TEMPORARY_REDIRECTION")
#define HT_LR_SEE_OTHER HTAtom_for("SEE_OTHER")
/* /*
.
Handle Link Between Anchors .Handle Link Between Anchors.
.
As mentioned, link objects are the ones that bind anchor objects together As mentioned, link objects are the ones that bind anchor objects together
in a Web like structure in a Web like structure
(
Add a Link between two Anchors (Add a Link between two Anchors)
)
This method creates a new link between two anchor This method creates a new link between two anchor
objects. objects.
*/ */
extern BOOL HTLink_add (HTAnchor * source, extern BOOL HTLink_add (
HTAnchor * destination, HTAnchor * source,
HTLinkType type, HTAnchor * destination,
HTMethod method); HTLinkType type,
HTMethod method);
/* /*
(
Remove All Links Between two Anchors (Remove All Links Between two Anchors)
)
Removes link information from one anchor to another. Removes link information from one anchor to another.
*/ */
extern BOOL HTLink_remove (HTAnchor * source, HTAnchor * destination); extern BOOL HTLink_remove (
HTAnchor * source,
HTAnchor * destination);
/* /*
(
Find a Link (Find a Link)
)
Find the anchor object between a destination and a source ancher. Return Find the anchor object between a destination and a source ancher. Return
link object if any, else NULL link object if any, else NULL
*/ */
extern HTLink * HTLink_find (HTAnchor * source, HTAnchor * destination); extern HTLink * HTLink_find (HTAnchor * source, HTAnchor * destination);
/*
(Find a Link with a given link type)
Returns a link with a given link type or NULL if nothing found
*/
extern HTLink * HTLink_findType (HTAnchor * me, HTLinkType type);
/* /*
.
Link Information .Link Information.
.
This is the set of methods for accessing the information carried by a link This is the set of methods for accessing the information carried by a link
object object
(
Link Destination (Link Destination)
)
The link destination is the destination anchor pointed to by the link. The link destination is the destination anchor pointed to by the link.
*/ */
extern BOOL HTLink_setDestination (HTLink * link, HTAnchor * dest); extern BOOL HTLink_setDestination (HTLink * link, HTAnchor * dest);
extern HTAnchor * HTLink_destination (HTLink * link); extern HTAnchor * HTLink_destination (HTLink * link);
/* /*
(
Link Types and Semantic Links (Link Types and Semantic Links)
)
Each link has a sematic representation associated with it. This means that Each link has a sematic representation associated with it. This means that
the application can distinguish between pages based on the semantics of the the application can distinguish between pages based on the semantics of the
link. This is very similar to the LINK tag in HTML pages which link. This is very similar to the LINK tag in HTML pages which
indicates the meaning if this pages to other pages. indicates the meaning if this pages to other pages.
*/ */
extern BOOL HTLink_setType (HTLink * link, HTLinkType type); extern BOOL HTLink_setType (HTLink * link, HTLinkType type);
extern HTLinkType HTLink_type (HTLink * link); extern HTLinkType HTLink_type (HTLink * link);
/* /*
(
Link Method (Link Method)
)
The link method is the HTTP method we have performed between the two links. The link method is the HTTP method we have performed between the two links.
For example, it can be a POST operation, or a PUT operation where the opera For example, it can be a POST operation, or a PUT operation where the
tion operation on the first anchor created a new anchor.
on the first anchor created a new anchor.
*/ */
extern BOOL HTLink_setMethod (HTLink * link, HTMethod method); extern BOOL HTLink_setMethod (HTLink * link, HTMethod method);
extern HTMethod HTLink_method (HTLink * link); extern HTMethod HTLink_method (HTLink * link);
/* /*
(
Link Result
)
When a link has been used for posting an object from a source to a destinat (Link Result)
ion
link, the result of the operation is stored as part of the link information
.
This means that we can keep track of which operations we have performed on
a link and hence the application can ask the user whether he or she wants
to do a re-post, for example.
*/
When a link has been used for posting an object from a source to a
destination link, the result of the operation is stored as part of the link
information. This means that we can keep track of which operations we have
performed on a link and hence the application can ask the user whether he o
r
she wants to do a re-post, for example.
*/
extern BOOL HTLink_setResult (HTLink * link, HTLinkResult result); extern BOOL HTLink_setResult (HTLink * link, HTLinkResult result);
extern HTLinkResult HTLink_result (HTLink * link); extern HTLinkResult HTLink_result (HTLink * link);
/* /*
*/ */
#endif /* HTLINK_H */ #endif /* HTLINK_H */
/* /*
@(#) $Id: HTLink.html,v 2.3 1998/05/14 02:10:38 frystyk Exp $ @(#) $Id: HTLink.html,v 2.6 1999/03/29 15:51:44 frystyk Exp $
*/ */
 End of changes. 44 change blocks. 
97 lines changed or deleted 96 lines changed or added


 HTMIME.h   HTMIME.h 
/* /*
W3C Sample Code Library libwww MIME/ RFC822 Parsers W3C Sample Code Library libwww MIME Parsers
! !
MIME Parsers Libwww MIME Parsers
! !
*/ */
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH. ** Please first read the full copyright statement in the file COPYRIGH.
*/ */
/* /*
The MIME parser stream presents a MIME document with a header and possibly The MIME parser stream presents a MIME document with a header and possibly
a footer. It recursively invokes the format manager to handle embedded form ats a footer. It recursively invokes the format manager to handle embedded form ats
like MIME multipart. As well as stripping off and parsing the headers, the like MIME multipart. As well as stripping off and parsing the headers, the
MIME parser has to parse any weird MIME encodings it may meet within the MIME parser has to parse any weird MIME encodings it may meet within the
body parts of messages, and must deal with multipart messages. body parts of messages, and must deal with multipart
messages (see HTBound.h).
This module is implemented to the level necessary for operation with WWW, This module is implemented to the level necessary for operation with WWW,
but is not currently complete for any arbitrary MIME message. but is not currently complete for any arbitrary MIME message.
This module is implemented by HTMIME.c, and it is This module is implemented by HTMIME.c, and it is
a part of the W3C Sample Code a part of the W3C Sample Code
Library. Library.
*/ */
#ifndef HTMIME_H #ifndef HTMIME_H
#define HTMIME_H #define HTMIME_H
#include "HTStream.h" #include "HTStream.h"
#include "HTFormat.h" #include "HTFormat.h"
/* /*
( .
How to deal with "application/octetstream" etc. How to Deal with Unknown Data
) .
When the MIME parser can't find a target stream, for example because the When the MIME parser can't find a target stream, for example because the
format is application/octetstream, or it has a content encoding or media type is unknown, or it has a content encoding or transfer encoding
transfer encoding that we don't know about then it has to get rid of the that it doesn't know about then it has to get rid of the data in some other
data in some other fashion, for example by dumping it to local disk. The fashion, for example by dumping it to local disk (but it could also be dump
following two functions allow you to set and get the local file save stream ing
. it to a black hole). The following two functions allow you to set and get
the stream to use in this situation. By default, libwww provides an
Libwww provides a default implementation as HTSaveLocally which you may wan implementation of a save stream as HTSaveLocally
t to use. which you may want to use - this is for example used by the
current profiles.
*/ */
extern void HTMIME_setSaveStream (HTConverter * save_stream); extern void HTMIME_setSaveStream (HTConverter * save_stream);
extern HTConverter * HTMIME_saveStream (void); extern HTConverter * HTMIME_saveStream (void);
/* /*
.
MIME Parse Stream
.
( This stream parses a complete MIME message and if a media type header is
MIME header parser stream found then the stream stack is called to create the nest stream instance
) in the stream pipe. Any piece of the MIME body is pumped right through the
stream.
This stream parses a complete MIME header and if a content type header is
found then the stream stack is called. Any left over data is pumped right
through the stream.
*/ */
extern HTConverter HTMIMEConvert; extern HTConverter HTMIMEConvert;
/* /*
( .
MIME Header ONLY parser stream MIME Header ONLY Parse Stream
) .
This stream parses a complete MIME header and then returnes HT_PAUSE. It This stream parses a complete MIME header and then returnes
does not set up any streams and resting data stays in the buffer. This can HT_LOADED. It does not set up any streams and resting data stays
be used if you only want to parse the headers before you decide what to do in the buffer. This can be used if you only want to parse the headers befor
next. This is for example the case in a server app. e
you decide what to do next. This is for example the case with HTTP HEAD req
uests.
*/ */
extern HTConverter HTMIMEHeader; extern HTConverter HTMIMEHeader;
/* /*
( .
MIME Footer ONLY parser MIME Footer ONLY Parse Stream
) .
Parse only a footer, for example after a chunked encoding. Parse only a footer, for example after a chunked encoding.
*/ */
extern HTConverter HTMIMEFooter; extern HTConverter HTMIMEFooter;
/* /*
( .
MIME 1xx Continue Header Parser HTTP 100 Continue Parse Stream
) .
When parsed the header it returns HT_CONTINUE The 100 continue status codes can come at any time - we take them and put
the data down a temporary stream. When the 100 continue message has been
parsed, the stream returns HT_CONTINUE
*/ */
extern HTConverter HTMIMEContinue; extern HTConverter HTMIMEContinue;
/* /*
( .
Partial MIME Response parser HTTP 101 Switching Protocol Parse Stream
) .
In case we sent a Range conditional GET we may get back a partial The 101 Switching Protocol status code indicates that the rest of the strea
response. This response must be appended to the already existing cache entr m
y is using another format, protocol, what ever. The result is the same - we
before presented to the user. That is, first we load the cached object and are done parsing here and must leave the rest to the next stream which hope
pump it down the pipe and then the new data follows. Only the latter part fully
gets appended to the cache, of course. knows more about how to parse the rest of the stream. The stream stack is
called to look for a stream registered for handling
WWW_MIME_UPGRADE. This steam should
return HT_LOADED when it is done, HT_ERROR if an
error occurred and HT_OK as long as it just reads more data.
*/
extern HTConverter HTMIMEUpgrade;
/*
.
HTTP 206 Partial Data MIME Parse Stream
.
In case we sent a Range conditional GET we may get back a 206 Partial
Response. This response must be appended to the already existing cache entr
y
before presented to the user. That is, first we load the
cached object and pump it down the pipe and then
the new data follows. Only the latter part gets appended to the cache, of
course.
*/ */
extern HTConverter HTMIMEPartial; extern HTConverter HTMIMEPartial;
/* /*
*/ */
#endif #endif
/* /*
@(#) $Id: HTMIME.html,v 2.29 1999/02/07 18:29:05 frystyk Exp $ @(#) $Id: HTMIME.html,v 2.30 1999/02/27 16:12:14 frystyk Exp $
*/ */
 End of changes. 15 change blocks. 
45 lines changed or deleted 71 lines changed or added


 HTMLPDTD.h   HTMLPDTD.h 
skipping to change at line 56 skipping to change at line 56
HTML Element Enumeration HTML Element Enumeration
. .
These include tables in HTMLPDTD.c and These include tables in HTMLPDTD.c and
code in HTML.c. Note that not everything from code in HTML.c. Note that not everything from
HTML 4.0 is there! HTML 4.0 is there!
*/ */
typedef enum _HTMLElement { typedef enum _HTMLElement {
HTML_A = 0, HTML_A = 0,
HTML_ABBREV, HTML_ABBR,
HTML_ABSTRACT,
HTML_ACRONYM, HTML_ACRONYM,
HTML_ADDED,
HTML_ADDRESS, HTML_ADDRESS,
HTML_APPLET,
HTML_AREA, HTML_AREA,
HTML_ARG,
HTML_B, HTML_B,
HTML_BASE, HTML_BASE,
HTML_BASEFONT,
HTML_BDO,
HTML_BIG, HTML_BIG,
HTML_BLOCKQUOTE, HTML_BLOCKQUOTE,
HTML_BODY, HTML_BODY,
HTML_BOX,
HTML_BR, HTML_BR,
HTML_BYLINE, HTML_BUTTON,
HTML_CAPTION, HTML_CAPTION,
HTML_CHANGED, HTML_CENTER,
HTML_CITE, HTML_CITE,
HTML_CMD,
HTML_CODE, HTML_CODE,
HTML_COMMENT, HTML_COL,
HTML_COLGROUP,
HTML_DD, HTML_DD,
HTML_DEL,
HTML_DFN, HTML_DFN,
HTML_DIR, HTML_DIR,
HTML_DIV, HTML_DIV,
HTML_DL, HTML_DL,
HTML_DT, HTML_DT,
HTML_EM, HTML_EM,
HTML_FIG, HTML_FIELDSET,
HTML_FOOTNOTE, HTML_FONT,
HTML_FORM, HTML_FORM,
HTML_FRAME, HTML_FRAME,
HTML_FRAMESET, HTML_FRAMESET,
HTML_H1, HTML_H1,
HTML_H2, HTML_H2,
HTML_H3, HTML_H3,
HTML_H4, HTML_H4,
HTML_H5, HTML_H5,
HTML_H6, HTML_H6,
HTML_H7,
HTML_HEAD, HTML_HEAD,
HTML_HR, HTML_HR,
HTML_HTML, HTML_HTML,
HTML_HTMLPLUS,
HTML_I, HTML_I,
HTML_IMAGE, HTML_IFRAME,
HTML_IMG, HTML_IMG,
HTML_INPUT, HTML_INPUT,
HTML_INS,
HTML_ISINDEX, HTML_ISINDEX,
HTML_KBD, HTML_KBD,
HTML_L, HTML_LABEL,
HTML_LEGEND,
HTML_LI, HTML_LI,
HTML_LINK, HTML_LINK,
HTML_LISTING,
HTML_LIT,
HTML_MAP, HTML_MAP,
HTML_MARGIN,
HTML_MATH,
HTML_MENU, HTML_MENU,
HTML_META, HTML_META,
HTML_NEXTID, HTML_NEXTID, /* !!! */
HTML_NOFRAMES, HTML_NOFRAMES,
HTML_NOTE, HTML_NOSCRIPT,
HTML_OBJECT, HTML_OBJECT,
HTML_OL, HTML_OL,
HTML_OPTGROUP,
HTML_OPTION, HTML_OPTION,
HTML_OVER,
HTML_P, HTML_P,
HTML_PERSON, HTML_PARAM,
HTML_PLAINTEXT,
HTML_PRE, HTML_PRE,
HTML_Q, HTML_Q,
HTML_QUOTE,
HTML_RENDER,
HTML_REMOVED,
HTML_S, HTML_S,
HTML_SAMP, HTML_SAMP,
HTML_SCRIPT,
HTML_SELECT, HTML_SELECT,
HTML_SMALL, HTML_SMALL,
HTML_SPAN, HTML_SPAN,
HTML_STRIKE,
HTML_STRONG, HTML_STRONG,
HTML_STYLE,
HTML_SUB, HTML_SUB,
HTML_SUP, HTML_SUP,
HTML_TAB,
HTML_TABLE, HTML_TABLE,
HTML_TBODY,
HTML_TD, HTML_TD,
HTML_TEXTAREA, HTML_TEXTAREA,
HTML_TFOOT,
HTML_TH, HTML_TH,
HTML_THEAD,
HTML_TITLE, HTML_TITLE,
HTML_TR, HTML_TR,
HTML_TT, HTML_TT,
HTML_U, HTML_U,
HTML_UL, HTML_UL,
HTML_VAR, HTML_VAR,
HTML_XMP,
HTML_ELEMENTS /* This must be the last entry */ HTML_ELEMENTS /* This must be the last entry */
} HTMLElement; } HTMLElement;
/* /*
. .
Element Attribute Enumerations Element Attribute Enumerations
. .
Identifier is HTML_<element>_<attribute>. These Identifier is HTML_<element>_<attribute>. These
must match the tables in must match the tables in
HTMLPDTD.c! HTMLPDTD.c!
( (
Attributes definition Macros
)
*/
/* Define an attribute as HTML__ */
#define HTML_ATTR(t,a) HTML_##t##_##a
#define HTML_ATTRIBUTES(t) HTML_##t##_ATTRIBUTES
/*
(
A A
) )
*/ */
#define HTML_A_EFFECT 0 enum _HTML_A_Attributes {
#define HTML_A_HREF 1 HTML_ATTR(A,ACCESSKEY) = 0,
#define HTML_A_ID 2 HTML_ATTR(A,CHARSET),
#define HTML_A_METHODS 3 HTML_ATTR(A,CLASS),
#define HTML_A_NAME 4 HTML_ATTR(A,COORDS),
#define HTML_A_PRINT 5 HTML_ATTR(A,DIR),
#define HTML_A_REL 6 HTML_ATTR(A,HREF),
#define HTML_A_REV 7 HTML_ATTR(A,HREFLANG),
#define HTML_A_SHAPE 8 HTML_ATTR(A,ID),
#define HTML_A_TITLE 9 HTML_ATTR(A,NAME),
#define HTML_A_ATTRIBUTES 10 HTML_ATTR(A,REL),
HTML_ATTR(A,REV),
HTML_ATTR(A,SHAPE),
HTML_ATTR(A,STYLE),
HTML_ATTR(A,TABINDEX),
HTML_ATTR(A,TARGET),
HTML_ATTR(A,TYPE),
HTML_ATTR(A,TITLE),
HTML_ATTRIBUTES(A)
};
/*
(
APPLET - Deprecated
)
*/
enum _HTML_APPLET_Attributes {
HTML_ATTR(APPLET,ALIGN) = 0,
HTML_ATTR(APPLET,ALT),
HTML_ATTR(APPLET,ARCHIVE),
HTML_ATTR(APPLET,CLASS),
HTML_ATTR(APPLET,CODE),
HTML_ATTR(APPLET,CODEBASE),
HTML_ATTR(APPLET,HEIGHT),
HTML_ATTR(APPLET,HSPACE),
HTML_ATTR(APPLET,ID),
HTML_ATTR(APPLET,NAME),
HTML_ATTR(APPLET,OBJECT),
HTML_ATTR(APPLET,STYLE),
HTML_ATTR(APPLET,TITLE),
HTML_ATTR(APPLET,VSPACE),
HTML_ATTR(APPLET,WIDTH),
HTML_ATTRIBUTES(APPLET)
};
/* /*
( (
AREA AREA
) )
*/ */
#define HTML_AREA_ALT 0 enum _HTML_AREA_Attributes {
#define HTML_AREA_ACCESSKEY 1 HTML_ATTR(AREA,ACCESSKEY) = 0,
#define HTML_AREA_COORDS 2 HTML_ATTR(AREA,ALT),
#define HTML_AREA_HREF 3 HTML_ATTR(AREA,CLASS),
#define HTML_AREA_NOHREF 4 HTML_ATTR(AREA,COORDS),
#define HTML_AREA_ONBLUR 5 HTML_ATTR(AREA,DIR),
#define HTML_AREA_ONFOCUS 6 HTML_ATTR(AREA,HREF),
#define HTML_AREA_SHAPE 7 HTML_ATTR(AREA,ID),
#define HTML_AREA_TABINDEX 8 HTML_ATTR(AREA,NAME),
#define HTML_AREA_ATTRIBUTES 9 HTML_ATTR(AREA,NOHREF),
HTML_ATTR(AREA,LANG),
HTML_ATTR(AREA,SHAPE),
HTML_ATTR(AREA,STYLE),
HTML_ATTR(AREA,TABINDEX),
HTML_ATTR(AREA,TARGET),
HTML_ATTR(AREA,TITLE),
HTML_ATTRIBUTES(AREA)
};
/* /*
( (
BASE BASE
) )
*/ */
#define HTML_BASE_HREF 0 enum _HTML_BASE_Attributes {
#define HTML_BASE_ATTRIBUTES 1 HTML_ATTR(BASE,HREF) = 0,
HTML_ATTR(BASE,TARGET),
HTML_ATTRIBUTES(BASE)
};
/*
(
BDO
)
*/
enum _HTML_BDO_Attributes {
HTML_ATTR(BDO,CLASS) = 0,
HTML_ATTR(BDO,DIR),
HTML_ATTR(BDO,ID),
HTML_ATTR(BDO,LANG),
HTML_ATTR(BDO,STYLE),
HTML_ATTR(BDO,TITLE),
HTML_ATTRIBUTES(BDO)
};
/*
(
BLOCKQUOTE
)
*/
enum _HTML_BQ_Attributes {
HTML_ATTR(BQ,CITE) = 0,
HTML_ATTR(BQ,CLASS),
HTML_ATTR(BQ,DIR),
HTML_ATTR(BQ,ID),
HTML_ATTR(BQ,LANG),
HTML_ATTR(BQ,STYLE),
HTML_ATTR(BQ,TITLE),
HTML_ATTRIBUTES(BQ)
};
/* /*
( (
BODY BODY
) )
*/ */
#define HTML_BODY_BACKGROUND 0 enum _HTML_BODY_Attributes {
#define HTML_BODY_ATTRIBUTES 1 HTML_ATTR(BODY,ALINK) = 0,
HTML_ATTR(BODY,BACKGROUND),
HTML_ATTR(BODY,BGCOLOR),
HTML_ATTR(BODY,CLASS),
HTML_ATTR(BODY,DIR),
HTML_ATTR(BODY,ID),
HTML_ATTR(BODY,LANG),
HTML_ATTR(BODY,LINK),
HTML_ATTR(BODY,STYLE),
HTML_ATTR(BODY,TEXT),
HTML_ATTR(BODY,TITLE),
HTML_ATTR(BODY,VLINK),
HTML_ATTRIBUTES(BODY)
};
/*
(
BR
)
*/
enum _HTML_BR_Attributes {
HTML_ATTR(BR,CLASS) = 0,
HTML_ATTR(BR,CLEAR),
HTML_ATTR(BR,ID),
HTML_ATTR(BR,STYLE),
HTML_ATTR(BR,TITLE),
HTML_ATTRIBUTES(BR)
};
/*
(
BUTTON
)
*/
enum _HTML_BUTTON_Attributes {
HTML_ATTR(BUTTON,ACCESSKEY) = 0,
HTML_ATTR(BUTTON,CLASS),
HTML_ATTR(BUTTON,DIR),
HTML_ATTR(BUTTON,DISABLED),
HTML_ATTR(BUTTON,ID),
HTML_ATTR(BUTTON,LANG),
HTML_ATTR(BUTTON,NAME),
HTML_ATTR(BUTTON,STYLE),
HTML_ATTR(BUTTON,TABINDEX),
HTML_ATTR(BUTTON,TITLE),
HTML_ATTR(BUTTON,TYPE),
HTML_ATTR(BUTTON,VALUE),
HTML_ATTRIBUTES(BUTTON),
};
/*
(
COL
)
*/
enum _HTML_COL_Attributes {
HTML_ATTR(COL,CLASS) = 0,
HTML_ATTR(COL,DIR),
HTML_ATTR(COL,ID),
HTML_ATTR(COL,LANG),
HTML_ATTR(COL,SPAN),
HTML_ATTR(COL,STYLE),
HTML_ATTR(COL,TITLE),
HTML_ATTR(COL,WIDTH),
HTML_ATTRIBUTES(COL)
};
/*
(
DEL, INS
)
*/
enum _HTML_CHANGES_Attributes {
HTML_ATTR(CHANGES,CITE) = 0,
HTML_ATTR(CHANGES,CLASS),
HTML_ATTR(CHANGES,DATETIME),
HTML_ATTR(CHANGES,DIR),
HTML_ATTR(CHANGES,ID),
HTML_ATTR(CHANGES,LANG),
HTML_ATTR(CHANGES,STYLE),
HTML_ATTR(CHANGES,TITLE),
HTML_ATTRIBUTES(CHANGES)
};
/*
(
FONT - Deprecated
)
*/
enum _HTML_FONT_Attributes {
HTML_ATTR(FONT,CLASS) = 0,
HTML_ATTR(FONT,COLOR),
HTML_ATTR(FONT,DIR),
HTML_ATTR(FONT,FACE),
HTML_ATTR(FONT,ID),
HTML_ATTR(FONT,LANG),
HTML_ATTR(FONT,SIZE),
HTML_ATTR(FONT,STYLE),
HTML_ATTR(FONT,TITLE),
HTML_ATTRIBUTES(FONT)
};
/* /*
( (
FORM FORM
) )
*/ */
#define HTML_FORM_ACTION 0 /* WSM bug fix, added these five */ enum _HTML_FORM_Attributes {
#define HTML_FORM_ID 1 HTML_ATTR(FORM,ACCEPT) = 0,
#define HTML_FORM_INDEX 2 HTML_ATTR(FORM,ACCEPT_CHARSET), /* { "ACCEPT-CHARSET" } */
#define HTML_FORM_LANG 3 HTML_ATTR(FORM,ACTION),
#define HTML_FORM_METHOD 4 HTML_ATTR(FORM,CLASS),
#define HTML_FORM_ATTRIBUTES 5 HTML_ATTR(FORM,DIR),
HTML_ATTR(FORM,ENCTYPE),
HTML_ATTR(FORM,ID),
HTML_ATTR(FORM,LANG),
HTML_ATTR(FORM,METHOD),
HTML_ATTR(FORM,STYLE),
HTML_ATTR(FORM,TARGET),
HTML_ATTR(FORM,TITLE),
HTML_ATTRIBUTES(FORM)
};
/* /*
( (
FRAME FRAME
) )
*/ */
#define HTML_FRAME_SRC 0 enum _HTML_FRAME_Attributes {
#define HTML_FRAME_ATTRIBUTES 1 HTML_ATTR(FRAME,CLASS) = 0,
HTML_ATTR(FRAME,FRAMEBORDER),
HTML_ATTR(FRAME,ID),
HTML_ATTR(FRAME,NAME),
HTML_ATTR(FRAME,MARGINHEIGHT),
HTML_ATTR(FRAME,MARGINWIDTH),
HTML_ATTR(FRAME,NORESIZE),
HTML_ATTR(FRAME,LONGDESC),
HTML_ATTR(FRAME,SCROLLING),
HTML_ATTR(FRAME,SRC),
HTML_ATTR(FRAME,STYLE),
HTML_ATTR(FRAME,TARGET),
HTML_ATTR(FRAME,TITLE),
HTML_ATTRIBUTES(FRAME)
};
/* /*
( (
FRAMESET FRAMESET
) )
*/ */
#define HTML_FRAMESET_COLS 0 enum _HTML_FRAMESET_Attributes {
#define HTML_FRAMESET_ROWS 1 HTML_ATTR(FRAMESET,CLASS) = 0,
#define HTML_FRAMESET_BORDER 2 HTML_ATTR(FRAMESET,COLS),
#define HTML_FRAMESET_BORDERCOLOR 3 HTML_ATTR(FRAMESET,ID),
#define HTML_FRAMESET_FRAMEBORDER 4 HTML_ATTR(FRAMESET,ROWS),
#define HTML_FRAMESET_ONBLUR 5 HTML_ATTR(FRAMESET,STYLE),
#define HTML_FRAMESET_ONFOCUS 6 HTML_ATTR(FRAMESET,TITLE),
#define HTML_FRAMESET_ONLOAD 7 HTML_ATTRIBUTES(FRAMESET)
#define HTML_FRAMESET_ONUNLOAD 8 };
#define HTML_FRAMESET_ATTRIBUTES 9
/* /*
( (
FIG Generic attributes
) )
*/ */
#define HTML_FIG_ATTRIBUTES 6 enum _HTML_GEN_Attributes {
HTML_ATTR(GEN,CLASS) = 0,
HTML_ATTR(GEN,DIR),
HTML_ATTR(GEN,ID),
HTML_ATTR(GEN,LANG),
HTML_ATTR(GEN,STYLE),
HTML_ATTR(GEN,TITLE),
HTML_ATTRIBUTES(GEN)
};
/* /*
( (
GEN BLOCK
) )
*/ */
#define HTML_GEN_ATTRIBUTES 3 enum _HTML_BLOCK_Attributes {
HTML_ATTR(BLOCK,ALIGN) = 0,
HTML_ATTR(BLOCK,CLASS),
HTML_ATTR(BLOCK,DIR),
HTML_ATTR(BLOCK,ID),
HTML_ATTR(BLOCK,LANG),
HTML_ATTR(BLOCK,STYLE),
HTML_ATTR(BLOCK,TITLE),
HTML_ATTRIBUTES(BLOCK)
};
/* /*
( (
HTMLPLUS HEAD
) )
*/ */
#define HTML_HTMLPLUS_ATTRIBUTES 2 enum _HTML_HEAD_Attributes {
HTML_ATTR(HEAD,DIR) = 0,
HTML_ATTR(HEAD,LANG),
HTML_ATTR(HEAD,PROFILE),
HTML_ATTRIBUTES(HEAD)
};
/* /*
( (
IMAGE HR
) )
*/ */
#define HTML_IMAGE_ATTRIBUTES 5 enum _HTML_HR_Attributes {
HTML_ATTR(HR,ALIGN) = 0,
HTML_ATTR(HR,CLASS),
HTML_ATTR(HR,DIR),
HTML_ATTR(HR,ID),
HTML_ATTR(HR,LANG),
HTML_ATTR(HR,NOSHADE),
HTML_ATTR(HR,SIZE),
HTML_ATTR(HR,STYLE),
HTML_ATTR(HR,TITLE),
HTML_ATTR(HR,WIDTH),
HTML_ATTRIBUTES(HR)
};
/* /*
( (
CHANGED HTML
) )
*/ */
#define HTML_CHANGED_ATTRIBUTES 2 enum _HTML_HTML_Attributes {
HTML_ATTR(HTML,DIR) = 0,
HTML_ATTR(HTML,LANG),
HTML_ATTR(HTML,VERSION),
HTML_ATTRIBUTES(HTML)
};
/* /*
( (
DL IFRAME
) )
*/ */
#define HTML_DL_ID 0 enum _HTML_IFRAME_Attributes {
#define HTML_DL_COMPACT 1 HTML_ATTR(IFRAME,ALIGN) = 0,
#define HTML_DL_INDEX 2 HTML_ATTR(IFRAME,CLASS),
#define HTML_DL_ATTRIBUTES 3 HTML_ATTR(IFRAME,FRAMEBORDER),
HTML_ATTR(IFRAME,HEIGHT),
HTML_ATTR(IFRAME,ID),
HTML_ATTR(IFRAME,LONGDESC),
HTML_ATTR(IFRAME,MARGINHEIGHT),
HTML_ATTR(IFRAME,MARGINWIDTH),
HTML_ATTR(IFRAME,NAME),
HTML_ATTR(IFRAME,SCROLLING),
HTML_ATTR(IFRAME,SRC),
HTML_ATTR(IFRAME,STYLE),
HTML_ATTR(IFRAME,TARGET),
HTML_ATTR(IFRAME,TITLE),
HTML_ATTR(IFRAME,WIDTH),
HTML_ATTRIBUTES(IFRAME)
};
/* /*
( (
IMG IMG
) )
*/ */
#define HTML_IMG_ALIGN 0 enum _HTML_IMG_Attributes {
#define HTML_IMG_ALT 1 HTML_ATTR(IMG,ALIGN) = 0,
#define HTML_IMG_ISMAP 2 /* Obsolete but supported */ HTML_ATTR(IMG,ALT),
#define HTML_IMG_LOWSRC 3 HTML_ATTR(IMG,BORDER),
#define HTML_IMG_SEETHRU 4 HTML_ATTR(IMG,CLASS),
#define HTML_IMG_SRC 5 HTML_ATTR(IMG,DIR),
#define HTML_IMG_ATTRIBUTES 6 HTML_ATTR(IMG,HEIGHT),
HTML_ATTR(IMG,HSPACE),
HTML_ATTR(IMG,ID),
HTML_ATTR(IMG,ISMAP),
HTML_ATTR(IMG,LANG),
HTML_ATTR(IMG,LONGDESC),
HTML_ATTR(IMG,SRC),
HTML_ATTR(IMG,STYLE),
HTML_ATTR(IMG,TITLE),
HTML_ATTR(IMG,USEMAP),
HTML_ATTR(IMG,VSPACE),
HTML_ATTR(IMG,WIDTH),
HTML_ATTRIBUTES(IMG)
};
/* /*
( (
INPUT INPUT
) )
*/ */
#define HTML_INPUT_ALIGN 0 enum _HTML_INPUT_Attributes {
#define HTML_INPUT_CHECKED 1 HTML_ATTR(INPUT,ACCEPT) = 0,
#define HTML_INPUT_DISABLED 2 HTML_ATTR(INPUT,ACCESSKEY),
#define HTML_INPUT_ERROR 3 HTML_ATTR(INPUT,ALIGN),
#define HTML_INPUT_MAX 4 HTML_ATTR(INPUT,ALT),
#define HTML_INPUT_MIN 5 HTML_ATTR(INPUT,CHECKED),
#define HTML_INPUT_NAME 6 HTML_ATTR(INPUT,CLASS),
#define HTML_INPUT_SIZE 7 HTML_ATTR(INPUT,DIR),
#define HTML_INPUT_SRC 8 HTML_ATTR(INPUT,DISABLED),
#define HTML_INPUT_TYPE 9 HTML_ATTR(INPUT,ID),
#define HTML_INPUT_VALUE 10 HTML_ATTR(INPUT,LANG),
#define HTML_INPUT_ATTRIBUTES 11 HTML_ATTR(INPUT,MAXLENGTH),
HTML_ATTR(INPUT,NAME),
HTML_ATTR(INPUT,READONLY),
HTML_ATTR(INPUT,SIZE),
HTML_ATTR(INPUT,SRC),
HTML_ATTR(INPUT,STYLE),
HTML_ATTR(INPUT,TABINDEX),
HTML_ATTR(INPUT,TITLE),
HTML_ATTR(INPUT,TYPE),
HTML_ATTR(INPUT,USEMAP),
HTML_ATTR(INPUT,VALUE),
HTML_ATTRIBUTES(INPUT)
};
/* /*
( (
L
) )
*/ */
#define HTML_L_ATTRIBUTES 4 enum _HTML_ISINDEX_Attributes {
HTML_ATTR(ISINDEX,CLASS) = 0,
HTML_ATTR(ISINDEX,DIR),
HTML_ATTR(ISINDEX,ID),
HTML_ATTR(ISINDEX,LANG),
HTML_ATTR(ISINDEX,PROMPT),
HTML_ATTR(ISINDEX,STYLE),
HTML_ATTR(ISINDEX,TITLE),
HTML_ATTRIBUTES(ISINDEX)
};
/* /*
( (
LI
) )
*/ */
#define HTML_LI_ATTRIBUTES 4 enum _HTML_LABEL_Attributes {
HTML_ATTR(LABEL,ACCESSKEY) = 0,
HTML_ATTR(LABEL,CLASS),
HTML_ATTR(LABEL,DIR),
HTML_ATTR(LABEL,FOR),
HTML_ATTR(LABEL,ID),
HTML_ATTR(LABEL,LANG),
HTML_ATTR(LABEL,STYLE),
HTML_ATTR(LABEL,TITLE),
HTML_ATTRIBUTES(LABEL)
};
/* /*
( (
LIST
) )
*/ */
#define HTML_LIST_ATTRIBUTES 4 enum _HTML_LEGEND_Attributes {
HTML_ATTR(LEGEND,ACCESSKEY) = 0,
HTML_ATTR(LEGEND,ALIGN),
HTML_ATTR(LEGEND,CLASS),
HTML_ATTR(LEGEND,DIR),
HTML_ATTR(LEGEND,ID),
HTML_ATTR(LEGEND,LANG),
HTML_ATTR(LEGEND,STYLE),
HTML_ATTR(LEGEND,TITLE),
HTML_ATTRIBUTES(LEGEND)
};
/* /*
( (
LINK LI
) )
*/ */
#define HTML_LINK_CHARSET 0 enum _HTML_LI_Attributes {
#define HTML_LINK_HREF 1 HTML_ATTR(LI,CLASS) = 0,
#define HTML_LINK_HREFLANG 2 HTML_ATTR(LI,COMPACT),
#define HTML_LINK_MEDIA 3 HTML_ATTR(LI,DIR),
#define HTML_LINK_REL 4 HTML_ATTR(LI,ID),
#define HTML_LINK_REV 5 HTML_ATTR(LI,LANG),
#define HTML_LINK_TYPE 6 HTML_ATTR(LI,STYLE),
#define HTML_LINK_ATTRIBUTES 7 HTML_ATTR(LI,TITLE),
HTML_ATTR(LI,TYPE),
HTML_ATTR(LI,VALUE),
HTML_ATTRIBUTES(LI)
};
/* /*
( (
ID LINK
) )
*/ */
#define HTML_ID_ATTRIBUTE 1 enum _HTML_LINK_Attributes {
HTML_ATTR(LINK,CHARSET) = 0,
HTML_ATTR(LINK,CLASS),
HTML_ATTR(LINK,DIR),
HTML_ATTR(LINK,HREF),
HTML_ATTR(LINK,HREFLANG),
HTML_ATTR(LINK,ID),
HTML_ATTR(LINK,LANG),
HTML_ATTR(LINK,MEDIA),
HTML_ATTR(LINK,REL),
HTML_ATTR(LINK,REV),
HTML_ATTR(LINK,STYLE),
HTML_ATTR(LINK,TARGET),
HTML_ATTR(LINK,TITLE),
HTML_ATTR(LINK,TYPE),
HTML_ATTRIBUTES(LINK)
};
/* /*
( (
MAP MAP
) )
*/ */
#define HTML_MAP_NAME 0 enum _HTML_MAP_Attributes {
#define HTML_MAP_ATTRIBUTES 1 HTML_ATTR(MAP,CLASS) = 0,
HTML_ATTR(MAP,DIR),
HTML_ATTR(MAP,ID),
HTML_ATTR(MAP,LANG),
HTML_ATTR(MAP,NAME),
HTML_ATTR(MAP,STYLE),
HTML_ATTR(MAP,TITLE),
HTML_ATTRIBUTES(MAP)
};
/* /*
( (
META META
) )
*/ */
#define HTML_META_CONTENT 0 enum _HTML_META_Attributes {
#define HTML_META_HTTP_EQUIV 1 HTML_ATTR(META,CONTENT) = 0,
#define HTML_META_NAME 2 HTML_ATTR(META,DIR),
#define HTML_META_SCHEME 3 HTML_ATTR(META,HTTP_EQUIV), /* { "HTTP-EQUIV" ) */
#define HTML_META_ATTRIBUTES 4 HTML_ATTR(META,LANG),
HTML_ATTR(META,NAME),
HTML_ATTR(META,SCHEME),
HTML_ATTRIBUTES(META)
};
/* /*
( (
NEXTID NEXTID
) )
*/ */
#define HTML_NEXTID_ATTRIBUTES 1 #define HTML_NEXTID_ATTRIBUTES 1
#define HTML_NEXTID_N 0 #define HTML_NEXTID_N 0
/* /*
( (
NOTE OBJECT
) )
*/ */
#define HTML_NOTE_ATTRIBUTES 4 enum _HTML_OBJECT_Attributes {
HTML_ATTR(OBJECT,ALIGN) = 0,
HTML_ATTR(OBJECT,ARCHIVE),
HTML_ATTR(OBJECT,BORDER),
HTML_ATTR(OBJECT,CLASS),
HTML_ATTR(OBJECT,CLASSID),
HTML_ATTR(OBJECT,CODEBASE),
HTML_ATTR(OBJECT,CODETYPE),
HTML_ATTR(OBJECT,DATA),
HTML_ATTR(OBJECT,DECLARE),
HTML_ATTR(OBJECT,DIR),
HTML_ATTR(OBJECT,HEIGHT),
HTML_ATTR(OBJECT,HSPACE),
HTML_ATTR(OBJECT,ID),
HTML_ATTR(OBJECT,LANG),
HTML_ATTR(OBJECT,NAME),
HTML_ATTR(OBJECT,STANDBY),
HTML_ATTR(OBJECT,STYLE),
HTML_ATTR(OBJECT,TABINDEX),
HTML_ATTR(OBJECT,TITLE),
HTML_ATTR(OBJECT,TYPE),
HTML_ATTR(OBJECT,USEMAP),
HTML_ATTR(OBJECT,VSPACE),
HTML_ATTR(OBJECT,WIDTH),
HTML_ATTRIBUTES(OBJECT)
};
/* /*
( (
OBJECT OL
) )
*/ */
#define HTML_OBJECT_ARCHIVE 0 enum _HTML_OL_Attributes {
#define HTML_OBJECT_CLASSID 1 HTML_ATTR(OL,CLASS) = 0,
#define HTML_OBJECT_CODEBASE 2 HTML_ATTR(OL,COMPACT),
#define HTML_OBJECT_CODETYPE 3 HTML_ATTR(OL,DIR),
#define HTML_OBJECT_DATA 4 HTML_ATTR(OL,ID),
#define HTML_OBJECT_DECLARE 5 HTML_ATTR(OL,LANG),
#define HTML_OBJECT_HIGHT 6 HTML_ATTR(OL,START),
#define HTML_OBJECT_NAME 7 HTML_ATTR(OL,STYLE),
#define HTML_OBJECT_STANDBY 8 HTML_ATTR(OL,TITLE),
#define HTML_OBJECT_TABINDEX 9 HTML_ATTR(OL,TYPE),
#define HTML_OBJECT_TYPE 10 HTML_ATTRIBUTES(OL)
#define HTML_OBJECT_USEMAP 11 };
#define HTML_OBJECT_WIDTH 12
#define HTML_OBJECT_ATTRIBUTES 13 /*
(
OPTGROUP
)
*/
enum _HTML_OPTGROUP_Attributes {
HTML_ATTR(OPTGROUP,CLASS) = 0,
HTML_ATTR(OPTGROUP,DISABLED),
HTML_ATTR(OPTGROUP,DIR),
HTML_ATTR(OPTGROUP,ID),
HTML_ATTR(OPTGROUP,LABEL),
HTML_ATTR(OPTGROUP,LANG),
HTML_ATTR(OPTGROUP,STYLE),
HTML_ATTR(OPTGROUP,TITLE),
HTML_ATTRIBUTES(OPTGROUP)
};
/* /*
( (
OPTION OPTION
) )
*/ */
#define HTML_OPTION_DISABLED 0 /* WSM bug fix, added these 4 */ enum _HTML_OPTION_Attributes {
#define HTML_OPTION_LANG 1 HTML_ATTR(OPTION,CLASS) = 0,
#define HTML_OPTION_SELECTED 2 HTML_ATTR(OPTION,DISABLED),
#define HTML_OPTION_ATTRIBUTES 3 HTML_ATTR(OPTION,DIR),
HTML_ATTR(OPTION,ID),
HTML_ATTR(OPTION,LABEL),
HTML_ATTR(OPTION,LANG),
HTML_ATTR(OPTION,SELECTED),
HTML_ATTR(OPTION,STYLE),
HTML_ATTR(OPTION,TITLE),
HTML_ATTR(OPTION,VALUE),
HTML_ATTRIBUTES(OPTION)
};
/* /*
( (
RENDER PARAM
) )
*/ */
#define HTML_RENDER_ATTRIBUTES 2 enum _HTML_PARAM_Attributes {
HTML_ATTR(PARAM,ID) = 0,
HTML_ATTR(PARAM,NAME),
HTML_ATTR(PARAM,TYPE),
HTML_ATTR(PARAM,VALUE),
HTML_ATTR(PARAM,VALUETYPE),
HTML_ATTRIBUTES(PARAM)
};
/*
(
PRE
)
*/
enum _HTML_PRE_Attributes {
HTML_ATTR(PRE,CLASS) = 0,
HTML_ATTR(PRE,DIR),
HTML_ATTR(PRE,ID),
HTML_ATTR(PRE,LANG),
HTML_ATTR(PRE,STYLE),
HTML_ATTR(PRE,TITLE),
HTML_ATTR(PRE,WIDTH),
HTML_ATTRIBUTES(PRE)
};
/*
(
SCRIPT
)
*/
enum _HTML_SCRIPT_Attributes {
HTML_ATTR(SCRIPT,CHARSET) = 0,
HTML_ATTR(SCRIPT,DEFER),
HTML_ATTR(SCRIPT,LANGUAGE),
HTML_ATTR(SCRIPT,SRC),
HTML_ATTR(SCRIPT,TYPE),
HTML_ATTRIBUTES(SCRIPT)
};
/* /*
( (
SELECT SELECT
) )
*/ */
#define HTML_SELECT_ERROR 0 /* WSM bug fix, added these 5 */ enum _HTML_SELECT_Attributes {
#define HTML_SELECT_LANG 1 HTML_ATTR(SELECT,CLASS) = 0,
#define HTML_SELECT_MULTIPLE 2 HTML_ATTR(SELECT,DIR),
#define HTML_SELECT_NAME 3 HTML_ATTR(SELECT,DISABLED),
#define HTML_SELECT_SIZE 4 HTML_ATTR(SELECT,ID),
#define HTML_SELECT_ATTRIBUTES 5 HTML_ATTR(SELECT,LANG),
HTML_ATTR(SELECT,MULTIPLE),
HTML_ATTR(SELECT,NAME),
HTML_ATTR(SELECT,SIZE),
HTML_ATTR(SELECT,STYLE),
HTML_ATTR(SELECT,TABINDEX),
HTML_ATTR(SELECT,TITLE),
HTML_ATTRIBUTES(SELECT)
};
/* /*
( (
TAB STYLE
) )
*/ */
#define HTML_TAB_ATTRIBUTES 2 enum _HTML_STYLE_Attributes {
HTML_ATTR(STYLE,DIR) = 0,
HTML_ATTR(STYLE,LANG),
HTML_ATTR(STYLE,MEDIA),
HTML_ATTR(STYLE,TITLE),
HTML_ATTR(STYLE,TYPE),
HTML_ATTRIBUTES(STYLE)
};
/* /*
( (
TABLE TABLE
) )
*/ */
#define HTML_TABLE_ATTRIBUTES 4 enum _HTML_TABLE_Attributes {
HTML_ATTR(TABLE,ALIGN) = 0,
HTML_ATTR(TABLE,BGCOLOR),
HTML_ATTR(TABLE,BORDER),
HTML_ATTR(TABLE,CELLPADDING),
HTML_ATTR(TABLE,CELLSPACING),
HTML_ATTR(TABLE,CLASS),
HTML_ATTR(TABLE,DIR),
HTML_ATTR(TABLE,FRAME),
HTML_ATTR(TABLE,ID),
HTML_ATTR(TABLE,LANG),
HTML_ATTR(TABLE,RULES),
HTML_ATTR(TABLE,SUMMARY),
HTML_ATTR(TABLE,STYLE),
HTML_ATTR(TABLE,TITLE),
HTML_ATTR(TABLE,WIDTH),
HTML_ATTRIBUTES(TABLE)
};
/*
(
TABLE Elements
)
*/
enum _HTML_TELE_Attributes {
HTML_ATTR(TELE,ALIGN) = 0,
HTML_ATTR(TELE,CHAR),
HTML_ATTR(TELE,CHAROFF),
HTML_ATTR(TELE,CLASS),
HTML_ATTR(TELE,DIR),
HTML_ATTR(TELE,ID),
HTML_ATTR(TELE,LANG),
HTML_ATTR(TELE,STYLE),
HTML_ATTR(TELE,TITLE),
HTML_ATTR(TELE,VALIGN),
HTML_ATTRIBUTES(TELE)
};
/* /*
( (
TD TD
) )
*/ */
#define HTML_TD_ATTRIBUTES 4 enum _HTML_TD_Attributes {
HTML_ATTR(TD,ABBR) = 0,
HTML_ATTR(TD,ALIGN),
HTML_ATTR(TD,AXIS),
HTML_ATTR(TD,BGCOLOR),
HTML_ATTR(TD,CHAR),
HTML_ATTR(TD,CHAROFF),
HTML_ATTR(TD,CLASS),
HTML_ATTR(TD,COLSPAN),
HTML_ATTR(TD,DIR),
HTML_ATTR(TD,ID),
HTML_ATTR(TD,HEADERS),
HTML_ATTR(TD,HEIGHT),
HTML_ATTR(TD,LANG),
HTML_ATTR(TD,NOWRAP),
HTML_ATTR(TD,ROWSPAN),
HTML_ATTR(TD,SCOPE),
HTML_ATTR(TD,STYLE),
HTML_ATTR(TD,TITLE),
HTML_ATTR(TD,VALIGN),
HTML_ATTR(TD,WIDTH),
HTML_ATTRIBUTES(TD)
};
/* /*
( (
TEXTAREA TEXTAREA
) )
*/ */
#define HTML_TEXTAREA_COLS 0 enum _HTML_TEXTAREA_Attributes {
#define HTML_TEXTAREA_DISABLED 1 HTML_ATTR(TEXTAREA,CLASS) = 0,
#define HTML_TEXTAREA_ERROR 2 HTML_ATTR(TEXTAREA,COLS),
#define HTML_TEXTAREA_LANG 3 HTML_ATTR(TEXTAREA,DIR),
#define HTML_TEXTAREA_NAME 4 HTML_ATTR(TEXTAREA,DISABLED),
#define HTML_TEXTAREA_ROWS 5 HTML_ATTR(TEXTAREA,ID),
#define HTML_TEXTAREA_ATTRIBUTES 6 HTML_ATTR(TEXTAREA,LANG),
HTML_ATTR(TEXTAREA,NAME),
HTML_ATTR(TEXTAREA,READONLY),
HTML_ATTR(TEXTAREA,ROWS),
HTML_ATTR(TEXTAREA,STYLE),
HTML_ATTR(TEXTAREA,TABINDEX),
HTML_ATTR(TEXTAREA,TITLE),
HTML_ATTRIBUTES(TEXTAREA)
};
/* /*
( (
TH TITLE
) )
*/ */
#define HTML_TH_ATTRIBUTES 4 enum _HTML_TITLE_Attributes {
HTML_ATTR(TITLE,DIR) = 0,
HTML_ATTR(TITLE,LANG),
HTML_ATTRIBUTES(TITLE)
};
/* /*
( (
UL UL
) )
*/ */
#define HTML_UL_ATTRIBUTES 6 enum _HTML_UL_Attributes {
HTML_ATTR(UL,CLASS) = 0,
HTML_ATTR(UL,COMPACT),
HTML_ATTR(UL,DIR),
HTML_ATTR(UL,ID),
HTML_ATTR(UL,LANG),
HTML_ATTR(UL,STYLE),
HTML_ATTR(UL,TITLE),
HTML_ATTR(UL,TYPE),
HTML_ATTRIBUTES(UL)
};
/* /*
. .
The C Representation of the SGML DTD The C Representation of the SGML DTD
. .
*/ */
extern SGML_dtd * HTML_dtd (void); extern SGML_dtd * HTML_dtd (void);
extern BOOL HTML_setDtd (const SGML_dtd * dtd); extern BOOL HTML_setDtd (const SGML_dtd * dtd);
skipping to change at line 586 skipping to change at line 1118
extern void HTNextID (HTStructured * targetStream, const char * s); extern void HTNextID (HTStructured * targetStream, const char * s);
/* /*
*/ */
#endif /* HTMLDTD_H */ #endif /* HTMLDTD_H */
/* /*
@(#) $Id: HTMLPDTD.html,v 2.29 1999/01/22 14:52:01 frystyk Exp $ @(#) $Id: HTMLPDTD.html,v 2.30 1999/04/02 16:10:36 frystyk Exp $
*/ */
 End of changes. 84 change blocks. 
174 lines changed or deleted 706 lines changed or added


 HTParse.h   HTParse.h 
skipping to change at line 192 skipping to change at line 192
extern BOOL HTCleanTelnetString (char * str); extern BOOL HTCleanTelnetString (char * str);
/* /*
*/ */
#endif /* HTPARSE_H */ #endif /* HTPARSE_H */
/* /*
@(#) $Id: HTParse.html,v 2.37 1998/05/14 02:10:54 frystyk Exp $ @(#) $Id: HTParse.html,v 2.38 1999/04/01 19:37:11 frystyk Exp $
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 HTReq.h   HTReq.h 
skipping to change at line 79 skipping to change at line 79
#include "HTAssoc.h" #include "HTAssoc.h"
#include "HTFormat.h" #include "HTFormat.h"
#include "HTStream.h" #include "HTStream.h"
#include "HTError.h" #include "HTError.h"
#include "HTNet.h" #include "HTNet.h"
#include "HTUser.h" #include "HTUser.h"
#include "HTResponse.h" #include "HTResponse.h"
/* /*
. .
Issuing a Request
.
These are the "basic request methods" provided directly by the Request
class. This is a very low level API as the caller must have set up the requ
est
object before passing it to libwww. There are two versions: one for issuing
client requests and one for issuing server requests. You will probably most
often use the client version but libwww can in fact also deal with incoming
connections. You can find many higher level issuing functions in the
HTAccess module. If you like, you can of course
use this directly!
*/
extern BOOL HTLoad (HTRequest * request, BOOL recursive);
extern BOOL HTServe(HTRequest * request, BOOL recursive);
/*
.
Killing a Request
.
This function kills this particular request, see HTNet
module for a function that kills them all. If you know that you are
pipelining requests (typically the case for GUI browsers, robots etc.) then
it is often not enough to just kill a single request as the whole pipeline
gets affected. Therefore, in that case you MUST call the
HTHost_killPipe function instead,
*/
extern BOOL HTRequest_kill(HTRequest * request);
/*
Note that you can get to the HTHost object via the HTNet
object which you can get by calling
HTRequest_net(...).
.
Creation and Deletion Methods Creation and Deletion Methods
. .
The request object is intended to live as long as the request is still acti ve, The request object is intended to live as long as the request is still acti ve,
but can be deleted as soon as it has terminated, for example in one of the but can be deleted as soon as it has terminated, for example in one of the
request termination callback functions as described in the request termination callback functions as described in the
Net Manager. Only the anchor object stays around Net Manager. Only the anchor object stays around
after the request itself is terminated. after the request itself is terminated.
( (
Create new Object Create new Object
skipping to change at line 170 skipping to change at line 133
Create a duplicate for Internal use Create a duplicate for Internal use
Creates a new HTRequest object as a duplicate of the src request. The diffe rence Creates a new HTRequest object as a duplicate of the src request. The diffe rence
to the HTRequest_dup function is that we don't copy the error_stack and oth er to the HTRequest_dup function is that we don't copy the error_stack and oth er
information that the application keeps in its copy of the request object. information that the application keeps in its copy of the request object.
Otherwise it will be freed multiple times. Returns YES if OK, else NO Otherwise it will be freed multiple times. Returns YES if OK, else NO
*/ */
extern HTRequest * HTRequest_dupInternal (HTRequest * src); extern HTRequest * HTRequest_dupInternal (HTRequest * src);
extern BOOL HTRequest_setInternal (HTRequest * request, BOOL mode);
extern BOOL HTRequest_internal (HTRequest * request);
/* /*
( (
Delete Object Delete Object
) )
This function deletes the object and cleans up the memory. This function deletes the object and cleans up the memory.
*/ */
extern void HTRequest_delete (HTRequest * request); extern void HTRequest_delete (HTRequest * request);
/* /*
. .
Date and Time Stamp when Request was Issued Issuing a Request
. .
The start time when the request was issued may be of value to the cache These are the "basic request methods" provided directly by the Request
validation mechanism as described by the HTTP/1.1 specification. The value class. This is a very low level API as the caller must have set up the requ
is automatically set when creating the request headers and sending off the est
request. The time is a local time. object before passing it to libwww. There are two versions: one for issuing
client requests and one for issuing server requests. You will probably most
often use the client version but libwww can in fact also deal with incoming
connections. You can find many higher level issuing functions in the
HTAccess module. If you like, you can of course
use this directly!
*/ */
extern time_t HTRequest_date (HTRequest * request); extern BOOL HTLoad (HTRequest * request, BOOL recursive);
extern BOOL HTRequest_setDate (HTRequest * request, time_t date); extern BOOL HTServe(HTRequest * request, BOOL recursive);
/*
.
Killing a Request
.
This function kills this particular request, see HTNet
module for a function that kills them all. If you know that you are
pipelining requests (typically the case for GUI browsers, robots etc.) then
it is often not enough to just kill a single request as the whole pipeline
gets affected. Therefore, in that case you MUST call the
HTHost_killPipe function instead,
*/
extern BOOL HTRequest_kill(HTRequest * request);
/*
Note that you can get to the HTHost object via the HTNet
object which you can get by calling
HTRequest_net(...).
.
Relations to Other Libwww Objects
.
The Request object is linked to a set of other libwww objects - here's how
to get to these objects...
(
Binding to an Anchor Object
)
Every request object has an anchor associated
with it. The anchor normally lives until the application terminates but a
request object only lives as long as the request is being serviced. If the
anchor that we have requested is infact a child anchor then we always load
the parent anchor and then after the load jump to the location. A child anc
hor
is a an anchor which points to a subpart of the document (has a "#" in the
URL).
*/
extern void HTRequest_setAnchor (HTRequest *request, HTAnchor *anchor);
extern HTParentAnchor * HTRequest_anchor (HTRequest *request);
extern HTChildAnchor * HTRequest_childAnchor (HTRequest * request);
/*
(
Binding to a User Profile
)
Each request is associated with a User profile
which contains information about the local host name, email address of the
user, news server etc. A request object is created with a default "generic
user" but can be assigned a specific user at any time.
*/
extern BOOL HTRequest_setUserProfile (HTRequest * request, HTUserProfile *
up);
extern HTUserProfile * HTRequest_userProfile (HTRequest * request);
/*
(
Binding to a Net Object
)
If a request is actually going on the net then the Net
Manager is contacted to handle the request. The Net manager creates a
HTNEt object and links it to the Request object. You can get to the HTNet
object using the following functions.
*/
extern HTNet * HTRequest_net (HTRequest * request);
extern BOOL HTRequest_setNet (HTRequest * request, HTNet * net);
/*
Note that you can go from the HTNet object to the
HTHost object by calling HTNet_host(...).
(
Binding to a Response Object
)
If a request is actually going on the net and we are getting a response bac
k
then we also create a HTResponse object and
bind it to the request object. Once we know what to do with the response,
we may transfer the information to the anchor object.
*/
extern HTResponse * HTRequest_response (HTRequest * request);
extern BOOL HTRequest_setResponse (HTRequest * request, HTResponse * respon
se);
/* /*
. .
Set the Method for the Request Set the Method for the Request
. .
The Method is the operation to be executed on the requested object. The def ault The Method is the operation to be executed on the requested object. The def ault
set if the set of operations defined by the HTTP protocol, that is "GET", set if the set of operations defined by the HTTP protocol, that is "GET",
"HEAD", "PUT", "POST", "LINK", "UNLINK", and "DELETE" but many of these can "HEAD", "PUT", "POST", "LINK", "UNLINK", and "DELETE" but many of these can
be used in other protocols as well. The important thing is to think of the be used in other protocols as well. The important thing is to think of the
skipping to change at line 221 skipping to change at line 280
extern void HTRequest_setMethod (HTRequest *request, HTMethod method); extern void HTRequest_setMethod (HTRequest *request, HTMethod method);
extern HTMethod HTRequest_method (HTRequest *request); extern HTMethod HTRequest_method (HTRequest *request);
/* /*
. .
Priority Management Priority Management
. .
The request can be assigned an initial priority which then gets inherited The request can be assigned an initial priority which then gets inherited
by all HTNet objects and other requests objects created as a result of this by all HTNet objects and other requests objects
one. You can also assign a separate priority to an indicidual HTNet object created as a result of this one. You can also assign a separate priority
by using the methods in the Net manager. to an indicidual HTNet object by using the methods in the
Net manager.
*/ */
extern HTPriority HTRequest_priority (HTRequest * request); extern HTPriority HTRequest_priority (HTRequest * request);
extern BOOL HTRequest_setPriority (HTRequest * request, HTPriority priority ); extern BOOL HTRequest_setPriority (HTRequest * request, HTPriority priority );
/* /*
. .
Pipelining Managament Pipelining Managament
. .
skipping to change at line 246 skipping to change at line 306
sent over the network. This is done by buffering outgoing requests until sent over the network. This is done by buffering outgoing requests until
either a minimum amount of data has been collected or a timeout causes a either a minimum amount of data has been collected or a timeout causes a
flush to happen. The application can override the output buffering by expli cit flush to happen. The application can override the output buffering by expli cit
request a request object to be flushed. request a request object to be flushed.
*/ */
extern BOOL HTRequest_setFlush (HTRequest * me, BOOL mode); extern BOOL HTRequest_setFlush (HTRequest * me, BOOL mode);
extern BOOL HTRequest_flush (HTRequest * me); extern BOOL HTRequest_flush (HTRequest * me);
/* /*
. (
Binding to a User Profile Force the Pipeline to be Flushed Immediately
. )
Each request is associated with a User profile
which contains information about the local host name, email address of the
user, news server etc. A request object is created with a default "generic
user" but can be assigned a specific user at any time.
*/
extern BOOL HTRequest_setUserProfile (HTRequest * request, HTUserProfile *
up);
extern HTUserProfile * HTRequest_userProfile (HTRequest * request);
/*
.
Binding to a Net Object
.
If a request is actually going on the net then the Net
Manager is contacted to handle the request. The Net manager creates a
HTNEt object and links it to the Request object. You can get to the HTNet
object using the following functions.
*/
extern HTNet * HTRequest_net (HTRequest * request);
extern BOOL HTRequest_setNet (HTRequest * request, HTNet * net);
/*
Note that you can go from the HTNet object to the
HTHost object by calling HTNet_host(...).
.
Binding to a Response Object
.
If a request is actually going on the net and we are getting a response bac Forcing a fluch immediatly is slightly different as this can be done in
k "retrospect". That is, if suddenly the application decides on performing
then we also create a HTResponse object and bind it to the request object. a flush after the request was initiated then it can use this function to
Once we know what to do with the response, we may transfer the information flush at a later time.
to the anchor object.
*/ */
extern HTResponse * HTRequest_response (HTRequest * request); extern int HTRequest_forceFlush (HTRequest * request);
extern BOOL HTRequest_setResponse (HTRequest * request, HTResponse * respon
se);
/* /*
. .
Error Object Dealing with Request Error Messages
. .
Errors are like almost anything kept in lists and a error list can be assoc iated Errors are like almost anything kept in lists and a error list can be assoc iated
with a request using the following functions. In order to make life easier, with a request using the following functions. In order to make life easier,
there are also some easy mapping functions to the there are also some easy mapping functions to the
HTError object, so that you can add an error directly HTError object, so that you can add an error directly
to a request object. to a request object.
*/ */
extern HTList * HTRequest_error (HTRequest * request); extern HTList * HTRequest_error (HTRequest * request);
skipping to change at line 403 skipping to change at line 431
server applications, but some client applications might also want to use server applications, but some client applications might also want to use
content negotiation when accessing the local file system. This method enabl es content negotiation when accessing the local file system. This method enabl es
or disables content negotiation - the default value is ON. or disables content negotiation - the default value is ON.
*/ */
extern void HTRequest_setNegotiation (HTRequest *request, BOOL mode); extern void HTRequest_setNegotiation (HTRequest *request, BOOL mode);
extern BOOL HTRequest_negotiation (HTRequest *request); extern BOOL HTRequest_negotiation (HTRequest *request);
/* /*
. .
Request Preconditions Request Preconditions (HTTP If-* Headers)
. .
Should this request use preconditions when doing a PUT or a Should this request use preconditions when doing a PUT or a
POST? These are the "if-*" header fields that can be used POST? These are the "if-*" header fields that can be used
to avoid version conflicts etc. The default is not to use any preconsitions to avoid version conflicts etc. The default is not to use any preconsitions
(HT_NO_MATCH). The _THIS versions use etags and/or time (HT_NO_MATCH). The _THIS versions use etags and/or time
stamps and the _ANY versions use the "*" header field value stamps and the _ANY versions use the "*" header field value
of the if-match and if-non-match header fields. of the if-match and if-non-match header fields.
*/ */
typedef enum _HTPreconditions { typedef enum _HTPreconditions {
skipping to change at line 426 skipping to change at line 454
HT_MATCH_ANY, HT_MATCH_ANY,
HT_DONT_MATCH_THIS, HT_DONT_MATCH_THIS,
HT_DONT_MATCH_ANY HT_DONT_MATCH_ANY
} HTPreconditions; } HTPreconditions;
extern void HTRequest_setPreconditions (HTRequest * me, HTPreconditions mod e); extern void HTRequest_setPreconditions (HTRequest * me, HTPreconditions mod e);
extern HTPreconditions HTRequest_preconditions (HTRequest * me); extern HTPreconditions HTRequest_preconditions (HTRequest * me);
/* /*
. .
Handling Metainformation (RFC822 Headers) Local MIME header Parsers
. .
The Library supports a large set of headers that can be sent along with a MIMEParsers get their own type which is optimized for static and regex pars
request (or a response for that matter). All headers can be either disabled er
or enabled using bit flags that are defined in the following. strings.
*/
typedef struct _HTMIMEParseSet HTMIMEParseSet;
extern void HTRequest_setMIMEParseSet (HTRequest *request,
HTMIMEParseSet * parseSet, BOOL local
);
extern HTMIMEParseSet * HTRequest_MIMEParseSet (HTRequest *request,
BOOL * pLocal);
/*
.
Which Default Protocol Header Fields To Use?
.
Libwww supports a large set of headers that can be sent along with a reques
t
(or a response for that matter). All headers can be either disabled or enab
led
using bit flags that are defined in the following. See also the
section on how to extend the default set of supported header
fields.
( (
General HTTP Header Mask General HTTP Header Mask
) )
There are a few header fields which have general applicability for both req uest There are a few header fields which have general applicability for both req uest
and response mesages, but which do not apply to the communication parties and response mesages, but which do not apply to the communication parties
or theentity being transferred. This mask enables and disables these header s. or theentity being transferred. This mask enables and disables these header s.
If the bit is not turned on they are not sent. If the bit is not turned on they are not sent.
*/ */
typedef enum _HTGnHd { typedef enum _HTGnHd {
HT_G_CC = 0x1, HT_G_CC = 0x1,
HT_G_CONNECTION = 0x2, HT_G_CONNECTION = 0x2,
HT_G_DATE = 0x4, HT_G_DATE = 0x4,
HT_G_PRAGMA_NO_CACHE= 0x8, HT_G_PRAGMA_NO_CACHE= 0x8,
HT_G_FORWARDED = 0x10, HT_G_FORWARDED = 0x10,
HT_G_MESSAGE_ID = 0x20, HT_G_MESSAGE_ID = 0x20,
HT_G_MIME = 0x40, HT_G_MIME = 0x40,
HT_G_TRAILER = 0x80, HT_G_TRAILER = 0x80,
HT_G_TRANSFER = 0x100 HT_G_TRANSFER = 0x100,
HT_G_EXTRA_HEADERS = 0x200
} HTGnHd; } HTGnHd;
#define DEFAULT_GENERAL_HEADERS \ #define DEFAULT_GENERAL_HEADERS \
HT_G_CONNECTION + HT_G_CC + HT_G_TRANSFER + HT_G_TRAILER HT_G_CONNECTION + HT_G_CC + HT_G_TRANSFER + HT_G_TRAILER + \
HT_G_EXTRA_HEADERS
extern void HTRequest_setGnHd (HTRequest *request, HTGnHd gnhd); extern void HTRequest_setGnHd (HTRequest *request, HTGnHd gnhd);
extern void HTRequest_addGnHd (HTRequest *request, HTGnHd gnhd); extern void HTRequest_addGnHd (HTRequest *request, HTGnHd gnhd);
extern HTGnHd HTRequest_gnHd (HTRequest *request); extern HTGnHd HTRequest_gnHd (HTRequest *request);
/* /*
( (
Request Headers Request Headers
) )
skipping to change at line 566 skipping to change at line 613
HT_E_DERIVED_FROM = 0x400, HT_E_DERIVED_FROM = 0x400,
HT_E_ETAG = 0x800, HT_E_ETAG = 0x800,
HT_E_EXPIRES = 0x1000, HT_E_EXPIRES = 0x1000,
HT_E_LAST_MODIFIED = 0x2000, HT_E_LAST_MODIFIED = 0x2000,
HT_E_LINK = 0x4000, HT_E_LINK = 0x4000,
HT_E_TITLE = 0x8000, HT_E_TITLE = 0x8000,
HT_E_URI = 0x10000, HT_E_URI = 0x10000,
HT_E_VERSION = 0x20000 HT_E_VERSION = 0x20000
} HTEnHd; } HTEnHd;
#define DEFAULT_ENTITY_HEADERS 0xFFFF /* all */ #define DEFAULT_ENTITY_HEADERS 0xFFFFFFFF /* all */
extern void HTRequest_setEnHd (HTRequest *request, HTEnHd enhd); extern void HTRequest_setEnHd (HTRequest *request, HTEnHd enhd);
extern void HTRequest_addEnHd (HTRequest *request, HTEnHd enhd); extern void HTRequest_addEnHd (HTRequest *request, HTEnHd enhd);
extern HTEnHd HTRequest_enHd (HTRequest *request); extern HTEnHd HTRequest_enHd (HTRequest *request);
/* /*
. .
Local MIME header Parsers Extending The Default Set Of Header Fields
. .
MIMEParsers get their own type which is optimized for static and regex pars See also how to set up default header fields. There
er are three ways to extend the set of headers that are sent in a request:
strings.
o
A simple association list
o
A stream oriented approach where the stream (called
a generator) has direct access to the outgoing stream. That it, it can
add any header it likes.
o
HTTP extension mechanism which
is a much better way for handling extensions.
(
1) Simple Association List
)
Add the (name, value) and it will be converted into MIME header format as
name: value. Do NOT add CRLF line termination - this is done by
the HTTP header generator stream
*/ */
typedef struct _HTMIMEParseSet HTMIMEParseSet; extern BOOL HTRequest_addExtraHeader (HTRequest * request,
extern void HTRequest_setMIMEParseSet (HTRequest *request, char * token, char * value);
HTMIMEParseSet * parseSet, BOOL local extern HTAssocList * HTRequest_extraHeader (HTRequest * request);
); extern BOOL HTRequest_deleteExtraHeaderAll (HTRequest * request);
extern HTMIMEParseSet * HTRequest_MIMEParseSet (HTRequest *request,
BOOL * pLocal); /*
(
2) Stream Oriented Header Generators
)
Extra header information can be send along with a request using
header generators. The text is sent as is so
it must be preformatted with CRLF line terminators. You can also
register MIME header parsers using the HTHeader
module.
*/
extern void HTRequest_setGenerator (HTRequest *request, HTList *gens,
BOOL override);
extern HTList * HTRequest_generator (HTRequest *request, BOOL *override);
/*
(
3) HTTP Extension Framework
)
These association lists contain the information that we are to send as HTTP
Extension Framework. This is not done yet but you can find some hints in
the PEP module
*/
/* TBD */
/* /*
. .
Accept Headers User And Application Preferences Using Accept Headers
. .
The Accept family of headers is an important part of HTTP handling the form at The Accept family of headers is an important part of HTTP handling the form at
negotiation. The Library supports both a global set of accept headers that negotiation. The Library supports both a global set of accept headers that
are used in all HTTP requests and a local set of accept headers are used in all HTTP requests and a local set of accept headers
that are used in specific requests only. The global ones are defined in the that are used in specific requests only. The global ones are defined in the
Format Manager. Format Manager.
Each request can have its local set of accept headers that either are added Each request can have its local set of accept headers that either are added
to the global set or replaces the global set of accept headers. Non of the to the global set or replaces the global set of accept headers. Non of the
skipping to change at line 709 skipping to change at line 801
directives that are to be sent as part of the Cache-Control directives that are to be sent as part of the Cache-Control
header. header.
*/ */
extern BOOL HTRequest_addCacheControl (HTRequest * request, extern BOOL HTRequest_addCacheControl (HTRequest * request,
char * token, char *value); char * token, char *value);
extern BOOL HTRequest_deleteCacheControlAll (HTRequest * request); extern BOOL HTRequest_deleteCacheControlAll (HTRequest * request);
extern HTAssocList * HTRequest_cacheControl (HTRequest * request); extern HTAssocList * HTRequest_cacheControl (HTRequest * request);
/* /*
( .
Date and Time Stamp when Request was Issued
.
The start time when the request was issued may be of value to the cache
validation mechanism as described by the HTTP/1.1 specification. The value
is automatically set when creating the request headers and sending off the
request. The time is a local time.
*/
extern time_t HTRequest_date (HTRequest * request);
extern BOOL HTRequest_setDate (HTRequest * request, time_t date);
/*
.
HTTP Expect Directives HTTP Expect Directives
) .
The Expect request-header field is used to indicate that particular server The Expect request-header field is used to indicate that particular server
behaviors are required by the client. A server that does not understand or behaviors are required by the client. A server that does not understand or
is unable to comply with any of the expectation values in the Expect field is unable to comply with any of the expectation values in the Expect field
of a request MUST respond with appropriate error status. of a request MUST respond with appropriate error status.
*/ */
extern BOOL HTRequest_addExpect (HTRequest * me, extern BOOL HTRequest_addExpect (HTRequest * me,
char * token, char * value); char * token, char * value);
extern BOOL HTRequest_deleteExpect (HTRequest * me); extern BOOL HTRequest_deleteExpect (HTRequest * me);
extern HTAssocList * HTRequest_expect (HTRequest * me); extern HTAssocList * HTRequest_expect (HTRequest * me);
/* /*
( .
Partial Requests and Range Retrievals Partial Requests and Range Retrievals
) .
Libwww can issue range requests in case we have already obtained a part of Libwww can issue range requests in case we have already obtained a part of
the entity body. Since all HTTP entities are represented in HTTP messages the entity body. Since all HTTP entities are represented in HTTP messages
as sequences of bytes, the concept of a byte range is meaningful for any as sequences of bytes, the concept of a byte range is meaningful for any
HTTP entity. (However, not all clients and servers need to support byte-ran ge HTTP entity. (However, not all clients and servers need to support byte-ran ge
operations.) Byte range specifications in HTTP apply to the sequence of byt es operations.) Byte range specifications in HTTP apply to the sequence of byt es
in the entity-body (not necessarily the same as the message-body). A byte in the entity-body (not necessarily the same as the message-body). A byte
range operation may specify a single range of bytes, or a set of ranges wit hin range operation may specify a single range of bytes, or a set of ranges wit hin
a single entity. a single entity.
*/ */
skipping to change at line 792 skipping to change at line 898
The realm is normally set and used by the authentication filters. The realm is normally set and used by the authentication filters.
*/ */
extern BOOL HTRequest_setRealm (HTRequest * request, char * realm); extern BOOL HTRequest_setRealm (HTRequest * request, char * realm);
extern const char * HTRequest_realm (HTRequest * request); extern const char * HTRequest_realm (HTRequest * request);
extern BOOL HTRequest_deleteRealm (HTRequest * me); extern BOOL HTRequest_deleteRealm (HTRequest * me);
/* /*
. .
HTTP Extensions (PEP)
.
HTTP can be extended in several ways but traditionally it has been by using
new headers. Here we present a new idea which provides a framework for desc
ribing
extensions and their scope. This is only an idea an may be modified later!
The implementation of the extensions can be found in the
PEP module
(
Protocol
)
This association list is a list of the extension directives that are to be
sent as part of the request.
*/
extern BOOL HTRequest_addProtocol (HTRequest * request,
char * token, char * value);
extern BOOL HTRequest_deleteProtocolAll (HTRequest * request);
extern HTAssocList * HTRequest_Protocol (HTRequest * request);
/*
(
Protocol Info
)
This association list is a list of the extension directives that are to be
sent as part of the request.
*/
extern BOOL HTRequest_addProtocolInfo (HTRequest * request,
char * token, char * value);
extern BOOL HTRequest_deleteProtocolInfoAll (HTRequest * request);
extern HTAssocList * HTRequest_ProtocolInfo (HTRequest * request);
/*
(
Protocol Request
)
This association list is a list of the extension directives that are to be
sent as part of the request.
*/
extern BOOL HTRequest_addProtocolRequest (HTRequest * request,
char * token, char * value);
extern BOOL HTRequest_deleteProtocolRequestAll (HTRequest * request);
extern HTAssocList * HTRequest_ProtocolRequest (HTRequest * request);
/*
.
HTTP Referer Field HTTP Referer Field
. .
If this parameter is set then a `Referer: <parent address> can be generated If this parameter is set then a `Referer: <parent address> can be generated
in the request to the server, see in the request to the server, see
Referer field in a HTTP Request Referer field in a HTTP Request
*/ */
extern void HTRequest_setParent (HTRequest *request, HTParentAnchor *parent ); extern void HTRequest_setParent (HTRequest *request, HTParentAnchor *parent );
extern HTParentAnchor * HTRequest_parent (HTRequest *request); extern HTParentAnchor * HTRequest_parent (HTRequest *request);
/* /*
. .
Extra Headers Local BEFORE and AFTER Filters
.
Extra header information can be send along with a request using this variab
le.
The text is sent as is so it must be preformatted with
<CRLF> line terminators. This will get changed at some
point so that you can register a header together with a handler in the MIME
parser.
*/
extern void HTRequest_setGenerator (HTRequest *request, HTList *gens,
BOOL override);
extern HTList * HTRequest_generator (HTRequest *request, BOOL *override);
/*
.
BEFORE and AFTER Filters
. .
The request object may have it's own before and after The request object may have it's own before and after
filters. These may override or suplement the filters. These may override or suplement the
global set in HTNet. The request object itself handles global set in HTNet. The request object itself handles
the list element, that is this should not be freed bu the caller. the list element, that is this should not be freed bu the caller.
( (
BEFORE Filters BEFORE Filters
) )
skipping to change at line 950 skipping to change at line 989
You can delete a local AFTER filter explicitly by passing the filter itself You can delete a local AFTER filter explicitly by passing the filter itself
or you can delete all filters which are registered for a certain status cod e. or you can delete all filters which are registered for a certain status cod e.
*/ */
extern BOOL HTRequest_deleteAfter (HTRequest * request, HTNetAfter * filter ); extern BOOL HTRequest_deleteAfter (HTRequest * request, HTNetAfter * filter );
extern BOOL HTRequest_deleteAfterStatus (HTRequest * request, int status); extern BOOL HTRequest_deleteAfterStatus (HTRequest * request, int status);
extern BOOL HTRequest_deleteAfterAll (HTRequest * request); extern BOOL HTRequest_deleteAfterAll (HTRequest * request);
/* /*
. .
Sending data to the Network Sending data from App to Network
. .
Multiple Request objects can be connected in order to create a Multiple Request objects can be connected in order to create a
PostWeb for sending data PostWeb for sending data
from one location (source) to another (destination). Request objects are from one location (source) to another (destination). Request objects are
bound together by connecting the output stream of the source with the input bound together by connecting the output stream of the source with the input
stream of the destination requst. The connection can be done directly so stream of the destination requst. The connection can be done directly so
that the output from the source is exactly what is sent to the destination that the output from the source is exactly what is sent to the destination
or there can be a conversion between the two streams so that we can do or there can be a conversion between the two streams so that we can do
conversions on the fly while copying data. This is in fact the way we use conversions on the fly while copying data. This is in fact the way we use
skipping to change at line 1009 skipping to change at line 1048
The input stream is to be used to put data to the network. Normally The input stream is to be used to put data to the network. Normally
each protocol sets the input stream in order to generate the protocol heade rs each protocol sets the input stream in order to generate the protocol heade rs
while making a request. while making a request.
*/ */
extern void HTRequest_setInputStream (HTRequest * request, HTStream * input ); extern void HTRequest_setInputStream (HTRequest * request, HTStream * input );
extern HTStream *HTRequest_inputStream (HTRequest * request); extern HTStream *HTRequest_inputStream (HTRequest * request);
/* /*
( (
Is This Request part of a Post Web? Is This Request part of a Post Web? (Deprecated)
) )
Check to see if this request object is part of a Post Web. Check to see if this request object is part of a Post Web.
*/ */
extern BOOL HTRequest_isPostWeb (HTRequest * request); extern BOOL HTRequest_isPostWeb (HTRequest * request);
/* /*
( (
Source of a Request Source of a Request
skipping to change at line 1047 skipping to change at line 1086
The output stream is to be used to put data down to as they come in The output stream is to be used to put data down to as they come in
from the network and back to the application. The default value is from the network and back to the application. The default value is
NULL which means that the stream goes to the user (display). NULL which means that the stream goes to the user (display).
*/ */
extern void HTRequest_setOutputStream (HTRequest *request, HTStream *output ); extern void HTRequest_setOutputStream (HTRequest *request, HTStream *output );
extern HTStream *HTRequest_outputStream (HTRequest *request); extern HTStream *HTRequest_outputStream (HTRequest *request);
/* /*
( (
Has Output Stream been Connected to Channel? Default Output Stream Format
) )
Has output stream been connected to the channel? If not then we must free The desired format of the output stream. This is used in the
it explicitly when deleting the request object stream stack builder to determine which stream
*/ to plug in to deal with the data. If NULL, then
extern void HTRequest_setOutputConnected (HTRequest * request, BOOL mode);
extern BOOL HTRequest_outputConnected (HTRequest * request);
/*
The desired format of the output stream. This can be used to get unconverte
d
data etc. from the library. If NULL, then
WWW_PRESENT is default value. WWW_PRESENT is default value.
*/ */
extern void HTRequest_setOutputFormat (HTRequest *request, HTFormat format) ; extern void HTRequest_setOutputFormat (HTRequest *request, HTFormat format) ;
extern HTFormat HTRequest_outputFormat (HTRequest *request); extern HTFormat HTRequest_outputFormat (HTRequest *request);
/* /*
( (
Debug Stream Has Output Stream been Connected to Channel? (Deprecated)
)
Has output stream been connected to the channel? If not then we must free
it explicitly when deleting the request object
*/
extern void HTRequest_setOutputConnected (HTRequest * request, BOOL mode);
extern BOOL HTRequest_outputConnected (HTRequest * request);
/*
(
Default Debug Stream
) )
All object bodies sent from the server with status codes different from All object bodies sent from the server with status codes different from
200 OK will be put down this stream. This can be used for 200 OK will be put down this stream. This can be used for
redirecting body information in status codes different from "200 OK" to for redirecting body information in status codes different from "200 OK" to for
example a debug window. If the value is NULL (default) then the stream is example a debug window. If the value is NULL (default) then the stream is
not set up. not set up.
*/ */
extern void HTRequest_setDebugStream (HTRequest *request, HTStream *debug); extern void HTRequest_setDebugStream (HTRequest *request, HTStream *debug);
extern HTStream *HTRequest_debugStream (HTRequest *request); extern HTStream *HTRequest_debugStream (HTRequest *request);
/* /*
(
Default Debug Stream Format
)
The desired format of the error stream. This can be used to get unconverted The desired format of the error stream. This can be used to get unconverted
data etc. from the library. The default value if WWW_HTML as data etc. from the library. The default value if WWW_HTML as
a character based only has one WWW_PRESENT. a character based only has one WWW_PRESENT.
*/ */
extern void HTRequest_setDebugFormat (HTRequest *request, HTFormat format); extern void HTRequest_setDebugFormat (HTRequest *request, HTFormat format);
extern HTFormat HTRequest_debugFormat (HTRequest *request); extern HTFormat HTRequest_debugFormat (HTRequest *request);
/* /*
skipping to change at line 1119 skipping to change at line 1165
The callback function can be passed an arbitrary pointer (the void part) The callback function can be passed an arbitrary pointer (the void part)
which can describe the context of the current request structure. If such which can describe the context of the current request structure. If such
context information is required then it can be set using the following meth ods: context information is required then it can be set using the following meth ods:
*/ */
extern void HTRequest_setContext (HTRequest *request, void *context); extern void HTRequest_setContext (HTRequest *request, void *context);
extern void *HTRequest_context (HTRequest *request); extern void *HTRequest_context (HTRequest *request);
/* /*
. .
Binding to an Anchor Object
.
Every request object has an anchor associated
with it. The anchor normally lives until the application terminates but a
request object only lives as long as the request is being serviced. If the
anchor that we have requested is infact a child anchor then we always load
the parent anchor and then after the load jump to the location. A child anc
hor
is a an anchor which points to a subpart of the document (has a "#" in the
URL).
*/
extern void HTRequest_setAnchor (HTRequest *request, HTAnchor *anchor);
extern HTParentAnchor * HTRequest_anchor (HTRequest *request);
extern HTChildAnchor * HTRequest_childAnchor (HTRequest * request);
/*
.
Should we Issue a full HTTP Request-URI? Should we Issue a full HTTP Request-URI?
. .
In early versions of HTTP, the request sent to the remote server varies whe ther In early versions of HTTP, the request sent to the remote server varies whe ther
we use a proxy or go directly to the origin server. The default value is we use a proxy or go directly to the origin server. The default value is
OFF but we use a full request if we are talking to a proxy server. OFF but we use a full request if we are talking to a proxy server.
*/ */
extern void HTRequest_setFullURI (HTRequest *request, BOOL mode); extern void HTRequest_setFullURI (HTRequest *request, BOOL mode);
extern BOOL HTRequest_fullURI (HTRequest *request); extern BOOL HTRequest_fullURI (HTRequest *request);
/* /*
. .
Proxy URL Handling Proxies
. .
In case we are using a proxy for this requst then we can register it togeth er In case we are using a proxy for this requst then we can register it togeth er
with the request object. That way we can find the proxy and look for with the request object. That way we can find the proxy and look for
authentication information, for example in the authentication information, for example in the
Authentication filter. The string is freed by Authentication filter. The string is freed by
the Request object on deletion. the Request object on deletion. This is normally handled automatically by
the proxy and gateway module
*/ */
extern BOOL HTRequest_setProxy (HTRequest * request, const char * proxy) ; extern BOOL HTRequest_setProxy (HTRequest * request, const char * proxy) ;
extern char * HTRequest_proxy (HTRequest * request); extern char * HTRequest_proxy (HTRequest * request);
extern BOOL HTRequest_deleteProxy (HTRequest * request); extern BOOL HTRequest_deleteProxy (HTRequest * request);
/* /*
. .
Enity Bytes Read or Written in a Request Bytes Read or Written in a Request
. .
This function returns the bytes read in the current request. For a deeper This function returns the bytes read in the current request. For a deeper
description of what the current request is, please read the user's guide. description of what the current request is, please read the user's guide.
This function can be used in for example the HTAlert This function can be used in for example the HTAlert
module to give the number of bytes read or written in a progress message. module to give the number of bytes read or written in a progress message.
*/ */
extern long HTRequest_bodyRead (HTRequest * request); extern long HTRequest_bodyRead (HTRequest * request);
extern long HTRequest_bodyWritten (HTRequest * request); extern long HTRequest_bodyWritten (HTRequest * request);
skipping to change at line 1188 skipping to change at line 1217
/* /*
You can also get the total number of bytes read or written including the You can also get the total number of bytes read or written including the
headers headers
*/ */
extern long HTRequest_bytesRead (HTRequest * request); extern long HTRequest_bytesRead (HTRequest * request);
extern long HTRequest_bytesWritten (HTRequest * request); extern long HTRequest_bytesWritten (HTRequest * request);
/* /*
.
Internal Request Objects
.
The library may under certain circumstances create its own Request objects.
These are all handled internal and does not show up on the application side
at all.
*/
extern BOOL HTRequest_setInternal (HTRequest * request, BOOL mode);
extern BOOL HTRequest_internal (HTRequest * request);
extern int HTRequest_forceFlush (HTRequest * request);
/*
*/ */
#endif /* HTREQ_H */ #endif /* HTREQ_H */
/* /*
@(#) $Id: HTReq.html,v 2.65 1998/12/15 05:34:28 frystyk Exp $ @(#) $Id: HTReq.html,v 2.66 1999/03/19 14:24:37 frystyk Exp $
*/ */
 End of changes. 38 change blocks. 
237 lines changed or deleted 251 lines changed or added


 HTReqMan.h   HTReqMan.h 
skipping to change at line 158 skipping to change at line 158
) )
These are the masks that decides what headers to send. These are the masks that decides what headers to send.
*/ */
HTGnHd GenMask; HTGnHd GenMask;
HTRsHd ResponseMask; HTRsHd ResponseMask;
HTRqHd RequestMask; HTRqHd RequestMask;
HTEnHd EntityMask; HTEnHd EntityMask;
HTList * generators;
BOOL gens_local;
/* /*
( (
Local MIME Header Parsers Local MIME Header Parsers
) )
Each request can be assigned its own MIME header parsers. Each request can be assigned its own MIME header parsers.
*/ */
HTMIMEParseSet * parseSet; HTMIMEParseSet * parseSet;
BOOL pars_local; BOOL pars_local;
skipping to change at line 274 skipping to change at line 271
The credentials list contains the information that we are to The credentials list contains the information that we are to
send as part of the Authorization header. The realm is if we send as part of the Authorization header. The realm is if we
already know that we need to generate credentials for a specific realm. already know that we need to generate credentials for a specific realm.
*/ */
char * realm; /* Current realm */ char * realm; /* Current realm */
HTAssocList * credentials; /* Credentials received by server */ HTAssocList * credentials; /* Credentials received by server */
/* /*
( (
Protocol Extension Protocol (PEP) Information Request Header Extensibility
) )
These association lists contain the information that we are to send as PEP 1) Simple Association List
headers in the request.
Add the (name, value) and it will be converted into MIME header format as
name: value. DO NOT ADD CRLF line termination - this is done
by the HTTP header generator stream
*/ */
HTAssocList * protocol; HTAssocList * extra_headers;
HTAssocList * protocol_info;
HTAssocList * protocol_request; /*
2) Stream Oriented Header Generators
A generator is a stream with direct access to the output stream
*/
HTList * generators;
BOOL gens_local;
/*
4) HTTP Extension Framework
These association lists contain the information that we are to send as
HTTP Extension Framework.
*/
HTAssocList * mandatory;
HTAssocList * optional;
/* /*
( (
Anchors Anchors
) )
*/ */
HTParentAnchor * anchor; /* The Client anchor for this request */ HTParentAnchor * anchor; /* The Client anchor for this request */
HTChildAnchor * childAnchor; /* For element within the object */ HTChildAnchor * childAnchor; /* For element within the object */
skipping to change at line 339 skipping to change at line 358
( (
Context Swapping Context Swapping
) )
*/ */
HTRequestCallback * callback; HTRequestCallback * callback;
void * context; void * context;
/* /*
( (
PostWeb Information PostWeb Information (Not used anymore - don't use!)
) )
*/ */
HTRequest * source; /* Source for request o r itself */ HTRequest * source; /* Source for request o r itself */
HTParentAnchor * source_anchor; /* Source anchor or itself */ HTParentAnchor * source_anchor; /* Source anchor or itself */
HTRequest * mainDestination; /* For the typi cal case */ HTRequest * mainDestination; /* For the typi cal case */
HTList * destinations; /* List of related requests */ HTList * destinations; /* List of related requests */
int destRequests; /* Number of destination requests */ int destRequests; /* Number of destination requests */
int destStreams; /* Number of destination streams */ int destStreams; /* Number of destination streams */
skipping to change at line 394 skipping to change at line 413
/* /*
End of Declaration End of Declaration
*/ */
#endif /* HTREQMAN_H */ #endif /* HTREQMAN_H */
/* /*
@(#) $Id: HTReqMan.html,v 2.43 1999/02/01 18:41:11 frystyk Exp $ @(#) $Id: HTReqMan.html,v 2.44 1999/03/19 14:24:37 frystyk Exp $
*/ */
 End of changes. 6 change blocks. 
11 lines changed or deleted 30 lines changed or added


 HTString.h   HTString.h 
skipping to change at line 106 skipping to change at line 106
extern char * HTStrCaseMatch (const char * tmpl, const char * name); extern char * HTStrCaseMatch (const char * tmpl, const char * name);
/* /*
. .
Case-insensitive strstr Case-insensitive strstr
. .
This works like strstr() but is not case-sensitive. This works like strstr() but is not case-sensitive.
*/ */
extern char * strcasestr (char * s1, char * s2); extern char * HTStrCaseStr (char * s1, char * s2);
/* /*
. .
Strip white space off a string Strip white space off a string
. .
Return value points to first non-white character, or to '/0' if none. All Return value points to first non-white character, or to '/0' if none. All
trailing white space is OVERWRITTEN with zero. trailing white space is OVERWRITTEN with zero.
*/ */
extern char * HTStrip (char * s); extern char * HTStrip (char * s);
/* /*
*/ */
#endif /* !HTSTRING_H */ #endif /* !HTSTRING_H */
/* /*
@(#) $Id: HTString.html,v 2.36 1998/05/14 02:11:06 frystyk Exp $ @(#) $Id: HTString.html,v 2.37 1999/04/12 15:01:21 frystyk Exp $
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 HTUtils.h   HTUtils.h 
/* W3C Sample Code Library libwww Debug Information and Genera /*
l Purpose Macros
DEBUG INFORMATION AND GENERAL PURPOSE MACROS W3C Sample Code Library libwww Debug
Information and General Purpose
Macros
!
Debug Information and General Purpose Macros
!
*/
*/
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH ** Please first read the full copyright statement in the file COPYRIGH.
.
*/ */
/* /*
This module is a part of the W3C Sample Code Library. See also the syste This module is a part of the W3C Sample
m dependent Code Library. See also the system dependent file
file sysdep module for system specific information. sysdep module for system specific information.
*/
*/
#ifndef HTUTILS_H #ifndef HTUTILS_H
#define HTUTILS_H #define HTUTILS_H
/*
DESTINATION FOR USER PRINT MESSAGES /*
.
Destination for User Print Messages
.
You can send print messages to the user to various destinations dependin You can send print messages to the user to various destinations
g on the type depending on the type of your application. By default, on Unix the
of your application. By default, on Unix the messages are sent to stdout messages are sent to stdout using
using fprintf. fprintf. If we are on MSWindows and have a windows
If we are on MSWindows and have a windows applications then register a H applications then register a HTPrintCallback
TPrintCallback function. This is done with HTPrint_setCallback. It tells
function. This is done with HTPrint_setCallback. It tells HTPrint to cal HTPrint to call a HTPrintCallback. If
l a HTDEBUG
HTPrintCallback. If HTDEBUG is not defined then don't do any of the abov is not defined then don't do any of the above.
e. */
*/
typedef int HTPrintCallback(const char * fmt, va_list pArgs); typedef int HTPrintCallback(const char * fmt, va_list pArgs);
extern void HTPrint_setCallback(HTPrintCallback * pCall); extern void HTPrint_setCallback(HTPrintCallback * pCall);
extern HTPrintCallback * HTPrint_getCallback(void); extern HTPrintCallback * HTPrint_getCallback(void);
extern int HTPrint(const char * fmt, ...); extern int HTPrint(const char * fmt, ...);
/*
DEBUG MESSAGE CONTROL /*
.
Debug Message Control
.
This is the global flag for setting the WWWTRACE options. The verbose mo This is the global flag for setting the WWWTRACE options.
de is no longer The verbose mode is no longer a simple boolean but a bit field so that it
a simple boolean but a bit field so that it is possible to see parts of is possible to see parts of the output messages.
the output */
messages.
*/
#if defined(NODEBUG) || defined(NDEBUG) || defined(_NDEBUG) #if defined(NODEBUG) || defined(NDEBUG) || defined(_NDEBUG)
#undef HTDEBUG #undef HTDEBUG
#else #else
#ifndef HTDEBUG #ifndef HTDEBUG
#define HTDEBUG 1 #define HTDEBUG 1
#endif /* HTDEBUG */ #endif /* HTDEBUG */
#endif #endif
/*
/*
(
C Preprocessor defines C Preprocessor defines
)
Make sure that the following macros are defined Make sure that the following macros are defined
*/
*/
#ifndef __FILE__ #ifndef __FILE__
#define __FILE__ "" #define __FILE__ ""
#endif #endif
#ifndef __LINE__ #ifndef __LINE__
#define __LINE__ 0L #define __LINE__ 0L
#endif #endif
/*
/*
(
Definition of the Global Trace Flag Definition of the Global Trace Flag
)
The global trace flag variable is available everywhere. The global trace flag variable is available everywhere.
*/
*/
#ifdef HTDEBUG #ifdef HTDEBUG
#ifdef WWW_WIN_DLL #ifdef WWW_WIN_DLL
extern int * WWW_TraceFlag; /* In DLLs, we need the indirectio extern int * WWW_TraceFlag; /* In DLLs, we need the indirection
n */ */
#define WWWTRACE (*WWW_TraceFlag) #define WWWTRACE (*WWW_TraceFlag)
#else #else
extern unsigned int WWW_TraceFlag; /* Global flag for all W3 trac extern unsigned int WWW_TraceFlag; /* Global flag for all W3 trace
e */ */
#define WWWTRACE (WWW_TraceFlag) #define WWWTRACE (WWW_TraceFlag)
#endif /* WWW_WIN_DLL */ #endif /* WWW_WIN_DLL */
#else #else
#define WWWTRACE 0 #define WWWTRACE 0
#endif /* HTDEBUG */ #endif /* HTDEBUG */
/*
/*
(
Select which Trace Messages to show Select which Trace Messages to show
)
Libwww has a huge set of trace messages and it is therefor a good idea t Libwww has a huge set of trace messages and it is therefor a good idea to
o be able to be able to select which ones to see for any particular trace. An easy way
select which ones to see for any particular trace. An easy way to set th to set this is using the funtion
is is using the HTSetTraceMessageMask. The WWWTRACE
funtion HTSetTraceMessageMask. The WWWTRACE define outputs messages if v define outputs messages if verbose mode is active according to the followin
erbose mode is g
active according to the following rules: rules:
*/
*/
typedef enum _HTTraceFlags { typedef enum _HTTraceFlags {
SHOW_UTIL_TRACE = 0x1, SHOW_UTIL_TRACE = 0x1,
SHOW_APP_TRACE = 0x2, SHOW_APP_TRACE = 0x2,
SHOW_CACHE_TRACE = 0x4, SHOW_CACHE_TRACE = 0x4,
SHOW_SGML_TRACE = 0x8, SHOW_SGML_TRACE = 0x8,
SHOW_BIND_TRACE = 0x10, SHOW_BIND_TRACE = 0x10,
SHOW_THREAD_TRACE = 0x20, SHOW_THREAD_TRACE = 0x20,
SHOW_STREAM_TRACE = 0x40, SHOW_STREAM_TRACE = 0x40,
SHOW_PROTOCOL_TRACE = 0x80, SHOW_PROTOCOL_TRACE = 0x80,
SHOW_MEM_TRACE = 0x100, SHOW_MEM_TRACE = 0x100,
SHOW_URI_TRACE = 0x200, SHOW_URI_TRACE = 0x200,
SHOW_AUTH_TRACE = 0x400, SHOW_AUTH_TRACE = 0x400,
SHOW_ANCHOR_TRACE = 0x800, SHOW_ANCHOR_TRACE = 0x800,
SHOW_PICS_TRACE = 0x1000, SHOW_PICS_TRACE = 0x1000,
SHOW_CORE_TRACE = 0x2000, SHOW_CORE_TRACE = 0x2000,
SHOW_MUX_TRACE = 0x4000, SHOW_MUX_TRACE = 0x4000,
SHOW_SQL_TRACE = 0x8000, SHOW_SQL_TRACE = 0x8000,
SHOW_XML_TRACE = 0x10000, SHOW_XML_TRACE = 0x10000,
SHOW_ALL_TRACE = 0xFFFFFFFF SHOW_ALL_TRACE = 0xFFFFFFFF
} HTTraceFlags; } HTTraceFlags;
/* /*
The flags are made so that they can serve as a group flag for correlated The flags are made so that they can serve as a group flag for correlated
trace trace messages, e.g. showing messages for SGML and HTML at the same time.
messages, e.g. showing messages for SGML and HTML at the same time. */
*/ #define UTIL_TRACE (WWWTRACE & SHOW_UTIL_TRACE)
#define UTIL_TRACE (WWWTRACE & SHOW_UTIL_TRACE) #define APP_TRACE (WWWTRACE & SHOW_APP_TRACE)
#define APP_TRACE (WWWTRACE & SHOW_APP_TRACE) #define CACHE_TRACE (WWWTRACE & SHOW_CACHE_TRACE)
#define CACHE_TRACE (WWWTRACE & SHOW_CACHE_TRACE) #define SGML_TRACE (WWWTRACE & SHOW_SGML_TRACE)
#define SGML_TRACE (WWWTRACE & SHOW_SGML_TRACE) #define BIND_TRACE (WWWTRACE & SHOW_BIND_TRACE)
#define BIND_TRACE (WWWTRACE & SHOW_BIND_TRACE) #define THD_TRACE (WWWTRACE & SHOW_THREAD_TRACE)
#define THD_TRACE (WWWTRACE & SHOW_THREAD_TRACE) #define STREAM_TRACE (WWWTRACE & SHOW_STREAM_TRACE)
#define STREAM_TRACE (WWWTRACE & SHOW_STREAM_TRACE) #define PROT_TRACE (WWWTRACE & SHOW_PROTOCOL_TRACE)
#define PROT_TRACE (WWWTRACE & SHOW_PROTOCOL_TRACE) #define MEM_TRACE (WWWTRACE & SHOW_MEM_TRACE)
#define MEM_TRACE (WWWTRACE & SHOW_MEM_TRACE) #define URI_TRACE (WWWTRACE & SHOW_URI_TRACE)
#define URI_TRACE (WWWTRACE & SHOW_URI_TRACE) #define AUTH_TRACE (WWWTRACE & SHOW_AUTH_TRACE)
#define AUTH_TRACE (WWWTRACE & SHOW_AUTH_TRACE) #define ANCH_TRACE (WWWTRACE & SHOW_ANCHOR_TRACE)
#define ANCH_TRACE (WWWTRACE & SHOW_ANCHOR_TRACE) #define PICS_TRACE (WWWTRACE & SHOW_PICS_TRACE)
#define PICS_TRACE (WWWTRACE & SHOW_PICS_TRACE) #define CORE_TRACE (WWWTRACE & SHOW_CORE_TRACE)
#define CORE_TRACE (WWWTRACE & SHOW_CORE_TRACE) #define MUX_TRACE (WWWTRACE & SHOW_MUX_TRACE)
#define MUX_TRACE (WWWTRACE & SHOW_MUX_TRACE) #define SQL_TRACE (WWWTRACE & SHOW_SQL_TRACE)
#define SQL_TRACE (WWWTRACE & SHOW_SQL_TRACE) #define XML_TRACE (WWWTRACE & SHOW_XML_TRACE)
#define XML_TRACE (WWWTRACE & SHOW_XML_TRACE) #define ALL_TRACE (WWWTRACE & SHOW_ALL_TRACE)
#define ALL_TRACE (WWWTRACE & SHOW_ALL_TRACE)
/*
/*
(
Destination for Trace Messages Destination for Trace Messages
)
You can send trace messages to various destinations depending on the typ You can send trace messages to various destinations depending on the type
e of your of your application. By default, on Unix the messages are sent to
application. By default, on Unix the messages are sent to stderr using f stderr using fprintf. If we are on MSWindows and
printf. If we have a windows applications then register a HTTraceCallback
are on MSWindows and have a windows applications then register a HTTrace function. This is done with HTTrace_setCallback. It tells
Callback HTTrace to call a HTTraceCallback. If
function. This is done with HTTrace_setCallback. It tells HTTrace to cal HTDEBUG is not defined then don't do any of the above.
l a */
HTTraceCallback. If HTDEBUG is not defined then don't do any of the abov
e.
*/
typedef int HTTraceCallback(const char * fmt, va_list pArgs); typedef int HTTraceCallback(const char * fmt, va_list pArgs);
extern void HTTrace_setCallback(HTTraceCallback * pCall); extern void HTTrace_setCallback(HTTraceCallback * pCall);
extern HTTraceCallback * HTTrace_getCallback(void); extern HTTraceCallback * HTTrace_getCallback(void);
/* /*
The HTTRACE macro uses "_" as parameter separater instead of ",". This e The HTTRACE macro uses "_" as parameter separater
nables us to instead of ",". This enables us to use a single macro instead
use a single macro instead of a macro for each number of arguments which of a macro for each number of arguments which we consider a more elegant
we consider a and flexible solution. The implication is, however, that we can't have vari
more elegant and flexible solution. The implication is, however, that we ables
can't have that start or end with an "_" if they are to be used in a trace
variables that start or end with an "_" if they are to be used in a trac message.
e message. */
*/
#ifdef HTDEBUG #ifdef HTDEBUG
#undef _
#define _ , #define _ ,
#define HTTRACE(TYPE, FMT) \ #define HTTRACE(TYPE, FMT) \
do { if (TYPE) HTTrace(FMT); } while (0); do { if (TYPE) HTTrace(FMT); } while (0);
extern int HTTrace(const char * fmt, ...); extern int HTTrace(const char * fmt, ...);
#else #else
#define HTTRACE(TYPE, FMT) /* empty */ #define HTTRACE(TYPE, FMT) /* empty */
#endif /* HTDEBUG */ #endif /* HTDEBUG */
/*
/*
(
Data Trace Logging Data Trace Logging
)
A similar mechanism exists for logging data, except that is adds a data A similar mechanism exists for logging data, except that is adds a data and
and length length argument to the trace call. Again, you can register your own callbac
argument to the trace call. Again, you can register your own callbacks i ks
f need be. if need be.
*/
*/
typedef int HTTraceDataCallback(char * data, size_t len, char * fmt, va_lis t pArgs); typedef int HTTraceDataCallback(char * data, size_t len, char * fmt, va_lis t pArgs);
extern void HTTraceData_setCallback(HTTraceDataCallback * pCall); extern void HTTraceData_setCallback(HTTraceDataCallback * pCall);
extern HTTraceDataCallback * HTTraceData_getCallback(void); extern HTTraceDataCallback * HTTraceData_getCallback(void);
/* /*
Again we use the same macro expansion mechanism as for HTTrace Again we use the same macro expansion mechanism as for HTTrace
*/
*/
#ifdef HTDEBUG #ifdef HTDEBUG
#define HTTRACEDATA(DATA, LEN, FMT) HTTraceData((DATA), (LEN), FMT) #define HTTRACEDATA(DATA, LEN, FMT) HTTraceData((DATA), (LEN), FMT)
extern int HTTraceData(char * data, size_t len, char * fmt, ...); extern int HTTraceData(char * data, size_t len, char * fmt, ...);
#else #else
#define HTTRACEDATA(DATA, LEN, FMT) /* empty */ #define HTTRACEDATA(DATA, LEN, FMT) /* empty */
#endif /* HTDEBUG */ #endif /* HTDEBUG */
/*
/*
(
Debug Breaks Debug Breaks
)
Call this function and the program halts. We use the same macro expansio Call this function and the program halts. We use the same macro expansion
n mechanism as mechanism as for HTTrace
for HTTrace */
*/
extern void HTDebugBreak(char * file, unsigned long line, const char * fmt, ...); extern void HTDebugBreak(char * file, unsigned long line, const char * fmt, ...);
#ifdef HTDEBUG #ifdef HTDEBUG
#define HTDEBUGBREAK(FMT) HTDebugBreak(__FILE__, __LINE__, FMT) #define HTDEBUGBREAK(FMT) HTDebugBreak(__FILE__, __LINE__, FMT)
#else #else
#define HTDEBUGBREAK(FMT) /* empty */ #define HTDEBUGBREAK(FMT) /* empty */
#endif /* HTDEBUG */ #endif /* HTDEBUG */
/* /*
.
Macros for Function Declarations
.
MACROS FOR FUNCTION DECLARATIONS These function prefixes are used by scripts and other tools and helps figur
ing
out which functions are exported and which are not. See also the
libwww style guide.
*/
These function prefixes are used by scripts and other tools and helps fi #define PUBLIC /* Accessible outside this module */
guring out #define PRIVATE static /* Accessible only within this module */
which functions are exported and which are not. See also the libwww styl
e guide.
*/
#define PUBLIC /* Accessible outside this module */
#define PRIVATE static /* Accessible only within this module */
/* /*
.
OFTEN USED INTERGER MACROS Often used Interger Macros
.
(
Min and Max functions Min and Max functions
)
*/
*/
#ifndef HTMIN #ifndef HTMIN
#define HTMIN(a,b) ((a) <= (b) ? (a) : (b)) #define HTMIN(a,b) ((a) <= (b) ? (a) : (b))
#define HTMAX(a,b) ((a) >= (b) ? (a) : (b)) #define HTMAX(a,b) ((a) >= (b) ? (a) : (b))
#endif #endif
/*
/*
(
Double abs function Double abs function
)
*/
*/
#ifndef HTDABS #ifndef HTDABS
#define HTDABS(a) ((a) < 0.0 ? (-(a)) : (a)) #define HTDABS(a) ((a) < 0.0 ? (-(a)) : (a))
#endif #endif
/* /*
RETURN CODES FOR PROTOCOL MODULES AND STREAMS .
Return Codes for Protocol Modules and Streams
.
Theese are the codes returned from the protocol modules, and the stream Theese are the codes returned from the protocol modules, and the stream mod
modules. ules.
Success are (>=0) and failure are (<0) Success are (>=0) and failure are (<0)
*/
*/ #define HT_OK 0 /* Generic success */
#define HT_OK 0 /* Generic success */ #define HT_ALL 1 /* Used by Net Manager */
#define HT_ALL 1 /* Used by Net Manager */
#define HT_CONTINUE 100 /* Continue an operation */ #define HT_CONTINUE 100 /* Continue an operation */
#define HT_UPGRADE 101 /* Switching protocols */ #define HT_UPGRADE 101 /* Switching protocols */
#define HT_LOADED 200 /* Everything's OK */ #define HT_LOADED 200 /* Everything's OK */
#define HT_CREATED 201 /* New object is created */ #define HT_CREATED 201 /* New object is created */
#define HT_ACCEPTED 202 /* Accepted */ #define HT_ACCEPTED 202 /* Accepted */
#define HT_NO_DATA 204 /* OK but no data was loaded */ #define HT_NO_DATA 204 /* OK but no data was loaded */
#define HT_RESET_CONTENT 205 /* Reset content */ #define HT_RESET_CONTENT 205 /* Reset content */
#define HT_PARTIAL_CONTENT 206 /* Partial Content */ #define HT_PARTIAL_CONTENT 206 /* Partial Content */
#define HT_MULTIPLE_CHOICES 300 /* Multiple choices */ #define HT_MULTIPLE_CHOICES 300 /* Multiple choices */
#define HT_PERM_REDIRECT 301 /* Permanent redirection */ #define HT_PERM_REDIRECT 301 /* Permanent redirection */
#define HT_FOUND 302 /* Found */ #define HT_FOUND 302 /* Found */
#define HT_SEE_OTHER 303 /* See other */ #define HT_SEE_OTHER 303 /* See other */
#define HT_NOT_MODIFIED 304 /* Not Modified */ #define HT_NOT_MODIFIED 304 /* Not Modified */
#define HT_USE_PROXY 305 /* Use Proxy */ #define HT_USE_PROXY 305 /* Use Proxy */
#define HT_PROXY_REDIRECT 306 /* Proxy Redirect */ #define HT_PROXY_REDIRECT 306 /* Proxy Redirect */
#define HT_TEMP_REDIRECT 307 /* Temporary redirect */ #define HT_TEMP_REDIRECT 307 /* Temporary redirect */
#define HT_IGNORE 900 /* Ignore this in the Net manager * #define HT_IGNORE 900 /* Ignore this in the Net manager */
/ #define HT_CLOSED 901 /* The socket was closed */
#define HT_CLOSED 901 /* The socket was closed */ #define HT_PENDING 902 /* Wait for connection */
#define HT_PENDING 902 /* Wait for connection */ #define HT_RELOAD 903 /* If we must reload the document */
#define HT_RELOAD 903 /* If we must reload the document *
/
#define HT_ERROR -1 /* Generic failure */ #define HT_ERROR -1 /* Generic failure */
#define HT_NO_ACCESS -401 /* Unauthorized */ #define HT_NO_ACCESS -401 /* Unauthorized */
#define HT_FORBIDDEN -403 /* Access forbidden */ #define HT_FORBIDDEN -403 /* Access forbidden */
#define HT_NOT_FOUND -404 /* Not found */ #define HT_NOT_FOUND -404 /* Not found */
#define HT_NOT_ACCEPTABLE -406 /* Not Acceptable */ #define HT_NOT_ACCEPTABLE -406 /* Not Acceptable */
#define HT_NO_PROXY_ACCESS -407 /* Proxy Authentication Failed */ #define HT_NO_PROXY_ACCESS -407 /* Proxy Authentication Failed */
#define HT_CONFLICT -409 /* Conflict */ #define HT_CONFLICT -409 /* Conflict */
#define HT_LENGTH_REQUIRED -411 /* Length required */ #define HT_LENGTH_REQUIRED -411 /* Length required */
#define HT_PRECONDITION_FAILED -412 /* Precondition failed */ #define HT_PRECONDITION_FAILED -412 /* Precondition failed */
#define HT_TOO_BIG -413 /* Request entity too large */ #define HT_TOO_BIG -413 /* Request entity too large */
#define HT_URI_TOO_BIG -414 /* Request-URI too long */ #define HT_URI_TOO_BIG -414 /* Request-URI too long */
#define HT_UNSUPPORTED -415 /* Unsupported */ #define HT_UNSUPPORTED -415 /* Unsupported */
#define HT_BAD_RANGE -416 /* Request Range not satisfiable */ #define HT_BAD_RANGE -416 /* Request Range not satisfiable */
#define HT_EXPECTATION_FAILED -417 /* Expectation Failed */ #define HT_EXPECTATION_FAILED -417 /* Expectation Failed */
#define HT_REAUTH -418 /* Reauthentication required */ #define HT_REAUTH -418 /* Reauthentication required */
#define HT_PROXY_REAUTH -419 /* Proxy Reauthentication required */ #define HT_PROXY_REAUTH -419 /* Proxy Reauthentication required */
#define HT_RETRY -503 /* If service isn't available */ #define HT_RETRY -503 /* If service isn't available */
#define HT_BAD_VERSION -505 /* Bad protocol version */ #define HT_BAD_VERSION -505 /* Bad protocol version */
#define HT_INTERNAL -900 /* Weird -- should never happen. */ #define HT_INTERNAL -900 /* Weird -- should never happen. */
#define HT_WOULD_BLOCK -901 /* If we are in a select */ #define HT_WOULD_BLOCK -901 /* If we are in a select */
#define HT_INTERRUPTED -902 /* Note the negative value! */ #define HT_INTERRUPTED -902 /* Note the negative value!
*/
#define HT_PAUSE -903 /* If we want to pause a stream */ #define HT_PAUSE -903 /* If we want to pause a stream */
#define HT_RECOVER_PIPE -904 /* Recover pipe line */ #define HT_RECOVER_PIPE -904 /* Recover pipe line */
#define HT_TIMEOUT -905 /* Connection timeout */ #define HT_TIMEOUT -905 /* Connection timeout */
#define HT_NO_HOST -906 /* Can't locate host */ #define HT_NO_HOST -906 /* Can't locate host */
/*
UPPER- AND LOWERCASE MACROS /*
.
Upper- and Lowercase macros
.
The problem here is that toupper(x) is not defined officially unless isu The problem here is that toupper(x) is not defined officially unless isuppe
pper(x) is. r(x)
These macros are CERTAINLY needed on #if defined(pyr) || define(mips) or is. These macros are CERTAINLY needed on #if defined(pyr) || define(mips)
BDSI or BDSI platforms. For safefy, we make them mandatory.
platforms. For safefy, we make them mandatory. */
*/
#ifndef TOLOWER #ifndef TOLOWER
#define TOLOWER(c) tolower((int) (c)) #define TOLOWER(c) tolower((int) (c))
#define TOUPPER(c) toupper((int) (c)) #define TOUPPER(c) toupper((int) (c))
#endif #endif
/*
MAX AND MIN VALUES FOR INTEGERS AND FLOATING POINT /*
.
Max and Min values for Integers and Floating Point
.
*/
*/ #ifdef FLT_EPSILON /* The ANSI C way define
#ifdef FLT_EPSILON /* The ANSI C way defin */
e */
#define HT_EPSILON FLT_EPSILON #define HT_EPSILON FLT_EPSILON
#else #else
#define HT_EPSILON 0.00000001 #define HT_EPSILON 0.00000001
#endif #endif
/*
THE LOCAL EQUIVALENTS OF CR AND LF /*
.
The local equivalents of CR and LF
.
We can check for these after net ascii text has been converted to the lo We can check for these after net ascii text has been converted to the local
cal representation. Similarly, we include them in strings to be sent as net asc
representation. Similarly, we include them in strings to be sent as net ii
ascii after after translation.
translation. */
*/
#define LF FROMASCII('\012') /* ASCII line feed LOCAL EQUIVALENT */ #define LF FROMASCII('\012') /* ASCII line feed LOCAL EQUIVALENT */
#define CR FROMASCII('\015') /* Will be converted to ^M for transmission */ #define CR FROMASCII('\015') /* Will be converted to ^M for transmission */
/*
LIBRARY DYNAMIC MEMORY MAGEMENT /*
.
Library Dynamic Memory Magement
.
The Library has it's own dynamic memory API which is declared in memory The Library has it's own dynamic memory API which is declared in
management memory management module.
module. */
*/
#include "HTMemory.h" #include "HTMemory.h"
/* /*
*/
*/
#endif /* HT_UTILS.h */ #endif /* HT_UTILS.h */
/*
___________________________________ /*
@(#) $Id: HTUtils.html,v 2.90 1999/02/22 22:10:1 2 frystyk Exp $ @(#) $Id: HTUtils.html,v 2.91 1999/04/04 00:10:14 frystyk Exp $
*/ */
 End of changes. 112 change blocks. 
206 lines changed or deleted 237 lines changed or added


 HTWWWStr.h   HTWWWStr.h 
skipping to change at line 68 skipping to change at line 68
This is the same as HTNextField but it does not look for '=' This is the same as HTNextField but it does not look for '='
as a separator so if there is a name-value pair then both parts are returne d. as a separator so if there is a name-value pair then both parts are returne d.
Returns a pointer to the first word or NULL on error Returns a pointer to the first word or NULL on error
*/ */
extern char * HTNextPair (char ** pstr); extern char * HTNextPair (char ** pstr);
/* /*
( (
Next Name-value Parameter
)
This is the same as HTNextPair but it does not look for ','
as a separator so if there is a name-value pair then both parts are returne
d.
Returns a pointer to the first word or NULL on error
*/
extern char * HTNextParam (char ** pstr);
/*
(
Next LWS Delimited Token Next LWS Delimited Token
) )
A simpler version of the above that only looks for linear white space as A simpler version of the above that only looks for linear white space as
the delimiter. the delimiter.
*/ */
extern char * HTNextLWSToken (char ** pstr); extern char * HTNextLWSToken (char ** pstr);
/* /*
skipping to change at line 253 skipping to change at line 265
extern char * HTLocalToWWW (const char * local, const char * access); extern char * HTLocalToWWW (const char * local, const char * access);
/* /*
*/ */
#endif #endif
/* /*
@(#) $Id: HTWWWStr.html,v 2.16 1999/02/13 18:33:49 frystyk Exp $ @(#) $Id: HTWWWStr.html,v 2.17 1999/03/24 16:26:57 frystyk Exp $
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 14 lines changed or added


 SGML.h   SGML.h 
skipping to change at line 110 skipping to change at line 110
extern char * HTTag_attributeName (HTTag * tag, int attribute_number); extern char * HTTag_attributeName (HTTag * tag, int attribute_number);
/* /*
. .
DTD Information DTD Information
. .
Not the whole DTD, but all this parser uses of it. Not the whole DTD, but all this parser uses of it.
*/ */
#define MAX_ATTRIBUTES 20 /* Max number of attributes per element */ #define MAX_ATTRIBUTES 32 /* Max number of attributes per element */
typedef struct { typedef struct {
HTTag * tags; /* Must be in strcmp order by name * / HTTag * tags; /* Must be in strcmp order by name * /
int number_of_tags; int number_of_tags;
const char ** entity_names; /* Must be in strcmp order by name * / const char ** entity_names; /* Must be in strcmp order by name * /
int number_of_entities; int number_of_entities;
} SGML_dtd; } SGML_dtd;
extern HTTag * SGML_findTag (SGML_dtd * dtd, int element_number); extern HTTag * SGML_findTag (SGML_dtd * dtd, int element_number);
extern char * SGML_findTagName (SGML_dtd * dtd, int element_number); extern char * SGML_findTagName (SGML_dtd * dtd, int element_number);
skipping to change at line 142 skipping to change at line 142
extern HTStream * SGML_new (const SGML_dtd * dtd, extern HTStream * SGML_new (const SGML_dtd * dtd,
HTStructured * target); HTStructured * target);
/* /*
*/ */
#endif /* SGML_H */ #endif /* SGML_H */
/* /*
@(#) $Id: SGML.html,v 2.29 1999/02/22 01:04:24 frystyk Exp $ @(#) $Id: SGML.html,v 2.30 1999/04/02 16:10:36 frystyk Exp $
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 WWWHTML.h   WWWHTML.h 
/* W3C Sample Code Library /*
libwww HTML PARSER
DECLARATION OF W3C SAMPLE CODE HTML MODULE W3C Sample Code Library libwww HTML
PARSER
!
Declaration of W3C Sample Code HTML MODULE
!
*/
*/
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH ** Please first read the full copyright statement in the file COPYRIGH.
.
*/ */
/* /*
This is the include file for the basic HTML module that can be used toge This is the include file for the basic HTML module that can be used togethe
ther with r
libwww. It contains all HTML specific modules which are required to comp with libwww. It contains all HTML specific modules which are required to
ile and use the compile and use the default libwww HTML parser
default libwww HTML parser */
*/
#ifndef WWWHTML_H #ifndef WWWHTML_H
#define WWWHTML_H #define WWWHTML_H
/* /*
*/
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*
SYSTEM DEPENDENCIES /*
.
System dependencies
.
The wwwsys.h file includes system-specific include files and flags for I The wwwsys.h file includes system-specific include
/O to network files and flags for I/O to network and disk. The only reason for this file
and disk. The only reason for this file is that the Internet world is mo is that the Internet world is more complicated than Posix and ANSI.
re complicated */
than Posix and ANSI.
*/
#include "wwwsys.h" #include "wwwsys.h"
/*
LIBRARY INCLUDES /*
.
Library Includes
.
*/
*/
#include "HTMLPDTD.h" #include "HTMLPDTD.h"
#include "SGML.h" #include "SGML.h"
#include "HTMLGen.h" #include "HTMLGen.h"
#include "HTTeXGen.h" #include "HTTeXGen.h"
#include "HTPlain.h" #include "HTPlain.h"
#include "HTML.h" #include "HTML.h"
#include "HText.h" #include "HText.h"
#include "HTHInit.h" #include "HTHInit.h"
#include "HTStyle.h" #include "HTStyle.h"
/* /*
End of HTML module End of HTML module
*/
*/
#ifdef __cplusplus #ifdef __cplusplus
} /* end extern C definitions */ } /* end extern C definitions */
#endif #endif
#endif #endif
/*
___________________________________ /*
@(#) $Id: WWWHTML.html,v 2.11 1999/02/22 23:29:4 5 frystyk Exp $ @(#) $Id: WWWHTML.html,v 2.11 1999/02/22 23:29:45 frystyk Exp $
*/ */
 End of changes. 23 change blocks. 
30 lines changed or deleted 37 lines changed or added


 WWWHTTP.h   WWWHTTP.h 
skipping to change at line 118 skipping to change at line 118
) )
Chunked transfer encoding and decoding is new in HTTP/1.1. It allows applic ations Chunked transfer encoding and decoding is new in HTTP/1.1. It allows applic ations
to use persistent connections while not knowing the content length a priori to use persistent connections while not knowing the content length a priori
to the response header is generated. to the response header is generated.
*/ */
#include "HTTChunk.h" #include "HTTChunk.h"
/* /*
( (
HTTP Extensions and PEP HTTP Extensions
) )
The PEP Manager is a registry for PEP Protocols The PEP Manager is a registry for PEP Protocols
that follow the generic syntax defined by the that follow the generic syntax defined by the
HTTP PEP protocol headers. All PEP HTTP PEP protocol headers. All PEP
Protocols are registered at run-time in form of a PEP Module. Protocols are registered at run-time in form of a PEP Module.
A PEP Module consists of the following: A PEP Module consists of the following:
*/ */
#include "HTPEP.h" #include "HTPEP.h"
skipping to change at line 157 skipping to change at line 157
Client Side Authentication Client Side Authentication
) )
Contains code for parsing challenges and creating credentials for basic and Contains code for parsing challenges and creating credentials for basic and
digest authentication schemes. See also the HTAAUtil digest authentication schemes. See also the HTAAUtil
module for how to handle other authentication schemes. module for how to handle other authentication schemes.
*/ */
#include "HTAABrow.h" #include "HTAABrow.h"
/* /*
(
HTTP Cookies
)
The cookie module provides a simple
HTTP Cookie
handling mechanism. It really also is an excersize in showing how libwww
can be extended with something like cookies in a modular manner. An importa
nt
thing to note about this implementation is that it does not provide
storage for cookies - this is left to the application as normally cookies
have to be kept under lock.
*/
#include "HTCookie.h"
/*
End of HTTP module End of HTTP module
*/ */
#ifdef __cplusplus #ifdef __cplusplus
} /* end extern C definitions */ } /* end extern C definitions */
#endif #endif
#endif #endif
/* /*
@(#) $Id: WWWHTTP.html,v 2.13 1998/05/04 19:37:51 frystyk Exp $ @(#) $Id: WWWHTTP.html,v 2.14 1999/03/24 16:28:16 frystyk Exp $
*/ */
 End of changes. 3 change blocks. 
2 lines changed or deleted 19 lines changed or added


 WWWInit.h   WWWInit.h 
skipping to change at line 25 skipping to change at line 25
/* /*
As mentioned in the Library Architecture, As mentioned in the Library Architecture,
libwww consists of a small core and a large set of hooks for adding 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 rel ated functionality. By itself, the core it not capable of performing any Web rel ated
tasks like accessing a HTTP server or parsing a HTML document. All this 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 functionality must be registered by the application. This way, the core of
libwww is kept application independent and can be used as the basic buildin g libwww is kept application independent and can be used as the basic buildin g
block for any kind of Web application. The Library comes with a large set 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, parsi ng of default functions, for example for accessing HTTP and FTP servers, parsi ng
RFC MIME headers etc. This module helps the application programmer setting up
822 headers etc. This module helps the application programmer setting all this functionality, but it is important to note that none of it is
up all this functionality, but it is important to note that none of it is required in order to use libwww.
required in order to use the Library.
*/ */
#ifndef WWWINIT_H #ifndef WWWINIT_H
#define WWWINIT_H #define WWWINIT_H
/* /*
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
. .
Application Profiles
.
Application profiles are initialization functions that are "preset" to init
ialize
the Library with the set of features often used in clients,
servers, robots, and proxy servers. They are basically
collections of the more detailed initialization functions that you can find
later in this interface description. In many cases you do not need to use
anything else than the profiles, but if you have more specific requirements
then you can always fall back on using the initialization functions below
or even werite your own extensions.
*/
#include "HTProfil.h"
/*
.
Default Protocols, Transports, MIME Headers, Dialogs etc. Default Protocols, Transports, MIME Headers, Dialogs etc.
. .
This module contains a large set of default initialization functions for This module contains a large set of default initialization functions for
protocol modules, stream converters, event managers etc. protocol modules, stream converters, event managers etc.
*/ */
#include "HTInit.h" #include "HTInit.h"
/* /*
. .
Default HTML Parsers Application Profiles
. .
This file contains the initialization for the HTML parsers in libwww. The Application profiles are initialization functions that are "preset" to init
parsers are used for presenting HTML objects as well as clear text document ialize
s. the Library with the set of features often used in clients,
servers, robots, and proxy servers. They are basically
collections of the more detailed initialization functions that you can find
later in this interface description. In many cases you do not need to use
anything else than the profiles, but if you have more specific requirements
then you can always fall back on using the initialization functions below
or even werite your own extensions.
*/ */
#include "HTHInit.h" #include "HTProfil.h"
/* /*
*/ */
#ifdef __cplusplus #ifdef __cplusplus
} /* end extern C definitions */ } /* end extern C definitions */
#endif #endif
#endif #endif
/* /*
@(#) $Id: WWWInit.html,v 2.10 1999/02/07 18:24:19 frystyk Exp $ @(#) $Id: WWWInit.html,v 2.11 1999/03/30 22:31:58 frystyk Exp $
*/ */
 End of changes. 7 change blocks. 
27 lines changed or deleted 16 lines changed or added


 WWWXML.h   WWWXML.h 
/* W3C Sample Code Library libwww XML Ex /*
pat Parser Wrapper
DECLARATION OF W3C SAMPLE CODE XML EXPAT PARSER MODULE W3C Sample Code Library libwww XML E
xpat Parser Wrapper
!
Declaration of W3C Sample Code XML Expat Parser Module
!
*/
*/
/* /*
** (c) COPYRIGHT MIT 1995. ** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH ** Please first read the full copyright statement in the file COPYRIGH.
.
*/ */
/* /*
We use James Clark's expat XML parser which is very neat indeed. As the We use James Clark's expat
code doesn't XML parser which is very neat indeed. As the code doesn't come as a separat
come as a separate library, I included it in the libwww CVS code base wh e
ere I compile library, I included it in the libwww CVS code base where I compile is as
is as two libraries: libxmltok.a and libxmlparse.a. See the external mod two libraries: libxmltok.a and libxmlparse.a. See
ules that the external modules that libwww works with for
libwww works with for details. Thanks so much to John Punin for writing details. Thanks so much to John Punin for writing this code!
this code! */
*/
#ifndef WWWXML_H #ifndef WWWXML_H
#define WWWXML_H #define WWWXML_H
/* /*
*/
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*
SYSTEM DEPENDENCIES /*
.
System dependencies
.
The wwwsys.h file includes system-specific include files and flags for I The wwwsys.h file includes system-specific include
/O to network files and flags for I/O to network and disk. The only reason for this file
and disk. The only reason for this file is that the Internet world is mo is that the Internet world is more complicated than Posix and ANSI.
re complicated */
than Posix and ANSI.
*/
#include "wwwsys.h" #include "wwwsys.h"
/*
LIBRARY INCLUDES /*
.
Library Includes
.
*/
*/
#ifdef HT_EXPAT #ifdef HT_EXPAT
#include "HTXML.h" #include "HTXML.h"
#endif #endif
/* /*
End of XML module End of XML module
*/
*/
#ifdef __cplusplus #ifdef __cplusplus
} /* end extern C definitions */ } /* end extern C definitions */
#endif #endif
#endif #endif
/*
___________________________________ /*
@(#) $Id: WWWXML.html,v 2.1 1999/02/22 23:26:3 0 frystyk Exp $ @(#) $Id: WWWXML.html,v 2.2 1999/04/01 19:37:11 frystyk Exp $
*/ */
 End of changes. 23 change blocks. 
33 lines changed or deleted 40 lines changed or added


 wwwconf.h   wwwconf.h 
skipping to change at line 81 skipping to change at line 81
/* Define if your processor stores words with the most significant /* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */ byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */ /* #undef WORDS_BIGENDIAN */
/* Define to enable direct WAIS access. */ /* Define to enable direct WAIS access. */
/* #undef HT_DIRECT_WAIS */ /* #undef HT_DIRECT_WAIS */
/* Define to enable mysql access. */ /* Define to enable mysql access. */
/* #undef HT_MYSQL */ /* #undef HT_MYSQL */
/* Define to enable MD5 for HTTP access authentication. */
#define HT_MD5 1
/* Define to enable expat XML parser. */ /* Define to enable expat XML parser. */
#define HT_EXPAT 1 #define HT_EXPAT 1
/* Define to enable Zlib compression / decompression support. */ /* Define to enable Zlib compression / decompression support. */
#define HT_ZLIB 1 #define HT_ZLIB 1
/* Define to enable POSIX RegEx support. */ /* Define to enable POSIX RegEx support. */
/* #undef HT_POSIX_REGEX */ /* #undef HT_POSIX_REGEX */
/* Define to enable support for enabling a rules file w/o user interaction. */ /* Define to enable support for enabling a rules file w/o user interaction. */
skipping to change at line 111 skipping to change at line 114
/* Define to use internal signal handler */ /* Define to use internal signal handler */
/* #undef WWWLIB_SIG */ /* #undef WWWLIB_SIG */
/* Define to build using reentrant system calls. */ /* Define to build using reentrant system calls. */
/* #undef HT_REENTRANT */ /* #undef HT_REENTRANT */
/* Define to be the package name. */ /* Define to be the package name. */
#define W3C_PACKAGE "w3c-libwww" #define W3C_PACKAGE "w3c-libwww"
/* Define to be the version. */ /* Define to be the version. */
#define W3C_VERSION "5.2.6" #define W3C_VERSION "5.2.8"
/* Define this to be the prefix for cache files. */ /* Define this to be the prefix for cache files. */
#define CACHE_FILE_PREFIX "/usr/wsrc/" #define CACHE_FILE_PREFIX "/usr/wsrc/"
/* Define this if we can select on stdin. */
#define TTY_IS_SELECTABLE 1
/* Define to disable Nagle's algorithm */ /* Define to disable Nagle's algorithm */
#define HT_NO_NAGLE 1 #define HT_NO_NAGLE 1
/* Define to disable HTTP/1.1 pipelining */ /* Define to disable HTTP/1.1 pipelining */
/* #undef HT_NO_PIPELINING */ /* #undef HT_NO_PIPELINING */
/* Define to disable HTTP/1.1 pipelining */ /* Define to disable HTTP/1.1 pipelining */
/* #undef HT_NO_PIPELINING */ /* #undef HT_NO_PIPELINING */
/* Define to enable MUX as HTTP transport */ /* Define to enable MUX as HTTP transport */
skipping to change at line 474 skipping to change at line 474
/* Define if you have the nsl library (-lnsl). */ /* Define if you have the nsl library (-lnsl). */
/* #undef HAVE_LIBNSL */ /* #undef HAVE_LIBNSL */
/* Define if you have the socket library (-lsocket). */ /* Define if you have the socket library (-lsocket). */
/* #undef HAVE_LIBSOCKET */ /* #undef HAVE_LIBSOCKET */
/* Name of package */ /* Name of package */
#define PACKAGE "w3c-libwww" #define PACKAGE "w3c-libwww"
/* Version number of package */ /* Version number of package */
#define VERSION "5.2.6" #define VERSION "5.2.8"
/* define if compiled symbols have a leading underscore */
/* #undef WITH_SYMBOL_UNDERSCORE */
/* Define this if you have the external variable 'socket_errno'. */ /* Define this if you have the external variable 'socket_errno'. */
/* #undef HAVE_SOCKET_ERRNO */ /* #undef HAVE_SOCKET_ERRNO */
/* Define this if you have the external variable 'sys_errlist'. */ /* Define this if you have the external variable 'sys_errlist'. */
/* #undef HAVE_SYS_ERRLIST */ /* #undef HAVE_SYS_ERRLIST */
/* Define this if you have the external variable 'sys_nerr'. */ /* Define this if you have the external variable 'sys_nerr'. */
/* #undef HAVE_SYS_NERR */ /* #undef HAVE_SYS_NERR */
 End of changes. 4 change blocks. 
8 lines changed or deleted 5 lines changed or added


 wwwsys.h   wwwsys.h 
skipping to change at line 1304 skipping to change at line 1304
The size of the hash tables used by the various libwww classes like the The size of the hash tables used by the various libwww classes like the
HTNet class, the HTHost HTNet class, the HTHost
class etc. is a speed-size compromize. Here you can set the sizes depending class etc. is a speed-size compromize. Here you can set the sizes depending
on whether you have a lot of memory or not. The values must be prime number s, on whether you have a lot of memory or not. The values must be prime number s,
of course. of course.
*/ */
#ifdef LIBWWW_SMALL #ifdef LIBWWW_SMALL
#define HT_XL_HASH_SIZE 101 #define HT_XL_HASH_SIZE 101
#define HT_L_HASH_SIZE 59 #define HT_L_HASH_SIZE 67
#define HT_M_HASH_SIZE 31 #define HT_M_HASH_SIZE 31
#define HT_S_HASH_SIZE 5 #define HT_S_HASH_SIZE 5
#else #else
#ifdef LIBWWW_LARGE
#define HT_XL_HASH_SIZE 1499
#define HT_L_HASH_SIZE 599
#define HT_M_HASH_SIZE 101
#define HT_S_HASH_SIZE 67
#else
#ifdef LIBWWW_EXTRA_LARGE
#define HT_XL_HASH_SIZE 9973
#define HT_L_HASH_SIZE 1499
#define HT_M_HASH_SIZE 599
#define HT_S_HASH_SIZE 101
#else
#define HT_XL_HASH_SIZE 599 #define HT_XL_HASH_SIZE 599
#define HT_L_HASH_SIZE 101 #define HT_L_HASH_SIZE 101
#define HT_M_HASH_SIZE 67 #define HT_M_HASH_SIZE 67
#define HT_S_HASH_SIZE 11 #define HT_S_HASH_SIZE 11
#endif #endif
#endif
#endif
/* /*
. .
Definition of NGROUPS Definition of NGROUPS
. .
*/ */
#ifdef GETGROUPS_T #ifdef GETGROUPS_T
#ifndef NGROUPS #ifndef NGROUPS
#ifdef NGROUPS_MAX #ifdef NGROUPS_MAX
skipping to change at line 1465 skipping to change at line 1479
typedef unsigned long ms_t; typedef unsigned long ms_t;
/* /*
*/ */
#endif #endif
/* /*
@(#) $Id: wwwsys.html,v 2.122 1999/02/07 18:20:31 frystyk Exp $ @(#) $Id: wwwsys.html,v 2.123 1999/03/14 02:22:04 frystyk Exp $
*/ */
 End of changes. 4 change blocks. 
2 lines changed or deleted 16 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/