From a8feedf3901a6db06e810f0dfd6ef370b23a2718 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 3 Apr 2010 16:55:23 -0400 Subject: Adapt to Camel API changes. --- plugins/audio-inline/audio-inline.c | 2 +- plugins/groupwise-features/install-shared.c | 6 +++--- plugins/groupwise-features/status-track.c | 2 +- plugins/image-inline/image-inline.c | 2 +- plugins/itip-formatter/itip-formatter.c | 4 ++-- plugins/mail-to-task/mail-to-task.c | 10 +++++----- plugins/prefer-plain/prefer-plain.c | 4 ++-- plugins/pst-import/pst-importer.c | 12 ++++++------ plugins/tnef-attachments/tnef-plugin.c | 6 +++--- plugins/vcard-inline/vcard-inline.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) (limited to 'plugins') 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 */ -- cgit v1.2.3