diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1996-09-02 19:39:24 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1996-09-02 19:39:24 -0400 |
commit | e087f6d44e87f489fcb3056e86319ebba4218156 (patch) | |
tree | d045b58011bfbbf5186d34c4fed9e0dedb363275 /WWW/Library/Implementation/HTStream.h | |
download | lynx-snapshots-e087f6d44e87f489fcb3056e86319ebba4218156.tar.gz |
snapshot of project "lynx", label v2_6
Diffstat (limited to 'WWW/Library/Implementation/HTStream.h')
-rw-r--r-- | WWW/Library/Implementation/HTStream.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/WWW/Library/Implementation/HTStream.h b/WWW/Library/Implementation/HTStream.h new file mode 100644 index 00000000..72344cd3 --- /dev/null +++ b/WWW/Library/Implementation/HTStream.h @@ -0,0 +1,61 @@ +/* The Stream class definition -- libwww + STREAM OBJECT DEFINITION + + A Stream object is something which accepts a stream of text. + + The creation methods will vary on the type of Stream Object. All creation methods + return a pointer to the stream type below. + + As you can see, but the methods used to write to the stream and close it are pointed to + be the object itself. + + */ +#ifndef HTSTREAM_H +#define HTSTREAM_H + +#ifndef HTUTILS_H +#include "HTUtils.h" +#endif /* HTUTILS_H */ + +typedef struct _HTStream HTStream; + +/* + + These are the common methods of all streams. They should be self-explanatory, except + for end_document which must be called before free. It should be merged with free in + fact: it should be dummy for new streams. + + The put_block method was write, but this upset systems whiuch had macros for write(). + + */ +typedef struct _HTStreamClass { + + char* name; /* Just for diagnostics */ + + void (*_free) PARAMS(( + HTStream* me)); + + void (*_abort) PARAMS(( + HTStream* me, + HTError e)); + + void (*put_character) PARAMS(( + HTStream* me, + char ch)); + + void (*put_string) PARAMS(( + HTStream* me, + CONST char * str)); + + void (*put_block) PARAMS(( + HTStream* me, + CONST char * str, + int len)); + +}HTStreamClass; + +#endif /* HTSTREAM_H */ + +/* + + end of HTStream.h */ |