[evolution-exchange] Adapt to Camel API changes.



commit 461e2fc52a54e0198ba1812d3e4a6b3255d44d46
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Apr 3 20:15:56 2010 -0400

    Adapt to Camel API changes.

 addressbook/e-book-backend-exchange.c |   10 +++++-----
 calendar/e-cal-backend-exchange.c     |   10 +++++-----
 camel/camel-exchange-folder.c         |   13 +++++++------
 camel/camel-exchange-search.c         |    6 +++---
 camel/camel-exchange-transport.c      |   10 ++++++----
 eplugin/exchange-delegates-user.c     |    6 +++---
 6 files changed, 29 insertions(+), 26 deletions(-)
---
diff --git a/addressbook/e-book-backend-exchange.c b/addressbook/e-book-backend-exchange.c
index ee4e86c..fa041bb 100644
--- a/addressbook/e-book-backend-exchange.c
+++ b/addressbook/e-book-backend-exchange.c
@@ -523,7 +523,7 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
 	camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
 	camel_object_unref (stream);
 
-	content = camel_medium_get_content_object (CAMEL_MEDIUM (msg));
+	content = camel_medium_get_content (CAMEL_MEDIUM (msg));
 	if (CAMEL_IS_MULTIPART (content)) {
 		multipart = (CamelMultipart *)content;
 		content = NULL;
@@ -532,7 +532,7 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
 			part = camel_multipart_get_part (multipart, i);
 			filename = camel_mime_part_get_filename (part);
 			if (filename && !strncmp (filename, "ContactPicture.", 15)) {
-				content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+				content = camel_medium_get_content (CAMEL_MEDIUM (part));
 				break;
 			}
 		}
