evolution-exchange r1543 - in trunk: . addressbook calendar mail
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-exchange r1543 - in trunk: . addressbook calendar mail
- Date: Thu, 17 Jan 2008 14:54:55 +0000 (GMT)
Author: danw
Date: Thu Jan 17 14:54:55 2008
New Revision: 1543
URL: http://svn.gnome.org/viewvc/evolution-exchange?rev=1543&view=rev
Log:
* addressbook/e-book-backend-exchange.c:
* calendar/e-cal-backend-exchange-calendar.c:
* calendar/e-cal-backend-exchange-tasks.c:
* mail/mail-stub-exchange.c: Update for libsoup 2.4, and related
libexchange changes.
Modified:
trunk/ChangeLog
trunk/addressbook/e-book-backend-exchange.c
trunk/calendar/e-cal-backend-exchange-calendar.c
trunk/calendar/e-cal-backend-exchange-tasks.c
trunk/configure.in
trunk/mail/mail-stub-exchange.c
Modified: trunk/addressbook/e-book-backend-exchange.c
==============================================================================
--- trunk/addressbook/e-book-backend-exchange.c (original)
+++ trunk/addressbook/e-book-backend-exchange.c Thu Jan 17 14:54:55 2008
@@ -318,15 +318,16 @@
e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
{
EContact *contact;
- char *data, *body;
+ char *data;
const char *filename;
E2kHTTPStatus status;
+ SoupBuffer *response;
CamelStream *stream;
CamelMimeMessage *msg;
CamelDataWrapper *content;
CamelMultipart *multipart;
CamelMimePart *part;
- int i, len;
+ int i;
contact = e_contact_new ();
@@ -363,13 +364,14 @@
/* Fetch the body and parse out the photo */
status = e2k_context_get (be->priv->ctx, NULL, result->href,
- NULL, &body, &len);
+ NULL, &response);
if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
g_warning ("e_contact_from_props: %d", status);
return contact;
}
- stream = camel_stream_mem_new_with_buffer (body, len);
+ stream = camel_stream_mem_new_with_buffer (response->data, response->length);
+ soup_buffer_free (response);
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
camel_object_unref (stream);
Modified: trunk/calendar/e-cal-backend-exchange-calendar.c
==============================================================================
--- trunk/calendar/e-cal-backend-exchange-calendar.c (original)
+++ trunk/calendar/e-cal-backend-exchange-calendar.c Thu Jan 17 14:54:55 2008
@@ -315,7 +315,6 @@
E2kResultIter *iter;
E2kResult *result;
const char *prop, *uid, *modtime, *attach_prop, *receipts;
- char *body;
guint status;
E2kContext *ctx;
int i, status_tracking = EX_NO_RECEIPTS;
@@ -502,18 +501,19 @@
return SOUP_STATUS_CANT_CONNECT;
}
for (i = 0; i < hrefs->len; i++) {
- int length;
+ SoupBuffer *response;
status = e2k_context_get (ctx, NULL, hrefs->pdata[i],
- NULL, &body, &length);
+ NULL, &response);
if (!SOUP_STATUS_IS_SUCCESSFUL (status))
continue;
modtime = g_hash_table_lookup (modtimes, hrefs->pdata[i]);
uid = g_hash_table_lookup (attachments, hrefs->pdata[i]);
- add_ical (cbex, hrefs->pdata[i], modtime, uid, body, length, 0);
- g_free (body);
+ add_ical (cbex, hrefs->pdata[i], modtime, uid,
+ response->data, response->length, 0);
+ soup_buffer_free (response);
}
for (i = 0; i < hrefs->len; i++)
@@ -2193,8 +2193,7 @@
char *start_str, *end_str;
GList *l;
GString *uri;
- char *body;
- int len;
+ SoupBuffer *response;
E2kHTTPStatus http_status;
icaltimezone *utc = icaltimezone_get_utc_timezone ();
xmlNode *recipients, *item;
@@ -2229,14 +2228,14 @@
g_free (end_str);
http_status = e2k_context_get_owa (exchange_account_get_context (cbex->account),
- NULL, uri->str, TRUE, &body, &len);
+ NULL, uri->str, TRUE, &response);
g_string_free (uri, TRUE);
if (http_status != E2K_HTTP_OK)
return GNOME_Evolution_Calendar_OtherError;
/* Parse the XML free/busy response */
- doc = e2k_parse_xml (body, len);
- g_free (body);
+ doc = e2k_parse_xml (response->data, response->length);
+ soup_buffer_free (response);
if (!doc)
return GNOME_Evolution_Calendar_OtherError;
Modified: trunk/calendar/e-cal-backend-exchange-tasks.c
==============================================================================
--- trunk/calendar/e-cal-backend-exchange-tasks.c (original)
+++ trunk/calendar/e-cal-backend-exchange-tasks.c Thu Jan 17 14:54:55 2008
@@ -573,7 +573,7 @@
E2kResult *result;
E2kContext *ctx;
const char *modtime, *str, *prop;
- char *uid, *body;
+ char *uid;
char *tzid;
int status, i, priority, percent;
float f_percent;
@@ -923,17 +923,17 @@
}
for (i = 0; i < hrefs->len; i++) {
- int length;
+ SoupBuffer *response;
status = e2k_context_get (ctx, NULL, hrefs->pdata[i],
- NULL, &body, &length);
+ NULL, &response);
if (!SOUP_STATUS_IS_SUCCESSFUL (status))
continue;
uid = g_hash_table_lookup (attachments, hrefs->pdata[i]);
e_cal_backend_exchange_cache_lock (cbex);
/* Fetch component from cache and update it */
ecalbexcomp = get_exchange_comp (cbex, uid);
- attachment_list = get_attachment (cbex, uid, body, length);
+ attachment_list = get_attachment (cbex, uid, response->data, response->length);
if (attachment_list) {
ecomp = e_cal_component_new ();
e_cal_component_set_icalcomponent (ecomp, icalcomponent_new_clone (ecalbexcomp->icomp));
@@ -945,7 +945,7 @@
g_slist_free (attachment_list);
}
e_cal_backend_exchange_cache_unlock (cbex);
- g_free (body);
+ soup_buffer_free (response);
}
for (i = 0; i < hrefs->len; i++)
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Thu Jan 17 14:54:55 2008
@@ -12,6 +12,7 @@
m4_define([libglade_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libgnomeui_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libxml_minimum_version], [2.0.0]) # XXX Just a Guess
+m4_define([libsoup_minimum_version], [2.3.0])
AM_CONFIG_HEADER(config.h)
@@ -104,7 +105,8 @@
libbonobo-2.0 >= libbonobo_minimum_version
libglade-2.0 >= libglade_minimum_version
libgnomeui-2.0 >= libgnomeui_minimum_version
- libxml-2.0 >= libxml_minimum_version])
+ libxml-2.0 >= libxml_minimum_version
+ libsoup-2.4 >= libsoup_minimum_version])
dnl *************************
dnl CFLAGS and LIBS and stuff
@@ -182,21 +184,11 @@
PKG_CHECK_MODULES(MAIL, libecal-$EDS_API_VERSION)
AC_SUBST(MAIL_CFLAGS)
-dnl Adding a manual detection check for libsoup, since evolution still has not
-dnl yet decided to use which version of libsoup it would be using. This check
-dnl needs to be removed once evolution is fixed to use one version of libsoup
-PKG_CHECK_MODULES(SOUP, libsoup-2.4, have_libsoup_24="yes", have_libsoup_24="no")
-if test $have_libsoup_24 = yes; then
- LIBSOUP_VERSION=2.4
-else
- LIBSOUP_VERSION=2.2
-fi
-
-PKG_CHECK_MODULES(EXCHANGE_STORAGE, evolution-shell evolution-plugin libedataserverui-$EDS_API_VERSION libedata-book-$EDS_API_VERSION libedata-cal-$EDS_API_VERSION libsoup-$LIBSOUP_VERSION libglade-2.0 camel-provider-$EDS_API_VERSION)
+PKG_CHECK_MODULES(EXCHANGE_STORAGE, evolution-shell evolution-plugin libedataserverui-$EDS_API_VERSION libedata-book-$EDS_API_VERSION libedata-cal-$EDS_API_VERSION libsoup-2.4 libglade-2.0 camel-provider-$EDS_API_VERSION)
AC_SUBST(EXCHANGE_STORAGE_CFLAGS)
AC_SUBST(EXCHANGE_STORAGE_LIBS)
-PKG_CHECK_MODULES(LIBEXCHANGE, libsoup-$LIBSOUP_VERSION evolution-shell libedataserverui-$EDS_API_VERSION libexchange-storage-$EDS_API_VERSION)
+PKG_CHECK_MODULES(LIBEXCHANGE, libsoup-2.4 evolution-shell libedataserverui-$EDS_API_VERSION libexchange-storage-$EDS_API_VERSION)
AC_SUBST(LIBEXCHANGE_CFLAGS)
AC_SUBST(LIBEXCHANGE_LIBS)
Modified: trunk/mail/mail-stub-exchange.c
==============================================================================
--- trunk/mail/mail-stub-exchange.c (original)
+++ trunk/mail/mail-stub-exchange.c Thu Jan 17 14:54:55 2008
@@ -2422,8 +2422,13 @@
&body, &len);
content_type = g_strdup ("message/rfc822");
} else {
+ SoupBuffer *response;
+
status = e2k_context_get (mse->ctx, NULL, mmsg->href,
- &content_type, &body, &len);
+ &content_type, &response);
+ len = response->length;
+ body = g_strndup (response->data, response->length);
+ soup_buffer_free (response);
}
if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status))
goto error;
@@ -2895,10 +2900,10 @@
msg = e2k_soup_message_new_full (mse->ctx, mse->mail_submission_uri,
SOUP_METHOD_PUT, "message/rfc821",
- SOUP_BUFFER_SYSTEM_OWNED,
+ SOUP_MEMORY_TAKE,
data->str, data->len);
g_string_free (data, FALSE);
- soup_message_add_header (msg->request_headers, "Saveinsent", "f");
+ soup_message_headers_append (msg->request_headers, "Saveinsent", "f");
status = e2k_context_send_message (mse->ctx, NULL, msg);
if (E2K_HTTP_STATUS_IS_SUCCESSFUL (status))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]