[evolution-exchange] Do not use deprecated EBook/ECal API



commit f1a647ce1ead9a2b2a4363e4f4897e70a4af54b6
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 14 08:56:06 2011 +0200

    Do not use deprecated EBook/ECal API

 calendar/e-cal-backend-exchange-calendar.c |   18 +++++++++---------
 calendar/e-cal-backend-exchange.c          |    1 +
 calendar/e-cal-backend-exchange.h          |    1 +
 configure.ac                               |    6 ++----
 eplugin/exchange-calendar.c                |   14 +++++++-------
 eplugin/exchange-contacts.c                |    4 ++--
 6 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/calendar/e-cal-backend-exchange-calendar.c b/calendar/e-cal-backend-exchange-calendar.c
index 4be6879..78d87c6 100644
--- a/calendar/e-cal-backend-exchange-calendar.c
+++ b/calendar/e-cal-backend-exchange-calendar.c
@@ -257,11 +257,11 @@ add_ical (ECalBackendExchange *cbex, const gchar *href, const gchar *lastmod,
 	}
 
 	/* map time zones against system time zones and handle conflicting definitions */
-	if (!e_cal_check_timezones (icalcomp,
-				    NULL,
-				    e_cal_backend_exchange_lookup_timezone,
-				    cbex,
-				    &error)) {
+	if (!e_cal_client_check_timezones (icalcomp,
+					   NULL,
+					   e_cal_backend_exchange_lookup_timezone,
+					   cbex, NULL,
+					   &error)) {
 		g_warning ("checking timezones failed: %s", error->message);
 		g_clear_error (&error);
 		retval = FALSE;
@@ -1649,10 +1649,10 @@ receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancella
 
 	/* map time zones against system time zones and handle conflicting definitions */
 	if (icalcomp &&
-	    !e_cal_check_timezones (icalcomp,
+	    !e_cal_client_check_timezones (icalcomp,
 				    comps,
 				    e_cal_backend_exchange_lookup_timezone,
-				    cbex,
+				    cbex, NULL,
 				    &err)) {
 		g_propagate_error (error, EDC_ERROR_EX (InvalidObject, err->message));
 		g_warning ("checking timezones failed: %s", err->message);
@@ -2100,10 +2100,10 @@ send_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable
 
 	/* map time zones against system time zones and handle conflicting definitions */
 	if (top_level &&
-	    !e_cal_check_timezones (top_level,
+	    !e_cal_client_check_timezones (top_level,
 				    NULL,
 				    e_cal_backend_exchange_lookup_timezone,
-				    cbex,
+				    cbex, NULL,
 				    &err)) {
 		g_warning ("checking timezones failed: %s", err->message);
 		g_propagate_error (error, EDC_ERROR_EX (OtherError, err->message));
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index 0e75bfe..ebdcafc 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -1956,6 +1956,7 @@ internal_get_timezone (ECalBackend *backend, const gchar *tzid)
 icaltimezone *
 e_cal_backend_exchange_lookup_timezone (const gchar *tzid,
 					gconstpointer custom,
+					GCancellable *cancellable,
 					GError **error)
 {
 	icaltimezone *zone = internal_get_timezone (E_CAL_BACKEND ((ECalBackendExchange *) custom), tzid);
diff --git a/calendar/e-cal-backend-exchange.h b/calendar/e-cal-backend-exchange.h
index 74e1e54..3862a52 100644
--- a/calendar/e-cal-backend-exchange.h
+++ b/calendar/e-cal-backend-exchange.h
@@ -86,6 +86,7 @@ gchar *	  e_cal_backend_exchange_make_timestamp_rfc822	(time_t when);
 icaltimezone *
 e_cal_backend_exchange_lookup_timezone (const gchar *tzid,
 					gconstpointer custom,
+					GCancellable *cancellable,
 					GError **error);
 
 ECalBackendExchangeComponent * get_exchange_comp (ECalBackendExchange *cbex,
diff --git a/configure.ac b/configure.ac
index 4df082b..d3e408c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,8 @@ AS_COMPILER_FLAGS(WARNING_FLAGS,
 	-DG_DISABLE_SINGLE_INCLUDES
 	-DGTK_DISABLE_SINGLE_INCLUDES
 	-DGSEAL_ENABLE
+	-DE_BOOK_DISABLE_DEPRECATED
+	-DE_CAL_DISABLE_DEPRECATED
 	-Wall -Wextra
 	-Wno-missing-field-initializers
 	-Wno-sign-compare
@@ -53,10 +55,6 @@ AS_COMPILER_FLAGS(WARNING_FLAGS,
 	-Wredundant-decls -Wundef -Wwrite-strings")
 AC_SUBST(WARNING_FLAGS)
 
-dnl Disable these later
-dnl	-DE_BOOK_DISABLE_DEPRECATED
-dnl	-DE_CAL_DISABLE_DEPRECATED
-dnl
 dnl Other useful compiler warnings for test builds only.
 dnl These may produce warnings we have no control over,
 dnl or false positives we don't always want to see.
diff --git a/eplugin/exchange-calendar.c b/eplugin/exchange-calendar.c
index 37ea2fe..04754d7 100644
--- a/eplugin/exchange-calendar.c
+++ b/eplugin/exchange-calendar.c
@@ -28,7 +28,7 @@
 #include <libedataserver/e-url.h>
 #include <e-folder.h>
 #include <exchange-account.h>
-#include <libecal/e-cal.h>
+#include <libecal/e-cal-client.h>
 
 #include "calendar/gui/dialogs/calendar-setup.h"
 #include "mail/em-account-editor.h"
@@ -48,7 +48,7 @@ enum {
 gboolean calendar_src_exists = FALSE;
 gchar *calendar_old_source_uri = NULL;
 
-static GPtrArray *e_exchange_calendar_get_calendars (ECalSourceType ftype);
+static GPtrArray *e_exchange_calendar_get_calendars (ECalClientSourceType ftype);
 void e_exchange_calendar_pcalendar_on_change (GtkTreeView *treeview, ESource *source);
 GtkWidget *e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data);
 gboolean e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data);
@@ -56,7 +56,7 @@ void e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target);
 
 /* FIXME: Reconsider the prototype of this function */
 static GPtrArray *
-e_exchange_calendar_get_calendars (ECalSourceType ftype)
+e_exchange_calendar_get_calendars (ECalClientSourceType ftype)
 {
 	ExchangeAccount *account;
 	GPtrArray *folder_array;
@@ -69,10 +69,10 @@ e_exchange_calendar_get_calendars (ECalSourceType ftype)
 	gchar *tstring;
 
 	/* FIXME: Compiler warns here; review needed */
-	if (ftype == E_CAL_SOURCE_TYPE_EVENT) { /* Calendars */
+	if (ftype == E_CAL_CLIENT_SOURCE_TYPE_EVENTS) { /* Calendars */
 		tstring = g_strdup ("calendar");
 	}
-	else if (ftype == E_CAL_SOURCE_TYPE_TODO) { /* Tasks */
+	else if (ftype == E_CAL_CLIENT_SOURCE_TYPE_TASKS) { /* Tasks */
 		tstring = g_strdup ("tasks");
 	}
 	else {
@@ -419,10 +419,10 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
 	g_free (path_prefix);
 
 	/* FIXME: Compiler gives a warning here; review needed */
-	if (t->source_type == E_CAL_SOURCE_TYPE_EVENT) {
+	if (t->source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS) {
 		ftype = g_strdup ("calendar");
 	}
-	else if (t->source_type == E_CAL_SOURCE_TYPE_TODO) {
+	else if (t->source_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS) {
 		ftype = g_strdup ("tasks");
 	}
 	else {
diff --git a/eplugin/exchange-contacts.c b/eplugin/exchange-contacts.c
index 04ece23..a7a29d9 100644
--- a/eplugin/exchange-contacts.c
+++ b/eplugin/exchange-contacts.c
@@ -30,8 +30,8 @@
 #include <e-folder.h>
 #include <exchange-account.h>
 
-#include <libebook/e-book.h>
-#include <libecal/e-cal.h>
+#include <libebook/e-book-client.h>
+#include <libecal/e-cal-client.h>
 #include <addressbook/gui/widgets/eab-config.h>
 
 #include "mail/em-account-editor.h"



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