@@ -1379,7 +1379,7 @@ build_message (const gchar *from_name, const gchar *from_email,
 		text_part = CAMEL_MIME_PART (msg);
 
 	if (text_part) {
-		camel_medium_set_content_object (CAMEL_MEDIUM (text_part), wrapper);
+		camel_medium_set_content (CAMEL_MEDIUM (text_part), wrapper);
 		camel_mime_part_set_encoding (text_part, CAMEL_TRANSFER_ENCODING_8BIT);
 	}
 	if (photo) {
@@ -1422,7 +1422,7 @@ build_message (const gchar *from_name, const gchar *from_email,
 		camel_data_wrapper_set_mime_type (wrapper, content_type);
 
 		photo_part = camel_mime_part_new ();
-		camel_medium_set_content_object (CAMEL_MEDIUM (photo_part),
+		camel_medium_set_content (CAMEL_MEDIUM (photo_part),
 						 wrapper);
 		camel_mime_part_set_encoding (photo_part, CAMEL_TRANSFER_ENCODING_BASE64);
 		camel_mime_part_set_description (photo_part, filename);
@@ -1440,7 +1440,7 @@ build_message (const gchar *from_name, const gchar *from_email,
 		camel_multipart_add_part (multipart, photo_part);
 		camel_object_unref (photo_part);
 
-		camel_medium_set_content_object (CAMEL_MEDIUM (msg),
+		camel_medium_set_content (CAMEL_MEDIUM (msg),
 						 CAMEL_DATA_WRAPPER (multipart));
 		camel_object_unref (multipart);
 	}
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index 7649219..92fd46b 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -1716,7 +1716,7 @@ get_attachment (ECalBackendExchange *cbex, const gchar *uid,
 	camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
 	camel_object_unref (stream);
 
-	msg_content = camel_medium_get_content_object (CAMEL_MEDIUM (msg));
+	msg_content = camel_medium_get_content (CAMEL_MEDIUM (msg));
 	if (msg_content && CAMEL_IS_MULTIPART (msg_content)) {
 		multipart = (CamelMultipart *)msg_content;
 
@@ -1726,7 +1726,7 @@ get_attachment (ECalBackendExchange *cbex, const gchar *uid,
 			if (filename) {
 				CamelStreamMem *stream_mem;
 
-				content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+				content = camel_medium_get_content (CAMEL_MEDIUM (part));
 
 				stream = camel_stream_mem_new ();
 				stream_mem = (CamelStreamMem *)stream;
@@ -2023,7 +2023,7 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const gchar *subject
 
 		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_mime_part_set_filename (mime_part, mime_filename);
 		camel_mime_part_set_encoding (mime_part, CAMEL_TRANSFER_ENCODING_BASE64);
 		cid = camel_header_msgid_generate ();
@@ -2044,11 +2044,11 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const gchar *subject
 	}
 	e_cal_component_set_attachment_list (comp, new_attach_list);
 
-	camel_medium_set_content_object (CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER (multipart));
+	camel_medium_set_content (CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER (multipart));
 	camel_object_unref (multipart);
 
 	content = (CamelStreamMem *)camel_stream_mem_new();
-	dw = camel_medium_get_content_object (CAMEL_MEDIUM (msg));
+	dw = camel_medium_get_content (CAMEL_MEDIUM (msg));
 	camel_data_wrapper_decode_to_stream(dw, (CamelStream *)content);
 	buffer = g_memdup (content->buffer->data, content->buffer->len);
 	buffer[content->buffer->len] = '\0';
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index 96fd178..9897378 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -297,7 +297,7 @@ fix_broken_multipart_related (CamelMimePart *part)
 	CamelMimePart *subpart;
 	gint i, count, broken_parts;
 
-	content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+	content = camel_medium_get_content (CAMEL_MEDIUM (part));
 
 	content_type = content->mime_type;
 	if (camel_content_type_is (content_type, "message", "rfc822")) {
@@ -336,7 +336,7 @@ fix_broken_multipart_related (CamelMimePart *part)
 			camel_multipart_add_part (new, subpart);
 		}
 
-		camel_medium_set_content_object (CAMEL_MEDIUM (part),
+		camel_medium_set_content (CAMEL_MEDIUM (part),
 						 CAMEL_DATA_WRAPPER (new));
 		camel_object_unref (CAMEL_OBJECT (new));
 	}
@@ -401,7 +401,7 @@ get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
 	CamelExchangeFolder *exch = CAMEL_EXCHANGE_FOLDER (folder);
 	CamelMimeMessage *msg;
 	CamelStream *stream;
-	CamelStreamFilter *filtered_stream;
+	CamelStream *filtered_stream;
 	CamelMimeFilter *crlffilter;
 	GByteArray *ba;
 	gchar **list_headers = NULL;
@@ -414,8 +414,9 @@ get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
 	stream = camel_stream_mem_new_with_byte_array (ba);
 
 	crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
-	filtered_stream = camel_stream_filter_new_with_stream (stream);
-	camel_stream_filter_add (filtered_stream, crlffilter);
+	filtered_stream = camel_stream_filter_new (stream);
+	camel_stream_filter_add (
+		CAMEL_STREAM_FILTER (filtered_stream), crlffilter);
 	camel_object_unref (CAMEL_OBJECT (crlffilter));
 	camel_object_unref (CAMEL_OBJECT (stream));
 
@@ -982,7 +983,7 @@ camel_exchange_folder_construct (CamelFolder *folder, CamelStore *parent,
 		return FALSE;
 	}
 
-	exch->cache = camel_data_cache_new (folder_dir, 0, ex);
+	exch->cache = camel_data_cache_new (folder_dir, ex);
 	if (!exch->cache) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Could not create cache for %s"),
diff --git a/camel/camel-exchange-search.c b/camel/camel-exchange-search.c
index 5a3e490..a072a1d 100644
--- a/camel/camel-exchange-search.c
+++ b/camel/camel-exchange-search.c
@@ -82,7 +82,7 @@ exchange_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv,
 
 	if (s->current) {
 		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
-		r->value.bool = FALSE;
+		r->value.boolean = FALSE;
 	} else {
 		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 		r->value.ptrarray = g_ptr_array_new ();
@@ -92,7 +92,7 @@ exchange_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv,
 		/* optimise the match "" case - match everything */
 
 		if (s->current)
-			r->value.bool = TRUE;
+			r->value.boolean = TRUE;
 		else {
 			for (i = 0; i < s->summary->len; i++) {
 				g_ptr_array_add (r->value.ptrarray, s->summary->pdata[i]);
@@ -114,7 +114,7 @@ exchange_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv,
 		uid = camel_message_info_uid (s->current);
 		for (i = 0; i < found_uids->len; i++) {
 			if (!strcmp (uid, found_uids->pdata[i]))
-				r->value.bool = TRUE;
+				r->value.boolean = TRUE;
 			g_free (found_uids->pdata[i]);
 		}
 		g_ptr_array_free (found_uids, TRUE);
diff --git a/camel/camel-exchange-transport.c b/camel/camel-exchange-transport.c
index 8928bfc..74cb298 100644
--- a/camel/camel-exchange-transport.c
+++ b/camel/camel-exchange-transport.c
@@ -78,12 +78,12 @@ exchange_send_to (CamelTransport *transport, CamelMimeMessage *message,
 	CamelService *service = CAMEL_SERVICE (transport);
 	CamelStore *store = NULL;
 	gchar *url_string;
-	const CamelInternetAddress *cia;
+	CamelInternetAddress *cia;
 	const gchar *addr;
 	GPtrArray *recipients_array;
 	gboolean success;
 	CamelStream *stream;
-	CamelStreamFilter *filtered_stream;
+	CamelStream *filtered_stream;
 	CamelMimeFilter *crlffilter;
 	struct _camel_header_raw *header;
 	GSList *h, *bcc = NULL;
@@ -124,8 +124,10 @@ exchange_send_to (CamelTransport *transport, CamelMimeMessage *message,
 
 	stream = camel_stream_mem_new ();
 	crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
-	filtered_stream = camel_stream_filter_new_with_stream (stream);
-	camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlffilter));
+	filtered_stream = camel_stream_filter_new (stream);
+	camel_stream_filter_add (
+		CAMEL_STREAM_FILTER (filtered_stream),
+		CAMEL_MIME_FILTER (crlffilter));
 	camel_object_unref (CAMEL_OBJECT (crlffilter));
 
 	/* Gross hack copied from camel-smtp-transport. ugh. FIXME */
diff --git a/eplugin/exchange-delegates-user.c b/eplugin/exchange-delegates-user.c
index cdb128a..cb9b7c4 100644
--- a/eplugin/exchange-delegates-user.c
+++ b/eplugin/exchange-delegates-user.c
@@ -470,7 +470,7 @@ exchange_delegates_user_edit (ExchangeAccount *account,
 			camel_object_unref (stream);
 
 			part = camel_mime_part_new ();
-			camel_medium_set_content_object (CAMEL_MEDIUM (part), delegate_mail_text);
+			camel_medium_set_content (CAMEL_MEDIUM (part), delegate_mail_text);
 			camel_object_unref (delegate_mail_text);
 			camel_multipart_add_part (body, part);
 			camel_object_unref (part);
@@ -485,13 +485,13 @@ exchange_delegates_user_edit (ExchangeAccount *account,
 
 			camel_data_wrapper_construct_from_stream (delegate_mail_data, stream);
 			camel_object_unref (stream);
-			camel_medium_set_content_object (CAMEL_MEDIUM (part), delegate_mail_data);
+			camel_medium_set_content (CAMEL_MEDIUM (part), delegate_mail_data);
 			camel_object_unref (delegate_mail_data);
 			camel_multipart_add_part (body, part);
 			camel_object_unref (part);
 
 			/* Finish creating the message */
-			camel_medium_set_content_object (CAMEL_MEDIUM (delegate_mail), CAMEL_DATA_WRAPPER (body));
+			camel_medium_set_content (CAMEL_MEDIUM (delegate_mail), CAMEL_DATA_WRAPPER (body));
 			camel_object_unref (body);
 
 			delegate_mail_subject = g_strdup_printf (_("You have been designated "



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]