aboutsummaryrefslogtreecommitdiffstats
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
parent26240e0b180bdaf92702e513a21da2f859883fb3 (diff)
downloadgsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.gz
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.bz2
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.lz
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.xz
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.tar.zst
gsoc2013-evolution-a8feedf3901a6db06e810f0dfd6ef370b23a2718.zip
Adapt to Camel API changes.
-rw-r--r--calendar/gui/dialogs/comp-editor.c2
-rw-r--r--composer/e-composer-private.c2
-rw-r--r--composer/e-msg-composer.c69
-rw-r--r--e-util/e-signature-utils.c9
-rw-r--r--em-format/em-format-quote.c24
-rw-r--r--em-format/em-format.c58
-rw-r--r--mail/em-composer-utils.c22
-rw-r--r--mail/em-format-html-display.c2
-rw-r--r--mail/em-format-html.c48
-rw-r--r--mail/em-inline-filter.c2
-rw-r--r--mail/em-utils.c11
-rw-r--r--mail/mail-autofilter.c2
-rw-r--r--mail/mail-ops.c15
-rw-r--r--mail/mail-tools.c4
-rw-r--r--modules/calendar/e-cal-attachment-handler.c2
-rw-r--r--modules/mail/e-mail-attachment-handler.c12
-rw-r--r--plugins/audio-inline/audio-inline.c2
-rw-r--r--plugins/groupwise-features/install-shared.c6
-rw-r--r--plugins/groupwise-features/status-track.c2
-rw-r--r--plugins/image-inline/image-inline.c2
-rw-r--r--plugins/itip-formatter/itip-formatter.c4
-rw-r--r--plugins/mail-to-task/mail-to-task.c10
-rw-r--r--plugins/prefer-plain/prefer-plain.c4
-rw-r--r--plugins/pst-import/pst-importer.c12
-rw-r--r--plugins/tnef-attachments/tnef-plugin.c6
-rw-r--r--plugins/vcard-inline/vcard-inline.c2
-rw-r--r--widgets/misc/e-attachment.c22
27 files changed, 190 insertions, 166 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 16f981785f..5a97f037ad 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -2907,7 +2907,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
continue;
cal_mime_attach = g_malloc0 (sizeof (struct CalMimeAttach));
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
mstream = (CamelStreamMem *) camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index b48f9b6cdf..0ff1da73ed 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -109,7 +109,7 @@ msg_composer_url_requested_cb (GtkHTML *html,
array = g_byte_array_new ();
camel_stream = camel_stream_mem_new_with_byte_array (array);
- 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, camel_stream);
gtk_html_write (html, stream, (gchar *) array->data, array->len);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 77c15f2fc1..fb49984a07 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -669,32 +669,34 @@ build_message (EMsgComposer *composer,
/* convert the stream to the appropriate charset */
if (iconv_charset && g_ascii_strcasecmp (iconv_charset, "UTF-8") != 0) {
- CamelStreamFilter *filter_stream;
- CamelMimeFilterCharset *filter;
+ CamelStream *filter_stream;
+ CamelMimeFilter *filter;
- filter_stream = camel_stream_filter_new_with_stream (stream);
+ filter_stream = camel_stream_filter_new (stream);
camel_object_unref (stream);
- stream = (CamelStream *) filter_stream;
- filter = camel_mime_filter_charset_new_convert ("UTF-8", iconv_charset);
- camel_stream_filter_add (filter_stream, (CamelMimeFilter *) filter);
+ stream = filter_stream;
+ filter = camel_mime_filter_charset_new ("UTF-8", iconv_charset);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filter_stream), filter);
camel_object_unref (filter);
}
if (plain_encoding == CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE) {
/* encode to quoted-printable by ourself, together with
taking care of "\nFrom " text */
- CamelStreamFilter *filter_stream;
+ CamelStream *filter_stream;
CamelMimeFilter *mf, *qp;
if (!CAMEL_IS_STREAM_FILTER (stream)) {
- filter_stream = camel_stream_filter_new_with_stream (stream);
+ filter_stream = camel_stream_filter_new (stream);
camel_object_unref (stream);
- stream = (CamelStream *) filter_stream;
+ stream = filter_stream;
}
- qp = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_ENC);
+ qp = camel_mime_filter_basic_new (
+ CAMEL_MIME_FILTER_BASIC_QP_ENC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), qp);
camel_object_unref (qp);
@@ -742,17 +744,18 @@ build_message (EMsgComposer *composer,
if (pre_encode) {
/* encode to quoted-printable by ourself, together with
taking care of "\nFrom " text */
- CamelStreamFilter *filter_stream;
+ CamelStream *filter_stream;
CamelMimeFilter *mf, *qp;
if (!CAMEL_IS_STREAM_FILTER (stream)) {
- filter_stream = camel_stream_filter_new_with_stream (stream);
+ filter_stream = camel_stream_filter_new (stream);
camel_object_unref (stream);
- stream = (CamelStream *) filter_stream;
+ stream = filter_stream;
}
- qp = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_ENC);
+ qp = camel_mime_filter_basic_new (
+ CAMEL_MIME_FILTER_BASIC_QP_ENC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), qp);
camel_object_unref (qp);
@@ -777,14 +780,14 @@ build_message (EMsgComposer *composer,
camel_multipart_set_boundary (body, NULL);
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), plain);
+ camel_medium_set_content (CAMEL_MEDIUM (part), plain);
camel_object_unref (plain);
camel_mime_part_set_encoding (part, plain_encoding);
camel_multipart_add_part (body, part);
camel_object_unref (part);
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), html);
+ camel_medium_set_content (CAMEL_MEDIUM (part), html);
camel_object_unref (html);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
camel_multipart_add_part (body, part);
@@ -804,7 +807,7 @@ build_message (EMsgComposer *composer,
camel_multipart_set_boundary (html_with_images, NULL);
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (body));
+ camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (body));
camel_object_unref (body);
camel_multipart_add_part (html_with_images, part);
camel_object_unref (part);
@@ -830,7 +833,7 @@ build_message (EMsgComposer *composer,
camel_multipart_set_boundary (multipart, NULL);
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
+ camel_medium_set_content (CAMEL_MEDIUM (part), current);
if (current == plain)
camel_mime_part_set_encoding (part, plain_encoding);
camel_object_unref (current);
@@ -876,7 +879,7 @@ build_message (EMsgComposer *composer,
recipients = g_ptr_array_new ();
for (i = 0; i < G_N_ELEMENTS (types); i++) {
- const CamelInternetAddress *addr;
+ CamelInternetAddress *addr;
const gchar *address;
addr = camel_mime_message_get_recipients (new, types[i]);
@@ -893,7 +896,7 @@ build_message (EMsgComposer *composer,
EAccount *account;
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
+ camel_medium_set_content (CAMEL_MEDIUM (part), current);
if (current == plain)
camel_mime_part_set_encoding (part, plain_encoding);
camel_object_unref (current);
@@ -961,7 +964,7 @@ build_message (EMsgComposer *composer,
if (from)
camel_object_unref (from);
- current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+ current = camel_medium_get_content (CAMEL_MEDIUM (part));
camel_object_ref (current);
camel_object_unref (part);
}
@@ -972,7 +975,7 @@ build_message (EMsgComposer *composer,
CamelCipherContext *cipher;
part = camel_mime_part_new ();
- camel_medium_set_content_object ((CamelMedium *)part, current);
+ camel_medium_set_content ((CamelMedium *)part, current);
if (current == plain)
camel_mime_part_set_encoding (part, plain_encoding);
camel_object_unref (current);
@@ -1043,14 +1046,14 @@ build_message (EMsgComposer *composer,
camel_object_unref (part);
goto skip_content;
} else {
- current = camel_medium_get_content_object ((CamelMedium *)part);
+ current = camel_medium_get_content ((CamelMedium *)part);
camel_object_ref (current);
camel_object_unref (part);
}
}
#endif /* HAVE_NSS */
- camel_medium_set_content_object (CAMEL_MEDIUM (new), current);
+ camel_medium_set_content (CAMEL_MEDIUM (new), current);
if (current == plain)
camel_mime_part_set_encoding (CAMEL_MIME_PART (new), plain_encoding);
camel_object_unref (current);
@@ -2260,7 +2263,7 @@ add_attachments_handle_mime_part (EMsgComposer *composer,
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)) {
/* another layer of multipartness... */
@@ -2332,7 +2335,7 @@ e_msg_composer_add_message_attachments (EMsgComposer *composer,
{
CamelDataWrapper *wrapper;
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (message));
if (!CAMEL_IS_MULTIPART (wrapper))
return;
@@ -2370,7 +2373,7 @@ handle_multipart_signed (EMsgComposer *composer,
content_type = camel_mime_part_get_content_type (mime_part);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (content)) {
multipart = CAMEL_MULTIPART (content);
@@ -2445,7 +2448,7 @@ handle_multipart_encrypted (EMsgComposer *composer,
content_type = camel_mime_part_get_content_type (mime_part);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *content_multipart = CAMEL_MULTIPART (content);
@@ -2503,7 +2506,7 @@ handle_multipart_alternative (EMsgComposer *composer,
continue;
content_type = camel_mime_part_get_content_type (mime_part);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *mp;
@@ -2563,7 +2566,7 @@ handle_multipart (EMsgComposer *composer,
continue;
content_type = camel_mime_part_get_content_type (mime_part);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *mp;
@@ -2643,7 +2646,7 @@ set_signature_gui (EMsgComposer *composer)
EMsgComposer *
e_msg_composer_new_with_message (CamelMimeMessage *message)
{
- const CamelInternetAddress *to, *cc, *bcc;
+ CamelInternetAddress *to, *cc, *bcc;
GList *To = NULL, *Cc = NULL, *Bcc = NULL, *postto = NULL;
const gchar *format, *subject;
EDestination **Tov, **Ccv, **Bccv;
@@ -2882,7 +2885,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
}
/* Restore the attachments and body text */
- content = camel_medium_get_content_object (CAMEL_MEDIUM (message));
+ content = camel_medium_get_content (CAMEL_MEDIUM (message));
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *multipart;
@@ -3476,7 +3479,7 @@ e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
g_free (mime_type);
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
+ camel_medium_set_content (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (wrapper);
cid = camel_header_msgid_generate ();
diff --git a/e-util/e-signature-utils.c b/e-util/e-signature-utils.c
index e01f9096fc..5680278ae1 100644
--- a/e-util/e-signature-utils.c
+++ b/e-util/e-signature-utils.c
@@ -171,12 +171,12 @@ e_read_signature_file (ESignature *signature,
input_stream = camel_stream_fs_new_with_fd (fd);
if (!is_html && convert_to_html) {
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *filter;
gint32 flags;
filtered_stream =
- camel_stream_filter_new_with_stream (input_stream);
+ camel_stream_filter_new (input_stream);
camel_object_unref (input_stream);
flags =
@@ -185,10 +185,11 @@ e_read_signature_file (ESignature *signature,
CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES |
CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES;
filter = camel_mime_filter_tohtml_new (flags, 0);
- camel_stream_filter_add (filtered_stream, filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), filter);
camel_object_unref (filter);
- input_stream = (CamelStream *) filtered_stream;
+ input_stream = filtered_stream;
}
buffer = g_byte_array_new ();
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
index c297b48efa..93cb5c3b74 100644
--- a/em-format/em-format-quote.c
+++ b/em-format/em-format-quote.c
@@ -434,14 +434,15 @@ emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, con
static void
emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *html_filter;
- filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) stream);
+ filtered_stream = camel_stream_filter_new ((CamelStream *) stream);
html_filter = camel_mime_filter_tohtml_new (CAMEL_MIME_FILTER_TOHTML_CONVERT_NL
| CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
| CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT, 0);
- camel_stream_filter_add(filtered_stream, html_filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), html_filter);
camel_object_unref(html_filter);
em_format_format_text(emf, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
@@ -473,7 +474,7 @@ emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part,
static void
emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *html_filter;
CamelMimeFilter *sig_strip;
CamelContentType *type;
@@ -492,16 +493,18 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
&& !g_ascii_strcasecmp(format, "flowed"))
flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
- filtered_stream = camel_stream_filter_new_with_stream(stream);
+ filtered_stream = camel_stream_filter_new (stream);
if ((emfq->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) {
sig_strip = em_stripsig_filter_new ();
- camel_stream_filter_add (filtered_stream, sig_strip);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
camel_object_unref (sig_strip);
}
html_filter = camel_mime_filter_tohtml_new(flags, rgb);
- camel_stream_filter_add(filtered_stream, html_filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), html_filter);
camel_object_unref(html_filter);
em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
@@ -512,7 +515,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
static void
emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *enriched;
guint32 flags = 0;
@@ -524,8 +527,9 @@ emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part
}
enriched = camel_mime_filter_enriched_new(flags);
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add(filtered_stream, enriched);
+ filtered_stream = camel_stream_filter_new (stream);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), enriched);
camel_object_unref(enriched);
camel_stream_write_string(stream, "<br><hr><br>");
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 4c1330bc51..c348e0f19f 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -676,7 +676,7 @@ em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
gchar *mime_type;
CamelDataWrapper *dw;
- dw = camel_medium_get_content_object((CamelMedium *)part);
+ dw = camel_medium_get_content ((CamelMedium *)part);
mime_type = camel_data_wrapper_get_mime_type(dw);
if (mime_type) {
camel_strdown(mime_type);
@@ -1003,7 +1003,7 @@ void em_format_add_header(EMFormat *emf, const gchar *name, guint32 flags)
gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
{
/*CamelContentType *ct = camel_mime_part_get_content_type(part);*/
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
+ CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part);
if (!dw)
return 0;
@@ -1184,7 +1184,7 @@ em_format_busy (EMFormat *emf)
void
em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
+ CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part);
if (camel_content_type_is (dw->mime_type, "text", "*"))
em_format_format_text(emf, stream, (CamelDataWrapper *)part);
@@ -1203,8 +1203,8 @@ em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart *part
void
em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
{
- CamelStreamFilter *filter_stream;
- CamelMimeFilterCharset *filter;
+ CamelStream *filter_stream;
+ CamelMimeFilter *filter;
const gchar *charset = NULL;
CamelMimeFilterWindows *windows = NULL;
CamelStream *mem_stream = NULL;
@@ -1225,11 +1225,13 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
* before we move on... */
null = camel_stream_null_new();
- filter_stream = camel_stream_filter_new_with_stream(null);
+ filter_stream = camel_stream_filter_new (null);
camel_object_unref(null);
windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new(charset);
- camel_stream_filter_add(filter_stream, (CamelMimeFilter *)windows);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filter_stream),
+ CAMEL_MIME_FILTER (windows));
camel_data_wrapper_decode_to_stream(dw, (CamelStream *)filter_stream);
camel_stream_flush((CamelStream *)filter_stream);
@@ -1241,10 +1243,12 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
}
mem_stream = (CamelStream *)camel_stream_mem_new ();
- filter_stream = camel_stream_filter_new_with_stream(mem_stream);
+ filter_stream = camel_stream_filter_new (mem_stream);
- if ((filter = camel_mime_filter_charset_new_convert(charset, "UTF-8"))) {
- camel_stream_filter_add(filter_stream, (CamelMimeFilter *) filter);
+ if ((filter = camel_mime_filter_charset_new (charset, "UTF-8"))) {
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filter_stream),
+ CAMEL_MIME_FILTER (filter));
camel_object_unref(filter);
}
@@ -1258,7 +1262,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
}
g_object_unref (gconf);
- size = camel_data_wrapper_decode_to_stream(emf->mode == EM_FORMAT_SOURCE ? (CamelDataWrapper *)dw: camel_medium_get_content_object((CamelMedium *)dw), (CamelStream *)filter_stream);
+ size = camel_data_wrapper_decode_to_stream(emf->mode == EM_FORMAT_SOURCE ? (CamelDataWrapper *)dw: camel_medium_get_content ((CamelMedium *)dw), (CamelStream *)filter_stream);
camel_stream_flush((CamelStream *)filter_stream);
camel_object_unref(filter_stream);
camel_stream_reset (mem_stream);
@@ -1381,7 +1385,7 @@ emf_multipart_appledouble (EMFormat *emf,
const EMFormatHandler *info,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMimePart *mime_part;
gint len;
@@ -1410,7 +1414,7 @@ emf_multipart_mixed (EMFormat *emf,
const EMFormatHandler *info,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
gint i, nparts, len;
if (!CAMEL_IS_MULTIPART(mp)) {
@@ -1436,7 +1440,7 @@ emf_multipart_alternative (EMFormat *emf,
const EMFormatHandler *info,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
gint i, nparts, bestid = 0;
CamelMimePart *best = NULL;
@@ -1506,7 +1510,7 @@ emf_multipart_encrypted (EMFormat *emf,
return;
}
- mpe = (CamelMultipartEncrypted*)camel_medium_get_content_object((CamelMedium *)part);
+ mpe = (CamelMultipartEncrypted*)camel_medium_get_content ((CamelMedium *)part);
if (!CAMEL_IS_MULTIPART_ENCRYPTED(mpe)) {
em_format_format_error(emf, stream, _("Could not parse MIME message. Displaying as source."));
em_format_format_source(emf, stream, part);
@@ -1564,7 +1568,7 @@ emf_multipart_related (EMFormat *emf,
const EMFormatHandler *info,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
const gchar *start;
@@ -1675,7 +1679,7 @@ emf_multipart_signed (EMFormat *emf,
return;
}
- mps = (CamelMultipartSigned *)camel_medium_get_content_object((CamelMedium *)part);
+ mps = (CamelMultipartSigned *)camel_medium_get_content ((CamelMedium *)part);
if (!CAMEL_IS_MULTIPART_SIGNED(mps)
|| (cpart = camel_multipart_get_part((CamelMultipart *)mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) {
em_format_format_error(emf, stream, _("Could not parse MIME message. Displaying as source."));
@@ -1765,7 +1769,7 @@ emf_application_mbox (EMFormat *emf,
mem_stream = camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (
- camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)), mem_stream);
+ camel_medium_get_content (CAMEL_MEDIUM (mime_part)), mem_stream);
camel_seekable_stream_seek (
CAMEL_SEEKABLE_STREAM (mem_stream), 0, CAMEL_STREAM_SET);
camel_mime_parser_init_with_stream (parser, mem_stream);
@@ -1805,7 +1809,7 @@ emf_message_rfc822 (EMFormat *emf,
const EMFormatHandler *info,
gboolean is_fallback)
{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
+ CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part);
const EMFormatHandler *handle;
gint len;
@@ -1837,7 +1841,7 @@ emf_message_deliverystatus (EMFormat *emf,
static void
emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, EMFormatHandler *info)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilterPgp *pgp_filter;
CamelContentType *content_type;
CamelCipherContext *cipher;
@@ -1872,15 +1876,17 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E
/* Setup output stream */
ostream = camel_stream_mem_new();
- filtered_stream = camel_stream_filter_new_with_stream(ostream);
+ filtered_stream = camel_stream_filter_new (ostream);
/* Add PGP header / footer filter */
pgp_filter = (CamelMimeFilterPgp *)camel_mime_filter_pgp_new();
- camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)pgp_filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream),
+ CAMEL_MIME_FILTER (pgp_filter));
camel_object_unref(pgp_filter);
/* Pass through the filters that have been setup */
- dw = camel_medium_get_content_object((CamelMedium *)ipart);
+ dw = camel_medium_get_content ((CamelMedium *)ipart);
camel_data_wrapper_decode_to_stream(dw, (CamelStream *)filtered_stream);
camel_stream_flush((CamelStream *)filtered_stream);
camel_object_unref(filtered_stream);
@@ -1904,7 +1910,7 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E
g_free (type);
opart = camel_mime_part_new ();
- camel_medium_set_content_object ((CamelMedium *) opart, dw);
+ camel_medium_set_content ((CamelMedium *) opart, dw);
camel_data_wrapper_set_mime_type_field ((CamelDataWrapper *) opart, dw->mime_type);
add_validity_found (emf, valid);
@@ -1948,7 +1954,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart
return;
}
- dw = camel_medium_get_content_object ((CamelMedium *)opart);
+ dw = camel_medium_get_content ((CamelMedium *)opart);
mime_type = camel_data_wrapper_get_mime_type (dw);
/* this ensures to show the 'opart' as inlined, if possible */
@@ -2029,7 +2035,7 @@ em_format_snoop_type (CamelMimePart *part)
if (filename != NULL)
name_type = e_util_guess_mime_type (filename, FALSE);
- dw = camel_medium_get_content_object((CamelMedium *)part);
+ dw = camel_medium_get_content ((CamelMedium *)part);
if (!camel_data_wrapper_is_offline(dw)) {
CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index ec6ab34088..c9a8a30c78 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -868,7 +868,7 @@ replace_variables (GSList *clues, CamelMimeMessage *message, gchar **pstr)
}
if (!count1) {
- const CamelInternetAddress *to;
+ CamelInternetAddress *to;
const gchar *name, *addr;
to = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
@@ -925,7 +925,7 @@ traverse_parts (GSList *clues, CamelMimeMessage *message, CamelDataWrapper *cont
CamelStream *mem;
gchar *str;
- content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (part));
if (!content)
return;
@@ -972,7 +972,7 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
clue_list = gconf_client_get_list ( gconf, GCONF_KEY_TEMPLATE_PLACEHOLDERS, GCONF_VALUE_STRING, NULL );
g_object_unref (gconf);
- traverse_parts (clue_list, message, camel_medium_get_content_object (CAMEL_MEDIUM (message)));
+ traverse_parts (clue_list, message, camel_medium_get_content (CAMEL_MEDIUM (message)));
g_slist_foreach (clue_list, (GFunc) g_free, NULL);
g_slist_free (clue_list);
@@ -1224,7 +1224,7 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
composer = create_new_composer (subject, fromuri, FALSE);
if (composer) {
- if (CAMEL_IS_MULTIPART(camel_medium_get_content_object((CamelMedium *)message)))
+ if (CAMEL_IS_MULTIPART(camel_medium_get_content ((CamelMedium *)message)))
e_msg_composer_add_message_attachments(composer, message, FALSE);
e_msg_composer_set_body_text (composer, text, len);
@@ -1574,7 +1574,7 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
camel_object_unref (stream);
part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), receipt_text);
+ camel_medium_set_content (CAMEL_MEDIUM (part), receipt_text);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
camel_object_unref (receipt_text);
camel_multipart_add_part (body, part);
@@ -1605,14 +1605,14 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
g_free (recipient);
g_free (fake_msgid);
- camel_medium_set_content_object (CAMEL_MEDIUM (part), receipt_data);
+ camel_medium_set_content (CAMEL_MEDIUM (part), receipt_data);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_7BIT);
camel_object_unref (receipt_data);
camel_multipart_add_part (body, part);
camel_object_unref (part);
/* Finish creating the message */
- camel_medium_set_content_object (CAMEL_MEDIUM (receipt), CAMEL_DATA_WRAPPER (body));
+ camel_medium_set_content (CAMEL_MEDIUM (receipt), CAMEL_DATA_WRAPPER (body));
camel_object_unref (body);
/* Translators: %s is the subject of the email message */
@@ -1764,7 +1764,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
static void
get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTPAddress *postto)
{
- const CamelInternetAddress *reply_to;
+ CamelInternetAddress *reply_to;
const gchar *name, *addr, *posthdr;
gint i;
@@ -1833,7 +1833,7 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
}
static void
-concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src, GHashTable *rcpt_hash)
+concat_unique_addrs (CamelInternetAddress *dest, CamelInternetAddress *src, GHashTable *rcpt_hash)
{
const gchar *name, *addr;
gint i;
@@ -1849,7 +1849,7 @@ concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src
static void
get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInternetAddress *cc, CamelNNTPAddress *postto)
{
- const CamelInternetAddress *reply_to, *to_addrs, *cc_addrs;
+ CamelInternetAddress *reply_to, *to_addrs, *cc_addrs;
const gchar *name, *addr, *posthdr;
GHashTable *rcpt_hash;
gint i;
@@ -1933,7 +1933,7 @@ typedef void (* AttribFormatter) (GString *str, const gchar *attr, CamelMimeMess
static void
format_sender (GString *str, const gchar *attr, CamelMimeMessage *message)
{
- const CamelInternetAddress *sender;
+ CamelInternetAddress *sender;
const gchar *name, *addr = NULL;
sender = camel_mime_message_get_from (message);
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index e93b51744a..d32ee8dd9f 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -676,7 +676,7 @@ efhd_builtin_init(EMFormatHTMLDisplayClass *efhc)
static void
efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
+ CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part);
/* TODO: identical to efh_write_image */
d(printf("writing image '%s'\n", puri->cid));
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 3e9a26afca..2a09d713a9 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -667,17 +667,18 @@ efh_format_source (EMFormat *emf,
CamelStream *stream,
CamelMimePart *part)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *filter;
CamelDataWrapper *dw = (CamelDataWrapper *) part;
- filtered_stream = camel_stream_filter_new_with_stream (stream);
+ filtered_stream = camel_stream_filter_new (stream);
filter = camel_mime_filter_tohtml_new (
CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES |
CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT, 0);
- camel_stream_filter_add (filtered_stream, filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), filter);
camel_object_unref (filter);
camel_stream_write_string (stream, "<table><tr><td><tt>");
@@ -881,7 +882,7 @@ efh_class_init (EMFormatHTMLClass *class)
/* cache expiry - 2 hour access, 1 day max */
pathname = g_build_filename (
e_get_user_data_dir (), "cache", NULL);
- emfh_http_cache = camel_data_cache_new (pathname, 0, NULL);
+ emfh_http_cache = camel_data_cache_new (pathname, NULL);
if (emfh_http_cache) {
camel_data_cache_set_expire_age(emfh_http_cache, 24*60*60);
camel_data_cache_set_expire_access(emfh_http_cache, 2*60*60);
@@ -1190,7 +1191,7 @@ em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar
if (mime_type)
camel_data_wrapper_set_mime_type(dw, mime_type);
part = camel_mime_part_new();
- camel_medium_set_content_object((CamelMedium *)part, dw);
+ camel_medium_set_content ((CamelMedium *)part, dw);
camel_object_unref(dw);
basename = g_path_get_basename (filename);
camel_mime_part_set_filename(part, basename);
@@ -1449,7 +1450,7 @@ efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMForm
puri = em_format_find_visible_puri((EMFormat *)efh, url);
if (puri) {
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
+ CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part);
CamelContentType *ct = dw?dw->mime_type:NULL;
/* GtkHTML only handles text and images.
@@ -1616,7 +1617,7 @@ efh_text_plain (EMFormatHTML *efh,
const EMFormatHandler *info,
gboolean is_fallback)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *html_filter;
CamelMultipart *mp;
CamelDataWrapper *dw;
@@ -1629,7 +1630,7 @@ efh_text_plain (EMFormatHTML *efh,
flags = efh->text_html_flags;
- dw = camel_medium_get_content_object((CamelMedium *)part);
+ dw = camel_medium_get_content ((CamelMedium *)part);
/* Check for RFC 2646 flowed text. */
if (camel_content_type_is(dw->mime_type, "text", "plain")
@@ -1663,10 +1664,12 @@ efh_text_plain (EMFormatHTML *efh,
}
null = camel_stream_null_new();
- filtered_stream = camel_stream_filter_new_with_stream(null);
+ filtered_stream = camel_stream_filter_new (null);
camel_object_unref(null);
inline_filter = em_inline_filter_new(camel_mime_part_get_encoding(part), ct);
- camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)inline_filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream),
+ CAMEL_MIME_FILTER (inline_filter));
camel_data_wrapper_write_to_stream(dw, (CamelStream *)filtered_stream);
camel_stream_close((CamelStream *)filtered_stream);
camel_object_unref(filtered_stream);
@@ -1682,9 +1685,10 @@ efh_text_plain (EMFormatHTML *efh,
rgb = e_color_to_value (
&efh->priv->colors[EM_FORMAT_HTML_COLOR_CITATION]);
- filtered_stream = camel_stream_filter_new_with_stream(stream);
+ filtered_stream = camel_stream_filter_new (stream);
html_filter = camel_mime_filter_tohtml_new(flags, rgb);
- camel_stream_filter_add(filtered_stream, html_filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), html_filter);
camel_object_unref(html_filter);
/* We handle our made-up multipart here, so we don't recursively call ourselves */
@@ -1728,7 +1732,7 @@ efh_text_plain (EMFormatHTML *efh,
static void
efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *enriched;
guint32 flags = 0;
@@ -1740,8 +1744,9 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
}
enriched = camel_mime_filter_enriched_new(flags);
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add(filtered_stream, enriched);
+ filtered_stream = camel_stream_filter_new (stream);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), enriched);
camel_object_unref(enriched);
camel_stream_printf (
@@ -1773,7 +1778,7 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
fd = dup(STDOUT_FILENO);
out = camel_stream_fs_new_with_fd(fd);
printf("writing text content to frame '%s'\n", puri->cid);
- dw = camel_medium_get_content_object(puri->part);
+ dw = camel_medium_get_content (puri->part);
if (dw)
camel_data_wrapper_write_to_stream(dw, out);
camel_object_unref(out);
@@ -1930,7 +1935,7 @@ fail:
static void
efh_message_deliverystatus(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- CamelStreamFilter *filtered_stream;
+ CamelStream *filtered_stream;
CamelMimeFilter *html_filter;
guint32 rgb = 0x737373;
@@ -1947,9 +1952,10 @@ efh_message_deliverystatus(EMFormatHTML *efh, CamelStream *stream, CamelMimePart
&efh->priv->colors[
EM_FORMAT_HTML_COLOR_TEXT]));
- filtered_stream = camel_stream_filter_new_with_stream(stream);
+ filtered_stream = camel_stream_filter_new (stream);
html_filter = camel_mime_filter_tohtml_new(efh->text_html_flags, rgb);
- camel_stream_filter_add(filtered_stream, html_filter);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), html_filter);
camel_object_unref(html_filter);
camel_stream_write_string(stream, "<tt>\n" EFH_MESSAGE_START);
@@ -2013,7 +2019,7 @@ emfh_multipart_related_check(struct _EMFormatHTMLJob *job, gint cancelled)
static void
efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
const gchar *start;
@@ -2089,7 +2095,7 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
static void
efh_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
- CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
+ CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part);
d(printf("writing image '%s'\n", puri->cid));
camel_data_wrapper_decode_to_stream(dw, stream);
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 44187551f1..55a43caf83 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -164,7 +164,7 @@ emif_add_part(EMInlineFilter *emif, const gchar *data, gint len)
dw->encoding = encoding;
part = camel_mime_part_new();
- camel_medium_set_content_object((CamelMedium *)part, dw);
+ camel_medium_set_content ((CamelMedium *)part, dw);
camel_mime_part_set_encoding(part, encoding);
camel_object_unref(dw);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 8c83382251..ff4487c2d4 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -542,13 +542,14 @@ em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folder, GP
static gint
em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStream *stream)
{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilterFrom *from_filter;
+ CamelStream *filtered_stream;
+ CamelMimeFilter *from_filter;
gint i, res = 0;
from_filter = camel_mime_filter_from_new();
- filtered_stream = camel_stream_filter_new_with_stream(stream);
- camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter);
+ filtered_stream = camel_stream_filter_new (stream);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), from_filter);
camel_object_unref(from_filter);
for (i=0; i<uids->len; i++) {
@@ -2198,7 +2199,7 @@ em_utils_guess_account_with_recipients (CamelMimeMessage *message,
EAccountList *account_list;
GHashTable *recipients;
EIterator *iter;
- const CamelInternetAddress *addr;
+ CamelInternetAddress *addr;
const gchar *type;
const gchar *key;
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index dd0423ae07..f2422ce217 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -259,7 +259,7 @@ rule_from_message (EFilterRule *rule, ERuleContext *context, CamelMimeMessage *m
}
/* should parse the from address into an internet address? */
if (flags & AUTO_FROM) {
- const CamelInternetAddress *from;
+ CamelInternetAddress *from;
gint i;
const gchar *name, *address;
gchar *namestr;
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index c147d22233..3aa310b2f0 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1182,7 +1182,7 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
camel_object_unref(part);
}
part = camel_mime_part_new();
- camel_medium_set_content_object(CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER(multipart));
+ camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER(multipart));
camel_object_unref(multipart);
camel_mime_part_set_description(part, _("Forwarded messages"));
@@ -2053,7 +2053,7 @@ save_prepare_part (CamelMimePart *mime_part)
CamelDataWrapper *wrapper;
gint parts, i;
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
if (!wrapper)
return;
@@ -2082,8 +2082,8 @@ save_prepare_part (CamelMimePart *mime_part)
static void
save_messages_exec (struct _save_messages_msg *m)
{
- CamelStreamFilter *filtered_stream;
- CamelMimeFilterFrom *from_filter;
+ CamelStream *filtered_stream;
+ CamelMimeFilter *from_filter;
CamelStream *stream;
gint i;
gchar *from, *path;
@@ -2095,8 +2095,9 @@ save_messages_exec (struct _save_messages_msg *m)
stream = camel_stream_vfs_new_with_uri (path, CAMEL_STREAM_VFS_CREATE);
from_filter = camel_mime_filter_from_new();
- filtered_stream = camel_stream_filter_new_with_stream(stream);
- camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter);
+ filtered_stream = camel_stream_filter_new (stream);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), from_filter);
camel_object_unref(from_filter);
if (path != m->path)
@@ -2230,7 +2231,7 @@ save_part_exec (struct _save_part_msg *m)
if (path != m->path)
g_free (path);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (m->part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (m->part));
if (camel_data_wrapper_decode_to_stream (content, stream) == -1
|| camel_stream_flush (stream) == -1)
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 7ccf50cc08..92677a4d5a 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -266,8 +266,8 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
part = camel_mime_part_new ();
camel_mime_part_set_disposition (part, "inline");
camel_mime_part_set_description (part, desc);
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- CAMEL_DATA_WRAPPER (message));
+ camel_medium_set_content (
+ CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (message));
camel_mime_part_set_content_type (part, "message/rfc822");
g_free (desc);
diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c
index acf975c0bf..c368f7347c 100644
--- a/modules/calendar/e-cal-attachment-handler.c
+++ b/modules/calendar/e-cal-attachment-handler.c
@@ -79,7 +79,7 @@ attachment_handler_get_component (EAttachment *attachment)
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);
diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
index f27a107a59..ee49490f31 100644
--- a/modules/mail/e-mail-attachment-handler.c
+++ b/modules/mail/e-mail-attachment-handler.c
@@ -69,7 +69,7 @@ mail_attachment_handler_forward (GtkAction *action,
attachment = E_ATTACHMENT (selected->data);
mime_part = e_attachment_get_mime_part (attachment);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
em_utils_forward_message (CAMEL_MIME_MESSAGE (wrapper), NULL);
@@ -91,7 +91,7 @@ mail_attachment_handler_reply_all (GtkAction *action,
attachment = E_ATTACHMENT (selected->data);
mime_part = e_attachment_get_mime_part (attachment);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
em_utils_reply_to_message (
NULL, NULL, CAMEL_MIME_MESSAGE (wrapper),
@@ -115,7 +115,7 @@ mail_attachment_handler_reply_sender (GtkAction *action,
attachment = E_ATTACHMENT (selected->data);
mime_part = e_attachment_get_mime_part (attachment);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
em_utils_reply_to_message (
NULL, NULL, CAMEL_MIME_MESSAGE (wrapper),
@@ -316,7 +316,7 @@ mail_attachment_handler_x_uid_list (EAttachmentView *view,
mime_part = camel_mime_part_new ();
wrapper = CAMEL_DATA_WRAPPER (message);
camel_mime_part_set_disposition (mime_part, "inline");
- camel_medium_set_content_object (
+ camel_medium_set_content (
CAMEL_MEDIUM (mime_part), wrapper);
camel_mime_part_set_content_type (mime_part, "message/rfc822");
camel_multipart_add_part (multipart, mime_part);
@@ -327,7 +327,7 @@ mail_attachment_handler_x_uid_list (EAttachmentView *view,
mime_part = camel_mime_part_new ();
wrapper = CAMEL_DATA_WRAPPER (multipart);
- camel_medium_set_content_object (CAMEL_MEDIUM (mime_part), wrapper);
+ camel_medium_set_content (CAMEL_MEDIUM (mime_part), wrapper);
/* Translators: This is only for multiple messages. */
description = g_strdup_printf (_("%d attached messages"), uids->len);
@@ -399,7 +399,7 @@ mail_attachment_handler_update_actions (EAttachmentView *view)
if (!CAMEL_IS_MIME_PART (mime_part))
goto exit;
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
visible = CAMEL_IS_MIME_MESSAGE (wrapper);
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index 67e759ff2f..9c4ca2ca0d 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -201,7 +201,7 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob
d(printf ("audio inline formatter: write to temp file %s\n", po->filename));
stream = camel_stream_fs_new_with_name (po->filename, O_RDWR | O_CREAT | O_TRUNC, 0600);
- data = camel_medium_get_content_object (CAMEL_MEDIUM (po->part));
+ data = camel_medium_get_content (CAMEL_MEDIUM (po->part));
camel_data_wrapper_decode_to_stream (data, stream);
camel_stream_flush (stream);
camel_object_unref (stream);
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c
index a3ea9be84b..b82027a946 100644
--- a/plugins/groupwise-features/install-shared.c
+++ b/plugins/groupwise-features/install-shared.c
@@ -182,7 +182,7 @@ apply_clicked (GtkAssistant *assistant, CamelMimeMessage *msg)
void
org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target)
{
- const CamelInternetAddress *from_addr = NULL;
+ CamelInternetAddress *from_addr = NULL;
const gchar *name;
const gchar *email;
CamelMimeMessage *msg = (CamelMimeMessage *) target->message;
@@ -196,11 +196,11 @@ org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target)
if (((gchar *)camel_medium_get_header (CAMEL_MEDIUM(msg),"X-notification")) == NULL
|| (from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message)) == NULL
|| !camel_internet_address_get(from_addr, 0, &name, &email)
- || (dw = camel_medium_get_content_object (CAMEL_MEDIUM (msg))) == NULL) {
+ || (dw = camel_medium_get_content (CAMEL_MEDIUM (msg))) == NULL) {
return;
} else {
if (CAMEL_IS_MULTIPART (dw)) {
- dw = camel_medium_get_content_object((CamelMedium *)camel_multipart_get_part((CamelMultipart *)dw, 0));
+ dw = camel_medium_get_content ((CamelMedium *)camel_multipart_get_part((CamelMultipart *)dw, 0));
if (dw == NULL)
return;
}
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index 2a4f304cf5..40fbd0b562 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -88,7 +88,7 @@ gw_track_message_status_cb (GtkAction *action,
CamelMimeMessage *msg = NULL;
CamelFolder *folder = NULL;
gchar *selected_uid = NULL;
- const CamelInternetAddress *from;
+ CamelInternetAddress *from;
const gchar *namep, *addp;
GtkDialog *d;
diff --git a/plugins/image-inline/image-inline.c b/plugins/image-inline/image-inline.c
index be9e025c73..648abc02dd 100644
--- a/plugins/image-inline/image-inline.c
+++ b/plugins/image-inline/image-inline.c
@@ -357,7 +357,7 @@ org_gnome_image_inline_decode (ImageInlinePObject *image_object)
/* Stream takes ownership of the byte array. */
stream = camel_stream_mem_new_with_byte_array (array);
- data_wrapper = camel_medium_get_content_object (medium);
+ data_wrapper = camel_medium_get_content (medium);
camel_data_wrapper_decode_to_stream (data_wrapper, stream);
/* Don't trust the content type in the MIME part. It could
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index eecfcaceaf..9f9b3a507b 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -977,7 +977,7 @@ message_foreach_part (CamelMimePart *part, GSList **part_list)
*part_list = g_slist_append (*part_list, part);
- containee = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+ containee = camel_medium_get_content (CAMEL_MEDIUM (part));
if (containee == NULL)
return;
@@ -2549,7 +2549,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
g_object_unref (gconf);
/* This is non-gui thread. Download the part for using in the main thread */
- content = camel_medium_get_content_object ((CamelMedium *) target->part);
+ content = camel_medium_get_content ((CamelMedium *) target->part);
mem = camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (content, mem);
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 904fe23fd6..0ac562d92d 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -71,7 +71,7 @@ set_attendees (ECalComponent *comp, CamelMimeMessage *message, const gchar *orga
{
GSList *attendees = NULL, *to_free = NULL;
ECalComponentAttendee *ca;
- const CamelInternetAddress *from = NULL, *to, *cc, *bcc, *arr[4];
+ CamelInternetAddress *from = NULL, *to, *cc, *bcc, *arr[4];
gint len, i, j;
if (message->reply_to)
@@ -141,7 +141,7 @@ prepend_from (CamelMimeMessage *message, gchar **text)
{
gchar *res, *tmp, *addr = NULL;
const gchar *name = NULL, *eml = NULL;
- const CamelInternetAddress *from = NULL;
+ CamelInternetAddress *from = NULL;
g_return_val_if_fail (message != NULL, NULL);
g_return_val_if_fail (text != NULL, NULL);
@@ -180,7 +180,7 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
gsize bytes_read, bytes_written;
gint count = 2;
- content = camel_medium_get_content_object ((CamelMedium *) message);
+ content = camel_medium_get_content ((CamelMedium *) message);
if (!content)
return;
@@ -189,7 +189,7 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
*/
while (CAMEL_IS_MULTIPART (content) && count > 0) {
mime_part = camel_multipart_get_part (CAMEL_MULTIPART (content), 0);
- content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
count--;
}
@@ -312,7 +312,7 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message)
gboolean done;
} status;
- content = camel_medium_get_content_object ((CamelMedium *) message);
+ content = camel_medium_get_content ((CamelMedium *) message);
if (!content || !CAMEL_IS_MULTIPART (content))
return;
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index 7a3417bb3b..358f234e12 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -99,7 +99,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream
part = camel_multipart_get_part (mp, i);
if (part != except) {
- CamelMultipart *multipart = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
+ CamelMultipart *multipart = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
if (CAMEL_IS_MULTIPART (multipart)) {
export_as_attachments (multipart, format, stream, except);
@@ -113,7 +113,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream
void
org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)t->part);
+ CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)t->part);
CamelMimePart *part, *display_part = NULL;
gint i, nparts, partidlen, displayid = 0;
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 9def7b9fc4..96b0e68889 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -459,24 +459,24 @@ pst_import_file (PstImporter *m)
g_free (filename);
- camel_operation_progress_count (NULL, 1);
+ camel_operation_progress (NULL, 1);
if ((item = pst_parse_item (&m->pst, m->pst.d_head, NULL)) == NULL) {
pst_error_msg ("Could not get root record");
return;
}
- camel_operation_progress_count (NULL, 2);
+ camel_operation_progress (NULL, 2);
if ((d_ptr = pst_getTopOfFolders (&m->pst, item)) == NULL) {
pst_error_msg ("Top of folders record not found. Cannot continue");
return;
}
- camel_operation_progress_count (NULL, 3);
+ camel_operation_progress (NULL, 3);
pst_import_folders (m, d_ptr);
- camel_operation_progress_count (NULL, 4);
+ camel_operation_progress (NULL, 4);
camel_operation_end (NULL);
@@ -888,7 +888,7 @@ pst_process_email (PstImporter *m, pst_item *item)
/*camel_mime_message_dump (msg, TRUE);*/
if (item->email->htmlbody.str || item->attach) {
- camel_medium_set_content_object (CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER (mp));
+ camel_medium_set_content (CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER (mp));
} else if (item->body.str) {
camel_mime_part_set_content (CAMEL_MIME_PART (msg), item->body.str, strlen (item->body.str), "text/plain");
} else {
@@ -1231,7 +1231,7 @@ set_cal_attachments (ECal *cal, ECalComponent *ec, PstImporter *m, pst_item_atta
continue;
}
- content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+ content = camel_medium_get_content (CAMEL_MEDIUM (part));
if (camel_data_wrapper_decode_to_stream (content, stream) == -1
|| camel_stream_flush (stream) == -1)
diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c
index cb9752e324..f75fcf051b 100644
--- a/plugins/tnef-attachments/tnef-plugin.c
+++ b/plugins/tnef-attachments/tnef-plugin.c
@@ -89,7 +89,7 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
out = camel_stream_fs_new_with_name(name, O_RDWR|O_CREAT, 0666);
if (out == NULL)
goto fail;
- content = camel_medium_get_content_object((CamelMedium *)t->part);
+ content = camel_medium_get_content ((CamelMedium *)t->part);
if (content == NULL)
goto fail;
if (camel_data_wrapper_decode_to_stream(content, out) == -1
@@ -120,7 +120,7 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
camel_data_wrapper_set_mime_type((CamelDataWrapper *)mp, "multipart/mixed");
camel_multipart_set_boundary(mp, NULL);
- camel_medium_set_content_object((CamelMedium *)mainpart, (CamelDataWrapper *)mp);
+ camel_medium_set_content ((CamelMedium *)mainpart, (CamelDataWrapper *)mp);
while ((d = readdir(dir))) {
CamelMimePart *part;
@@ -144,7 +144,7 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
part = camel_mime_part_new();
camel_mime_part_set_encoding(part, CAMEL_TRANSFER_ENCODING_BINARY);
- camel_medium_set_content_object((CamelMedium *)part, content);
+ camel_medium_set_content ((CamelMedium *)part, content);
camel_object_unref(content);
type = em_format_snoop_type(part);
diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c
index 64cb423650..3cd3f93c8c 100644
--- a/plugins/vcard-inline/vcard-inline.c
+++ b/plugins/vcard-inline/vcard-inline.c
@@ -91,7 +91,7 @@ org_gnome_vcard_inline_decode (VCardInlinePObject *vcard_object,
/* Stream takes ownership of the byte array. */
stream = camel_stream_mem_new_with_byte_array (array);
- data_wrapper = camel_medium_get_content_object (medium);
+ data_wrapper = camel_medium_get_content (medium);
camel_data_wrapper_decode_to_stream (data_wrapper, stream);
/* because the result is not NULL-terminated */
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);