summaryrefslogtreecommitdiffstats
path: root/WWW/Library/Implementation/HTStream.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 17:56:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 17:56:50 +0000
commit8e9f8f2d0dcdddec35091ddbbdc79650763ec922 (patch)
tree4f88ed317d44fb4e5d9ab77e565bf1d910a8f560 /WWW/Library/Implementation/HTStream.h
parentInitial commit. (diff)
downloadlynx-8e9f8f2d0dcdddec35091ddbbdc79650763ec922.tar.xz
lynx-8e9f8f2d0dcdddec35091ddbbdc79650763ec922.zip
Adding upstream version 2.9.0dev.6.upstream/2.9.0dev.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'WWW/Library/Implementation/HTStream.h')
-rw-r--r--WWW/Library/Implementation/HTStream.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/WWW/Library/Implementation/HTStream.h b/WWW/Library/Implementation/HTStream.h
new file mode 100644
index 0000000..a753266
--- /dev/null
+++ b/WWW/Library/Implementation/HTStream.h
@@ -0,0 +1,69 @@
+/*
+ * $LynxId: HTStream.h,v 1.16 2011/06/11 12:08:40 tom Exp $
+ *
+ * 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, int ch);
+
+ void (*put_string) (HTStream *me, const char *str);
+
+ void (*put_block) (HTStream *me, const char *str, int len);
+
+ } HTStreamClass;
+
+#ifndef HTSTREAM_INTERNAL
+ struct _HTStream {
+ HTStreamClass *isa;
+ };
+#endif
+/*
+
+ 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 */