From 1c1106598f9162efbbc6df7622c93b02940a4743 Mon Sep 17 00:00:00 2001 From: bertrand Date: Sun, 30 May 1999 21:56:11 +0000 Subject: use new stream code instead of raw file * stuff. 1999-05-31 bertrand * 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 --- camel/camel-stream.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'camel/camel-stream.h') diff --git a/camel/camel-stream.h b/camel/camel-stream.h index e58cfd92ff..925d5583a0 100644 --- a/camel/camel-stream.h +++ b/camel/camel-stream.h @@ -34,8 +34,8 @@ extern "C" { #include #define CAMEL_STREAM_TYPE (camel_stream_get_type ()) -#define CAMEL_STREAM(obj) (GTK_CHECK_CAST((obj), CAMEL_STREAM_TYPE, CamelMimeMessage)) -#define CAMEL_STREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelMimeMessageClass)) +#define CAMEL_STREAM(obj) (GTK_CHECK_CAST((obj), CAMEL_STREAM_TYPE, CamelStream)) +#define CAMEL_STREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelStreamClass)) #define IS_CAMEL_STREAM(o) (GTK_CHECK_TYPE((o), CAMEL_STREAM_TYPE)) @@ -52,7 +52,7 @@ typedef struct { GtkObjectClass parent_class; /* Virtual methods */ -gint (*read) (CamelStream *stream, gchar **buffer, gint n); +gint (*read) (CamelStream *stream, gchar *buffer, gint n); gint (*write) (CamelStream *stream, gchar *buffer, gint n); void (*flush) (CamelStream *stream); gint (*available) (CamelStream *stream); @@ -68,6 +68,9 @@ GtkType camel_stream_get_type (void); /* public methods */ +gint camel_stream_read (CamelStream *stream, gchar *buffer, gint n); +gint camel_stream_write (CamelStream *stream, gchar *buffer, gint n); +void camel_stream_close (CamelStream *stream); #ifdef __cplusplus } -- cgit v1.2.3