diff options
author | bertrand <bertrand@helixcode.com> | 2000-01-25 09:09:56 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-01-25 09:09:56 +0800 |
commit | 50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c (patch) | |
tree | 591b540959a558b6c908e7bcc671c0906e42a2a6 /camel/camel-stream-fs.c | |
parent | 7dded29a632d26b8ed2c279004dd5fe39014de27 (diff) | |
download | gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.tar gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.tar.gz gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.tar.bz2 gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.tar.lz gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.tar.xz gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.tar.zst gsoc2013-evolution-50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c.zip |
parent class is now CamelSeekableStream idem idem idem idem (_seek):
2000-01-24 bertrand <bertrand@helixcode.com>
* camel/camel-seekable-stream.c:
* camel/camel-seekable-stream.h:
* camel/camel-simple-data-wrapper-stream.h: parent class is now
CamelSeekableStream
* camel/camel-stream-buffered-fs.h: idem
* camel/camel-stream-buffered-fs.c: idem
* camel/camel-stream-mem.h: idem
* camel/camel-stream-mem.c: idem
(_seek): change declaration
* camel/camel-stream-fs.c: parent class is now
CamelSeekableStream
(_seek): change declaration
* camel/camel-stream-fs.h: parent class is now
CamelSeekableStream
Major compatible change in the stream hierarchy.
Removed the seek method from the general streams
so that we can use them as "DataSources".
svn path=/trunk/; revision=1622
Diffstat (limited to 'camel/camel-stream-fs.c')
-rw-r--r-- | camel/camel-stream-fs.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c index 905582aae2..acff58738f 100644 --- a/camel/camel-stream-fs.c +++ b/camel/camel-stream-fs.c @@ -34,7 +34,7 @@ #include <string.h> #include "camel-log.h" -static CamelStreamClass *parent_class=NULL; +static CamelSeekableStreamClass *parent_class=NULL; /* Returns the class for a CamelStreamFS */ @@ -46,7 +46,7 @@ static void _flush (CamelStream *stream); static gint _available (CamelStream *stream); static gboolean _eos (CamelStream *stream); static void _close (CamelStream *stream); -static gint _seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy); +static gint _seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy); static void _finalize (GtkObject *object); static void _destroy (GtkObject *object); @@ -60,6 +60,7 @@ static void _init_with_name_and_bounds (CamelStreamFs *stream_fs, const gchar *n static void camel_stream_fs_class_init (CamelStreamFsClass *camel_stream_fs_class) { + CamelSeekableStreamClass *camel_seekable_stream_class = CAMEL_SEEKABLE_STREAM_CLASS (camel_stream_fs_class); CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_fs_class); GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_stream_fs_class); @@ -78,7 +79,8 @@ camel_stream_fs_class_init (CamelStreamFsClass *camel_stream_fs_class) camel_stream_class->available = _available; camel_stream_class->eos = _eos; camel_stream_class->close = _close; - camel_stream_class->seek = _seek; + + camel_seekable_stream_class->seek = _seek; gtk_object_class->finalize = _finalize; gtk_object_class->destroy = _destroy; @@ -112,7 +114,7 @@ camel_stream_fs_get_type (void) (GtkClassInitFunc) NULL, }; - camel_stream_fs_type = gtk_type_unique (camel_stream_get_type (), &camel_stream_fs_info); + camel_stream_fs_type = gtk_type_unique (camel_seekable_stream_get_type (), &camel_stream_fs_info); } return camel_stream_fs_type; @@ -375,7 +377,7 @@ _write (CamelStream *stream, const gchar *buffer, gint n) CAMEL_LOG_FULL_DEBUG ( "CamelStreamFs:: entering write. n=%d\n", n); if (stream_fs->sup_bound != -1) - nb_to_write = MIN (stream_fs->sup_bound - stream_fs->cur_pos, n);; + nb_to_write = MIN (stream_fs->sup_bound - stream_fs->cur_pos, n); else nb_to_write = n; @@ -459,7 +461,7 @@ _close (CamelStream *stream) static gint -_seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy) +_seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy) { int whence; gint return_position; |