[evolution-ews] Fix compilation errors in camel-utils and camel-ews-transport .
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Fix compilation errors in camel-utils and camel-ews-transport .
- Date: Thu, 8 Sep 2011 09:02:10 +0000 (UTC)
commit 94b7bdd591358832208c29b1b93c3481beeca751
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Thu Sep 8 12:56:20 2011 +0530
Fix compilation errors in camel-utils and camel-ews-transport .
src/camel/camel-ews-transport.c | 12 ++++++++----
src/camel/camel-ews-utils.c | 13 ++++++++++---
2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/src/camel/camel-ews-transport.c b/src/camel/camel-ews-transport.c
index 5746f9f..a1a79c2 100644
--- a/src/camel/camel-ews-transport.c
+++ b/src/camel/camel-ews-transport.c
@@ -53,14 +53,16 @@ static gchar *
ews_transport_get_name (CamelService *service,
gboolean brief)
{
+ CamelURL *url = camel_service_get_camel_url (service);
+
if (brief)
return g_strdup_printf (
_("Exchange server %s"),
- service->url->host);
+ url->host);
else
return g_strdup_printf (
_("Exchange mail delivery via %s"),
- service->url->host);
+ url->host);
}
static gboolean
@@ -75,12 +77,14 @@ ews_send_to_sync (CamelTransport *transport,
CamelService *service;
EEwsConnection *cnc;
const gchar *host_url;
+ CamelURL *url;
gboolean res;
service = CAMEL_SERVICE (transport);
- host_url = camel_url_get_param (service->url, "hosturl");
+ url = camel_service_get_camel_url (service);
+ host_url = camel_url_get_param (url, "hosturl");
- cnc = e_ews_connection_find (host_url, service->url->user);
+ cnc = e_ews_connection_find (host_url, url->user);
if (!cnc) {
g_set_error (error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_NOT_CONNECTED,
diff --git a/src/camel/camel-ews-utils.c b/src/camel/camel-ews-utils.c
index fb44036..338d271 100644
--- a/src/camel/camel-ews-utils.c
+++ b/src/camel/camel-ews-utils.c
@@ -293,8 +293,10 @@ camel_ews_utils_build_folder_info (CamelEwsStore *store, const gchar *fid)
CamelEwsStoreSummary *ews_summary = store->summary;
CamelFolderInfo *fi;
gchar *url;
+ CamelURL *curl;
- url = camel_url_to_string (CAMEL_SERVICE (store)->url,
+ curl = camel_service_get_camel_url (CAMEL_SERVICE (store));
+ url = camel_url_to_string (curl,
(CAMEL_URL_HIDE_PASSWORD|
CAMEL_URL_HIDE_PARAMS|
CAMEL_URL_HIDE_AUTH) );
@@ -310,9 +312,14 @@ camel_ews_utils_build_folder_info (CamelEwsStore *store, const gchar *fid)
fi = camel_folder_info_new ();
fi->full_name = camel_ews_store_summary_get_folder_full_name (ews_summary,
fid, NULL);
+#if ! EDS_CHECK_VERSION(3,1,0)
fi->name = camel_ews_store_summary_get_folder_name (ews_summary,
fid, NULL);
fi->uri = g_strconcat (url, fi->full_name, NULL);
+#else
+ fi->display_name = camel_ews_store_summary_get_folder_name (ews_summary, fid, NULL);
+#endif
+
fi->flags = camel_ews_store_summary_get_folder_flags (ews_summary,
fid, NULL);
fi->unread = camel_ews_store_summary_get_folder_unread (ews_summary,
@@ -371,7 +378,7 @@ sync_deleted_folders (CamelEwsStore *store, GSList *deleted_folders)
g_clear_error (&error);
} else {
struct remove_esrc_data *remove_data = g_new0(struct remove_esrc_data, 1);
- CamelURL *url = CAMEL_SERVICE (store)->url;
+ CamelURL *url = camel_service_get_camel_url (CAMEL_SERVICE (store));
remove_data->fid = g_strdup (fid);
remove_data->account_name = g_strdup (camel_url_get_param (url, "email"));
@@ -572,7 +579,7 @@ sync_created_folders (CamelEwsStore *ews_store, GSList *created_folders)
ftype == EWS_FOLDER_TYPE_TASKS ||
ftype == EWS_FOLDER_TYPE_CONTACTS) {
struct add_esrc_data *add_data = g_new0 (struct add_esrc_data, 1);
- CamelURL *url = CAMEL_SERVICE (ews_store)->url;
+ CamelURL *url = camel_service_get_camel_url (CAMEL_SERVICE (ews_store));
add_data->folder = g_object_ref (folder);
add_data->account_uri = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]