diff options
Diffstat (limited to 'camel/camel-stream.c')
-rw-r--r-- | camel/camel-stream.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/camel/camel-stream.c b/camel/camel-stream.c index bad7f6811c..a339b23e18 100644 --- a/camel/camel-stream.c +++ b/camel/camel-stream.c @@ -68,6 +68,7 @@ camel_stream_class_init (CamelStreamClass *camel_stream_class) camel_stream_class->available = NULL; camel_stream_class->eos = NULL; camel_stream_class->close = default_camel_close; + camel_stream_class->close = NULL; /* virtual method overload */ @@ -158,7 +159,7 @@ camel_stream_flush (CamelStream *stream) * camel_stream_available: * @stream: a CamelStream object * - * Return value: the number of bytes available. + * Return value: %TRUE if some data is available for reading, %FALSE otherwise **/ gboolean camel_stream_available (CamelStream *stream) @@ -197,6 +198,25 @@ camel_stream_close (CamelStream *stream) +/** + * camel_stream_reset: reset a stream + * @stream: the stream object + * + * Reset a stream, that is put it in a state + * where it can be read from the begining. + * All streams in camel are not seekable, + * but they must all be resettable. + * + **/ +void +camel_stream_reset (CamelStream *stream) +{ + CS_CLASS (stream)->reset (stream); +} + + + + /***************** Utility functions ********************/ /** |