aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-mem.c
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-01-25 09:09:56 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-01-25 09:09:56 +0800
commit50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c (patch)
tree591b540959a558b6c908e7bcc671c0906e42a2a6 /camel/camel-stream-mem.c
parent7dded29a632d26b8ed2c279004dd5fe39014de27 (diff)
downloadgsoc2013-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-mem.c')
-rw-r--r--camel/camel-stream-mem.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
index df69fc0448..6dd1b804cf 100644
--- a/camel/camel-stream-mem.c
+++ b/camel/camel-stream-mem.c
@@ -36,7 +36,7 @@ static CamelStreamClass *parent_class=NULL;
/* Returns the class for a CamelStreamMEM */
-#define CS_CLASS(so) CAMEL_STREAM_MEM_CLASS (GTK_OBJECT(so)->klass)
+#define CSM_CLASS(so) CAMEL_STREAM_MEM_CLASS (GTK_OBJECT(so)->klass)
static gint _read (CamelStream *stream, gchar *buffer, gint n);
static gint _write (CamelStream *stream, const gchar *buffer, gint n);
@@ -44,13 +44,14 @@ 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
camel_stream_mem_class_init (CamelStreamMemClass *camel_stream_mem_class)
{
+ CamelSeekableStreamClass *camel_seekable_stream_class = CAMEL_SEEKABLE_STREAM_CLASS (camel_stream_mem_class);
CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_mem_class);
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_stream_mem_class);
@@ -65,7 +66,8 @@ camel_stream_mem_class_init (CamelStreamMemClass *camel_stream_mem_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;
@@ -96,7 +98,7 @@ camel_stream_mem_get_type (void)
(GtkClassInitFunc) NULL,
};
- camel_stream_mem_type = gtk_type_unique (camel_stream_get_type (), &camel_stream_mem_info);
+ camel_stream_mem_type = gtk_type_unique (camel_seekable_stream_get_type (), &camel_stream_mem_info);
}
return camel_stream_mem_type;
@@ -258,7 +260,7 @@ _close (CamelStream *stream)
static gint
-_seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy)
+_seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy)
{
gint position;
CamelStreamMem *camel_stream_mem = CAMEL_STREAM_MEM (stream);