aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream.c')
-rw-r--r--camel/camel-stream.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index c66a950b26..b63a64ddb7 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -42,6 +42,12 @@ default_camel_close (CamelStream *stream)
/* nothing */
}
+static gint
+default_camel_seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy)
+{
+ /* nothing */
+}
+
static void
camel_stream_class_init (CamelStreamClass *camel_stream_class)
{
@@ -55,6 +61,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->seek = default_camel_seek;
/* virtual method overload */
}
@@ -169,6 +176,26 @@ camel_stream_close (CamelStream *stream)
CS_CLASS (stream)->close (stream);
}
+
+/**
+ * camel_stream_seek:
+ * @stream: a CamelStream object.
+ * @offset: offset value
+ * @policy: what to do with the offset
+ *
+ *
+ *
+ * Return value: new position, -1 if operation failed.
+ **/
+gint
+camel_stream_seek (CamelStream *stream, gint offset, CamelStreamSeekPolicy policy)
+{
+ return CS_CLASS (stream)->seek (stream, offset, policy);
+}
+
+
+
+
/***************** Utility functions ********************/
/**