diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-07-24 01:21:57 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-07-24 01:21:57 +0800 |
commit | baf3f78660a144ce364d8a27b5d41a7600b7ef21 (patch) | |
tree | aa13c6fea8f8eac840fc7c80397fe9fff3c9854e /camel/camel-data-wrapper.c | |
parent | dbd246a88ee84e6aaf36e78d2ab8a6ba5693a63d (diff) | |
download | gsoc2013-evolution-baf3f78660a144ce364d8a27b5d41a7600b7ef21.tar.gz gsoc2013-evolution-baf3f78660a144ce364d8a27b5d41a7600b7ef21.tar.zst gsoc2013-evolution-baf3f78660a144ce364d8a27b5d41a7600b7ef21.zip |
Revert my previous changes to this function.
2003-07-23 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-message.c (find_best_encoding): Revert my previous
changes to this function.
* camel-mime-utils.h: Revert previous changes.
* camel-mime-part.h: Revert previous changes.
* camel-mime-part-utils.c: Revert previous changes.
* camel-data-wrapper.c (camel_data_wrapper_init): Revert previous
changes.
(write_to_stream): Revert previous changes.
svn path=/trunk/; revision=21920
Diffstat (limited to 'camel/camel-data-wrapper.c')
-rw-r--r-- | camel/camel-data-wrapper.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c index ba898e0308..de4d1bf5bf 100644 --- a/camel/camel-data-wrapper.c +++ b/camel/camel-data-wrapper.c @@ -28,9 +28,8 @@ #include <errno.h> #include "camel-data-wrapper.h" +#include "camel-mime-utils.h" #include "camel-stream.h" -#include "camel-stream-filter.h" -#include "camel-mime-filter-basic.h" #include "camel-exception.h" #include "camel-private.h" @@ -41,9 +40,9 @@ static CamelObjectClass *parent_class = NULL; /* Returns the class for a CamelDataWrapper */ #define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so)) -static int construct_from_stream(CamelDataWrapper *, CamelStream *); +static int construct_from_stream (CamelDataWrapper *, CamelStream *); static int write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); -static void set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type); +static void set_mime_type (CamelDataWrapper *data_wrapper, const char *mime_type); static gchar *get_mime_type (CamelDataWrapper *data_wrapper); static CamelContentType *get_mime_type_field (CamelDataWrapper *data_wrapper); static void set_mime_type_field (CamelDataWrapper *data_wrapper, CamelContentType *mime_type); @@ -73,8 +72,8 @@ camel_data_wrapper_init (gpointer object, gpointer klass) pthread_mutex_init (&camel_data_wrapper->priv->stream_lock, NULL); camel_data_wrapper->mime_type = header_content_type_new ("application", "octet-stream"); - camel_data_wrapper->encoding = CAMEL_MIME_PART_ENCODING_DEFAULT; camel_data_wrapper->offline = FALSE; + camel_data_wrapper->rawtext = TRUE; } static void @@ -115,8 +114,6 @@ camel_data_wrapper_get_type (void) static int write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) { - CamelMimeFilter *filter; - CamelStream *fstream; int ret; if (data_wrapper->stream == NULL) { @@ -129,30 +126,7 @@ write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) return -1; } - fstream = (CamelStream *) camel_stream_filter_new_with_stream (data_wrapper->stream); - - switch (data_wrapper->encoding) { - case CAMEL_MIME_PART_ENCODING_BASE64: - filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_BASE64_DEC); - camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter); - camel_object_unref (filter); - break; - case CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE: - filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_DEC); - camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter); - camel_object_unref (filter); - break; - case CAMEL_MIME_PART_ENCODING_UUENCODE: - filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_UU_DEC); - camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter); - camel_object_unref (filter); - break; - default: - break; - } - - ret = camel_stream_write_to_stream (fstream, stream); - camel_object_unref (fstream); + ret = camel_stream_write_to_stream (data_wrapper->stream, stream); CAMEL_DATA_WRAPPER_UNLOCK (data_wrapper, stream_lock); |