aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-seekable-stream.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>2000-02-15 06:03:58 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-02-15 06:03:58 +0800
commitfe058b1be72112298e356343f3a8b35fd60a072b (patch)
tree0e2fe60abb27fa6070dc20f1e427b002c6db6f5a /camel/camel-seekable-stream.c
parentd8efd64ed0bc53ad0a74115c1d14a700b3874013 (diff)
downloadgsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.tar
gsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.tar.gz
gsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.tar.bz2
gsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.tar.lz
gsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.tar.xz
gsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.tar.zst
gsoc2013-evolution-fe058b1be72112298e356343f3a8b35fd60a072b.zip
make a blocking version of the header parser. When the fs stream uses
2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org> * camel/gmime-utils.c (get_header_array_from_stream): make a blocking version of the header parser. When the fs stream uses gnome-vfs, this should be changed. (gmime_read_line_from_stream): ditto. 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-stream-fs.c: everywhere, when using the cur_pos field, do it on the CamelSeekableStream object. (_seek): small fix. * camel/camel-seekable-stream.c (camel_seekable_stream_seek): s/camel_stream_seek/camel_seekable_stream_seek/g * camel/camel-seekable-stream.h: (struct ): added a field to store the current position. * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): New function. Allows to get the current position of a seekable stream. In fact much more changes, but I am lazy. This is the begining of some major changes in camel. svn path=/trunk/; revision=1778
Diffstat (limited to 'camel/camel-seekable-stream.c')
-rw-r--r--camel/camel-seekable-stream.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/camel/camel-seekable-stream.c b/camel/camel-seekable-stream.c
index 00cca3e369..55bbbd611a 100644
--- a/camel/camel-seekable-stream.c
+++ b/camel/camel-seekable-stream.c
@@ -78,17 +78,15 @@ camel_seekable_stream_get_type (void)
static gint
-_seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy)
+_seek (CamelSeekableStream *stream,
+ gint offset,
+ CamelStreamSeekPolicy policy)
{
return -1;
}
-
-
-
-
/**
* camel_stream_seek:
* @stream: a CamelStream object.
@@ -100,7 +98,9 @@ _seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy)
* Return value: new position, -1 if operation failed.
**/
gint
-camel_stream_seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy)
+camel_seekable_stream_seek (CamelSeekableStream *stream,
+ gint offset,
+ CamelStreamSeekPolicy policy)
{
return CSS_CLASS (stream)->seek (stream, offset, policy);
}
@@ -108,5 +108,25 @@ camel_stream_seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPoli
+/**
+ * camel_seekable_stream_get_current_position: get the position of a stream
+ * @stream: seekable stream object
+ *
+ * Get the current position of a seekable stream.
+ *
+ * Return value: the position.
+ **/
+guint32
+camel_seekable_stream_get_current_position (CamelSeekableStream *stream)
+{
+ return stream->cur_pos;
+}
+
+
+
+
+
+
+