GMime Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
typedef enum { GMIME_STREAM_SEEK_SET = SEEK_SET, GMIME_STREAM_SEEK_CUR = SEEK_CUR, GMIME_STREAM_SEEK_END = SEEK_END, } GMimeSeekWhence; |
struct GMimeStream { GObject parent_object; /* Note: these are private fields!! */ GMimeStream *super_stream; off_t position; off_t bound_start; off_t bound_end; }; |
void g_mime_stream_construct (GMimeStream *stream, off_t start, off_t end); |
Initializes a new stream with bounds start and end.
ssize_t g_mime_stream_read (GMimeStream *stream, char *buf, size_t len); |
Attempts to read up to len bytes from stream into buf.
ssize_t g_mime_stream_write (GMimeStream *stream, char *buf, size_t len); |
Attempts to write up to len bytes of buf to stream.
off_t g_mime_stream_seek (GMimeStream *stream, off_t offset, GMimeSeekWhence whence); |
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.
off_t g_mime_stream_tell (GMimeStream *stream); |
Gets the current offset within the stream.
gboolean g_mime_stream_eos (GMimeStream *stream); |
Tests the end-of-stream indicator for stream.
ssize_t g_mime_stream_length (GMimeStream *stream); |
Gets the length of the stream.
GMimeStream* g_mime_stream_substream (GMimeStream *stream, off_t start, off_t end); |
Creates a new substream of stream with bounds start and end.
void g_mime_stream_set_bounds (GMimeStream *stream, off_t start, off_t end); |
Set the bounds on a stream.
ssize_t g_mime_stream_write_string (GMimeStream *stream, const char *string); |
Writes string to stream.
ssize_t g_mime_stream_printf (GMimeStream *stream, const char *fmt, ...); |
Write formatted output to a stream.
ssize_t g_mime_stream_write_to_stream (GMimeStream *src, GMimeStream *dest); |
Attempts to write stream src to stream dest.
ssize_t g_mime_stream_writev (GMimeStream *stream, GMimeStreamIOVector *vector, size_t count); |
Writes at most count blocks described by vector to stream.