ncsa-mosaic/libwww2/HTStream.h

57 lines
1.5 KiB
C
Raw Permalink Normal View History

2010-03-08 04:55:21 -06:00
/* The Stream class definition -- libwww
STREAM OBJECT DEFINITION
2010-03-08 04:55:21 -06:00
A Stream object is something which accepts a stream of text.
2010-03-08 04:55:21 -06:00
The creation methods will vary on the type of Stream Object, but
the methods used to write to it and close it are common.
2010-03-08 04:55:21 -06:00
*/
#ifndef HTSTREAM_H
#define HTSTREAM_H
#include "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.
2010-03-08 04:55:21 -06:00
The put_block method was write, but this upset systems whiuch had
macros for write().
2010-03-08 04:55:21 -06:00
*/
typedef struct _HTStreamClass {
char* name; /* Just for diagnostics */
2010-03-08 04:55:21 -06:00
void (*free) PARAMS((
HTStream* me));
void (*end_document) PARAMS((
HTStream* me));
2010-03-08 04:55:21 -06:00
void (*put_character) PARAMS((
HTStream* me,
char ch));
2010-03-08 04:55:21 -06:00
void (*put_string) PARAMS((
HTStream* me,
char * str));
2010-03-08 04:55:21 -06:00
void (*put_block) PARAMS((
HTStream* me,
char * str,
int len));
2010-03-08 04:55:21 -06:00
void (*handle_interrupt) PARAMS((
HTStream* me));
2010-03-08 04:55:21 -06:00
}HTStreamClass;
#endif /* HTSTREAM_H */