aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-04-04 04:55:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-04 11:06:39 +0800
commita8feedf3901a6db06e810f0dfd6ef370b23a2718 (patch)
tree7037c865bae26f0abcf71500cedb62db130a12d5 /widgets/misc/e-attachment.c
parent26240e0b180bdaf92702e513a21da2f859883fb3 (diff)
downloadgsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.gz
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.zst
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.zip
Adapt to Camel API changes.
Diffstat (limited to 'widgets/misc/e-attachment.c')
-rw-r--r--widgets/misc/e-attachment.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index dee4bd2aa5..cbfab83945 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -998,7 +998,7 @@ e_attachment_new_for_message (CamelMimeMessage *message)
g_string_free (description, TRUE);
wrapper = CAMEL_DATA_WRAPPER (message);
- camel_medium_set_content_object (CAMEL_MEDIUM (mime_part), wrapper);
+ camel_medium_set_content (CAMEL_MEDIUM (mime_part), wrapper);
camel_mime_part_set_content_type (mime_part, "message/rfc822");
attachment = e_attachment_new ();
@@ -1028,7 +1028,7 @@ e_attachment_add_to_multipart (EAttachment *attachment,
return;
content_type = camel_mime_part_get_content_type (mime_part);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (wrapper))
goto exit;
@@ -1036,8 +1036,8 @@ e_attachment_add_to_multipart (EAttachment *attachment,
/* For text content, determine the best encoding and character set. */
if (camel_content_type_is (content_type, "text", "*")) {
CamelTransferEncoding encoding;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilterBestenc *filter;
+ CamelStream *filtered_stream;
+ CamelMimeFilter *filter;
CamelStream *stream;
const gchar *charset;
@@ -1046,19 +1046,21 @@ e_attachment_add_to_multipart (EAttachment *attachment,
/* Determine the best encoding by writing the MIME
* part to a NULL stream with a "bestenc" filter. */
stream = camel_stream_null_new ();
- filtered_stream = camel_stream_filter_new_with_stream (stream);
+ filtered_stream = camel_stream_filter_new (stream);
filter = camel_mime_filter_bestenc_new (
CAMEL_BESTENC_GET_ENCODING);
camel_stream_filter_add (
- filtered_stream, CAMEL_MIME_FILTER (filter));
+ CAMEL_STREAM_FILTER (filtered_stream),
+ CAMEL_MIME_FILTER (filter));
camel_data_wrapper_decode_to_stream (
- wrapper, CAMEL_STREAM (filtered_stream));
+ wrapper, filtered_stream);
camel_object_unref (filtered_stream);
camel_object_unref (stream);
/* Retrieve the best encoding from the filter. */
encoding = camel_mime_filter_bestenc_get_best_encoding (
- filter, CAMEL_BESTENC_8BIT);
+ CAMEL_MIME_FILTER_BESTENC (filter),
+ CAMEL_BESTENC_8BIT);
camel_mime_part_set_encoding (mime_part, encoding);
camel_object_unref (filter);
@@ -1532,7 +1534,7 @@ attachment_load_finish (LoadContext *load_context)
camel_object_unref (stream);
mime_part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (mime_part), wrapper);
+ camel_medium_set_content (CAMEL_MEDIUM (mime_part), wrapper);
camel_object_unref (wrapper);
g_free (mime_type);
@@ -2460,7 +2462,7 @@ attachment_save_got_output_stream (SaveContext *save_context)
buffer = g_byte_array_new ();
stream = camel_stream_mem_new ();
camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), buffer);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
camel_data_wrapper_decode_to_stream (wrapper, stream);
camel_object_unref (stream);