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.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);
+}