diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2010-05-03 00:45:10 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2010-05-03 00:45:10 -0400 |
commit | 903885454167e86ce4cb967f901cbaf741f21501 (patch) | |
tree | 90a46f9f1e6c6194c8f43bbb4aa81e1e50e7e2fe /WWW/Library/Implementation/HTStream.h | |
parent | dc748b1c47baadafae2c90f0e188927b11b7e029 (diff) | |
download | lynx-snapshots-903885454167e86ce4cb967f901cbaf741f21501.tar.gz |
snapshot of project "lynx", label v2-8-8dev_3c
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..7a6d79ff --- /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 + +#ifdef __cplusplus +extern "C" { +#endif + typedef struct _HTStream HTStream; + +/* + + These are the common methods of all streams. They should be + self-explanatory. + + */ + typedef struct _HTStreamClass { + + const char *name; /* Just for diagnostics */ + + void (*_free) (HTStream *me); + + void (*_abort) (HTStream *me, HTError e); + + void (*put_character) (HTStream *me, char ch); + + void (*put_string) (HTStream *me, const char *str); + + void (*put_block) (HTStream *me, const char *str, int len); + + } HTStreamClass; + +/* + + Generic Error Stream + + The Error stream simply signals an error on all output methods. + This can be used to stop a stream as soon as data arrives, for + example from the network. + + */ + extern HTStream *HTErrorStream(void); + +#ifdef __cplusplus +} +#endif +#endif /* HTSTREAM_H */ |