aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@inria.fr>1999-05-31 05:56:11 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-31 05:56:11 +0800
commit1c1106598f9162efbbc6df7622c93b02940a4743 (patch)
tree16eb3c8ca5c509446fd983032c5df66f64a4b178 /camel/camel-stream.c
parentb3cdb41a122e797572b834fac6d5e11ddd579d5e (diff)
downloadgsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.tar
gsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.tar.gz
gsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.tar.bz2
gsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.tar.lz
gsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.tar.xz
gsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.tar.zst
gsoc2013-evolution-1c1106598f9162efbbc6df7622c93b02940a4743.zip
use new stream code instead of raw file * stuff.
1999-05-31 bertrand <Bertrand.Guiheneuf@inria.fr> * tests/test2.c (main): use new stream code instead of raw file * stuff. * camel/gmime-utils.c (get_header_table_from_stream): new func. Will replace get_header_table_from_file and will be used to parse headers from files as well as from memory buffers. * camel/camel-stream-fs.c: CamelStream Subclass. File system based stream. svn path=/trunk/; revision=961
Diffstat (limited to 'camel/camel-stream.c')
-rw-r--r--camel/camel-stream.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index 9af57c5485..c993556fa0 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -30,7 +30,7 @@ static CamelStreamClass *parent_class=NULL;
/* Returns the class for a CamelMimeMessage */
#define CS_CLASS(so) CAMEL_STREAM_CLASS (GTK_OBJECT(so)->klass)
-static gint _read (CamelStream *stream, gchar **buffer, gint n);
+static gint _read (CamelStream *stream, gchar *buffer, gint n);
static gint _write (CamelStream *stream, gchar *buffer, gint n);
static void _flush (CamelStream *stream);
static gint _available (CamelStream *stream);
@@ -66,7 +66,7 @@ camel_stream_get_type (void)
if (!camel_stream_type) {
GtkTypeInfo camel_stream_info =
{
- "CamelMimeMessage",
+ "CamelStream",
sizeof (CamelStream),
sizeof (CamelStreamClass),
(GtkClassInitFunc) camel_stream_class_init,
@@ -95,11 +95,16 @@ camel_stream_get_type (void)
* Return value: number of bytes actually read.
**/
static gint
-_read (CamelStream *stream, gchar **buffer, gint n)
+_read (CamelStream *stream, gchar *buffer, gint n)
{
}
+gint
+camel_stream_read (CamelStream *stream, gchar *buffer, gint n)
+{
+ CS_CLASS (stream)->read (stream, buffer, n);
+}
/**
* _write: read bytes to a stream
@@ -118,6 +123,12 @@ _write (CamelStream *stream, gchar *buffer, gint n)
}
+gint
+camel_stream_write (CamelStream *stream, gchar *buffer, gint n)
+{
+ CS_CLASS (stream)->write (stream, buffer, n);
+}
+
/**
@@ -175,3 +186,9 @@ _close (CamelStream *stream)
{
}
+
+void
+camel_stream_close (CamelStream *stream)
+{
+ CS_CLASS (stream)->close (stream);
+}