diff options
author | bertrand <Bertrand.Guiheneuf@aful.org> | 2000-02-17 23:19:04 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-02-17 23:19:04 +0800 |
commit | b39cda14b7678b925a6e3e645b60fb9858fdfaf6 (patch) | |
tree | dec02fd77a7f312b4cd4ea8d63abb90fdfa4cd14 /camel/camel-mime-part.c | |
parent | cf16aa4fb112337616d20f4f2f9c2512cbe5e82f (diff) | |
download | gsoc2013-evolution-b39cda14b7678b925a6e3e645b60fb9858fdfaf6.tar.gz gsoc2013-evolution-b39cda14b7678b925a6e3e645b60fb9858fdfaf6.tar.zst gsoc2013-evolution-b39cda14b7678b925a6e3e645b60fb9858fdfaf6.zip |
revamped so that it uses the output stream of the data wrapper
2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-formatter.c (handle_text_plain):
revamped so that it uses the output stream
of the data wrapper
(handle_text_html): ditto.
* camel/camel-simple-data-wrapper.h:
* camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
use (void) instead of ().
(_get_output_stream): simple implementation.
A lot of small fixes so that the new parser scheme
works properly. Simple implementation of the stream
though.
Changed vette-formatter files so that they work with the
new scheme.
The new parser is now in a usable state. Still needs some work but the
infrastructure is here. /me is happy.
svn path=/trunk/; revision=1822
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 2e52f8312f..082f62fab0 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -63,6 +63,7 @@ static CamelMediumClass *parent_class=NULL; /* Returns the class for a CamelMimePart */ #define CMP_CLASS(so) CAMEL_MIME_PART_CLASS (GTK_OBJECT(so)->klass) +#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (GTK_OBJECT(so)->klass) /* from GtkObject */ static void _finalize (GtkObject *object); @@ -74,6 +75,7 @@ static void _construct_from_stream (CamelDataWrapper *data_wra CamelStream *stream); static void _set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); +static CamelStream * _get_output_stream (CamelDataWrapper *data_wrapper); /* from CamelMedia */ @@ -178,6 +180,7 @@ camel_mime_part_class_init (CamelMimePartClass *camel_mime_part_class) camel_data_wrapper_class->write_to_stream = _write_to_stream; camel_data_wrapper_class->construct_from_stream = _construct_from_stream; camel_data_wrapper_class->set_input_stream = _set_input_stream; + camel_data_wrapper_class->get_output_stream = _get_output_stream; gtk_object_class->finalize = _finalize; } @@ -823,6 +826,10 @@ _set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) g_assert (CAMEL_IS_SEEKABLE_STREAM (stream)); seekable_stream = CAMEL_SEEKABLE_STREAM (stream); + /* call parent class implementation */ + CAMEL_DATA_WRAPPER_CLASS (parent_class)->set_input_stream (data_wrapper, stream); + + camel_mime_part_construct_headers_from_stream (mime_part, stream); /* set the input stream for the content object */ @@ -831,11 +838,24 @@ _set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) camel_seekable_substream_new_with_seekable_stream_and_bounds (seekable_stream, content_stream_inf_bound, -1); + + CAMEL_LOG_FULL_DEBUG ("CamelMimePart::set_input_stream leaving\n"); } +static CamelStream * +_get_output_stream (CamelDataWrapper *data_wrapper) +{ + + CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_output_stream leaving\n"); + return camel_data_wrapper_get_input_stream (data_wrapper); + CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_output_stream leaving\n"); + +} + + const gchar * camel_mime_part_encoding_to_string (CamelMimePartEncodingType encoding) { |