diff options
author | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-02 05:36:42 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-02 05:36:42 +0800 |
commit | c54abe884b175add134cc07e8fda31ffa65cac26 (patch) | |
tree | de32af6f25286f1a337d69dc20c7979b841788c5 /camel/camel-stream.h | |
parent | 2c543492092832d71f1f677d52a42043c8787be7 (diff) | |
download | gsoc2013-evolution-c54abe884b175add134cc07e8fda31ffa65cac26.tar.gz gsoc2013-evolution-c54abe884b175add134cc07e8fda31ffa65cac26.tar.zst gsoc2013-evolution-c54abe884b175add134cc07e8fda31ffa65cac26.zip |
new memory buffer based stream.
* camel/camel-stream-mem.c:
* camel/camel-stream-mem.h:
new memory buffer based stream.
* camel/camel-stream-fs.c (_seek):
implementation for file system based stream.
* camel/camel-stream.c (camel_stream_seek):
new method.
* camel/camel-stream-fs.c (camel_stream_fs_class_init):
pass CamelStreamFsClass instead of CamelStreamClass.
svn path=/trunk/; revision=1056
Diffstat (limited to 'camel/camel-stream.h')
-rw-r--r-- | camel/camel-stream.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/camel/camel-stream.h b/camel/camel-stream.h index 9818e492fb..4b4ea50b5b 100644 --- a/camel/camel-stream.h +++ b/camel/camel-stream.h @@ -38,7 +38,12 @@ extern "C" { #define CAMEL_STREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelStreamClass)) #define IS_CAMEL_STREAM(o) (GTK_CHECK_TYPE((o), CAMEL_STREAM_TYPE)) - +typedef enum +{ + CAMEL_STREAM_SET, + CAMEL_STREAM_CUR, + CAMEL_STREAM_END +} CamelStreamSeekPolicy; typedef struct { @@ -58,6 +63,7 @@ typedef struct { gint (*available) (CamelStream *stream); gboolean (*eos) (CamelStream *stream); void (*close) (CamelStream *stream); + gint (*seek) (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy); } CamelStreamClass; @@ -73,6 +79,7 @@ void camel_stream_flush (CamelStream *stream); gint camel_stream_available (CamelStream *stream); gboolean camel_stream_eos (CamelStream *stream); void camel_stream_close (CamelStream *stream); +gint camel_stream_seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy); /* utility macros and funcs */ #define camel_stream_write_string(stream, string) camel_stream_write ((stream), (string), strlen (string)) |