| GMime Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
struct GMimeStream {
/* Note: these are private fields!! */
GMimeStream *super_stream;
unsigned int type;
int refcount;
off_t position;
off_t bound_start;
off_t bound_end;
void (*destroy) (GMimeStream *stream);
ssize_t (*read) (GMimeStream *stream, char *buf, size_t len);
ssize_t (*write) (GMimeStream *stream, char *buf, size_t len);
int (*flush) (GMimeStream *stream);
int (*close) (GMimeStream *stream);
gboolean (*eos) (GMimeStream *stream);
int (*reset) (GMimeStream *stream);
off_t (*seek) (GMimeStream *stream, off_t offset, GMimeSeekWhence whence);
off_t (*tell) (GMimeStream *stream);
ssize_t (*length) (GMimeStream *stream);
GMimeStream *(*substream) (GMimeStream *stream, off_t start, off_t end);
}; |
typedef enum {
GMIME_STREAM_SEEK_SET = SEEK_SET,
GMIME_STREAM_SEEK_CUR = SEEK_CUR,
GMIME_STREAM_SEEK_END = SEEK_END,
} GMimeSeekWhence; |
void g_mime_stream_construct (GMimeStream *stream, GMimeStream *stream_template, unsigned int type, |
Initializes a new stream of type type, using the virtual methods from stream_template, with bounds start and end.
|
Attempts to read up to len bytes from stream into buf.
|
Attempts to write up to len bytes of buf to stream.
|
Repositions the offset of the stream stream to the argument offset according to the directive whence as follows:
GMIME_STREAM_SEEK_SET: The offset is set to offset bytes.
GMIME_STREAM_SEEK_CUR: The offset is set to its current location plus offset bytes.
GMIME_STREAM_SEEK_END: The offset is set to the size of the stream plus offset bytes.
|
Gets the current offset within the stream.
|
Tests the end-of-stream indicator for stream.
|
Gets the length of the stream.
GMimeStream* g_mime_stream_substream (GMimeStream *stream, |
Creates a new substream of stream with bounds start and end.
void g_mime_stream_set_bounds (GMimeStream *stream, |
Set the bounds on a stream.
|
Writes string to stream.
|
Write formatted output to a stream.
|
Attempts to write stream src to stream dest.
|
Writes at most count blocks described by vector to stream.