[evolution-kolab] Adapt to Evolution-Data-Server 3.7 API changes.



commit 68ff5dac89d7d9b4dee3ebe56689254912ca5d01
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Jan 8 09:28:56 2013 -0500

    Adapt to Evolution-Data-Server 3.7 API changes.

 configure.ac                                    |    2 +-
 docs/manuals/INSTALL-notes                      |    1 -
 src/addressbook/e-book-backend-kolab.c          |   63 +++------------------
 src/calendar/e-cal-backend-kolab.c              |   68 ++--------------------
 src/configuration/e-book-config-kolab.c         |    2 -
 src/configuration/e-book-config-kolab.h         |    2 +-
 src/configuration/e-cal-config-kolab.c          |    2 -
 src/configuration/e-cal-config-kolab.h          |    2 +-
 src/configuration/e-mail-config-kolab-backend.c |    2 +-
 src/eplugin/e-kolab-backend-sync-conflict.h     |    2 -
 src/eplugin/e-kolab-folder-metadata.h           |    2 +-
 src/eplugin/e-kolab-folder-permissions.c        |    3 +-
 src/eplugin/e-kolab-folder-permissions.h        |    2 +-
 src/eplugin/e-kolab-plugin-ui.c                 |    5 --
 src/eplugin/e-kolab-plugin-ui.h                 |    2 -
 src/eplugin/e-kolab-plugin-util.c               |    2 -
 src/eplugin/e-kolab-plugin-util.h               |    3 +-
 src/eplugin/e-kolab-plugin.h                    |    3 +-
 src/libekolab/camel-kolab-session.c             |    4 +-
 19 files changed, 27 insertions(+), 145 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3257c13..5bd4b5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,7 +69,7 @@ dnl ********************************
 dnl Check for evolution-data-server
 dnl ********************************
 PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0)
-PKG_CHECK_MODULES(EDS, libedata-book-1.2 libedata-cal-1.2 libedataserver-1.2 libical libedataserverui-3.0 libebackend-1.2)
+PKG_CHECK_MODULES(EDS, libedata-book-1.2 libedata-cal-1.2 libedataserver-1.2 libical libebackend-1.2)
 PKG_CHECK_MODULES(SQLITE, sqlite3)
 PKG_CHECK_MODULES(CAMEL, camel-1.2)
 PKG_CHECK_MODULES(GTK, gtk+-3.0)
diff --git a/docs/manuals/INSTALL-notes b/docs/manuals/INSTALL-notes
index c275e30..661be18 100644
--- a/docs/manuals/INSTALL-notes
+++ b/docs/manuals/INSTALL-notes
@@ -61,7 +61,6 @@ Build
    EDS			3.4			libedata-book1.2-dev,
    						libedata-cal1.2-dev,
    						libedataserver1.2-dev,
-   						libedataserverui1.2-dev,
    						libebackend1.2-dev,
    						evolution-data-server-dev
    Glib			2.30			libglib2.0-dev
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index defa727..a791140 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -221,19 +221,6 @@ book_backend_kolab_notify_opened (EBookBackendKolab *self,
 	return TRUE;
 }
 
-static void
-book_backend_kolab_notify_removed (EBookBackendKolab *self)
-{
-	EBookBackend *bbackend = NULL;
-
-	g_assert (E_IS_BOOK_BACKEND_KOLAB (self));
-
-	bbackend = E_BOOK_BACKEND (self);
-
-	e_book_backend_notify_readonly (bbackend, TRUE);
-	e_book_backend_notify_online (bbackend, FALSE);
-}
-
 /*----------------------------------------------------------------------------*/
 /* class functions */
 
@@ -353,39 +340,6 @@ book_backend_kolab_open (EBookBackendSync *backend,
 }
 
 static void
-book_backend_kolab_remove (EBookBackendSync *backend,
-                           EDataBook *book,
-                           GCancellable *cancellable,
-                           GError **error)
-{
-	EBookBackendKolab *self = NULL;
-	EBookBackendKolabPrivate *priv = NULL;
-	GError *tmp_err = NULL;
-	gboolean ok = FALSE;
-
-	g_return_if_fail (error == NULL || *error == NULL);
-	e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_KOLAB (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
-	e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
-	/* cancellable may be NULL */
-
-	self = E_BOOK_BACKEND_KOLAB (backend);
-	priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
-
-	if (priv->book_koma != NULL) {
-		ok = kolab_mail_access_shutdown (priv->book_koma,
-		                                 cancellable,
-		                                 &tmp_err);
-		if (ok) {
-			g_object_unref (priv->book_koma);
-			priv->book_koma = NULL;
-			book_backend_kolab_notify_removed (self);
-		} else {
-			g_propagate_error (error, tmp_err);
-		}
-	}
-}
-
-static void
 book_backend_kolab_refresh (EBookBackendSync *backend,
                             EDataBook *book,
                             GCancellable *cancellable,
@@ -924,11 +878,12 @@ book_backend_kolab_authenticate_user (EBookBackendSync *backend,
 #endif
 
 static void
-book_backend_kolab_start_book_view (EBookBackend *backend,
-                                    EDataBookView *book_view)
+book_backend_kolab_start_view (EBookBackend *backend,
+                               EDataBookView *book_view)
 {
 	EBookBackendKolab *self = NULL;
 	EBookBackendKolabPrivate *priv = NULL;
+	EBookBackendSExp *sexp;
 	GList *econtact_list = NULL;
 	GList *it = NULL;
 	const gchar *query = NULL;
@@ -953,7 +908,8 @@ book_backend_kolab_start_book_view (EBookBackend *backend,
 		goto exit;
 	}
 
-	query = e_data_book_view_get_card_query (book_view);
+	sexp = e_data_book_view_get_sexp (book_view);
+	query = e_book_backend_sexp_text (sexp);
 	foldername = kolab_util_backend_get_foldername (E_BACKEND (backend));
 
 	/* try to switch into online mode. if that fails,
@@ -1039,8 +995,8 @@ book_backend_kolab_start_book_view (EBookBackend *backend,
 }
 
 static void
-book_backend_kolab_stop_book_view (EBookBackend *backend,
-                                   EDataBookView *book_view)
+book_backend_kolab_stop_view (EBookBackend *backend,
+                              EDataBookView *book_view)
 {
 	g_return_if_fail (E_IS_BOOK_BACKEND_KOLAB (backend));
 	g_return_if_fail (E_IS_DATA_BOOK_VIEW (book_view));
@@ -1117,12 +1073,11 @@ e_book_backend_kolab_class_init (EBookBackendKolabClass *klass)
 	object_class->finalize = e_book_backend_kolab_finalize;
 
 	/* Backend parent class methods methods not covered in the sync backend part */
-	backend_class->start_book_view = book_backend_kolab_start_book_view;
-	backend_class->stop_book_view = book_backend_kolab_stop_book_view;
+	backend_class->start_view = book_backend_kolab_start_view;
+	backend_class->stop_view = book_backend_kolab_stop_view;
 
 	/* Sync backend class functions */
 	sync_class->open_sync = book_backend_kolab_open;
-	sync_class->remove_sync = book_backend_kolab_remove;
 	sync_class->refresh_sync = book_backend_kolab_refresh;
 	sync_class->get_backend_property_sync = book_backend_kolab_get_backend_property;
 	sync_class->create_contacts_sync = book_backend_kolab_create_contacts;
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 5e328a4..dfc43af 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -234,19 +234,6 @@ cal_backend_kolab_notify_opened (ECalBackendKolab *self,
 	return TRUE;
 }
 
-static void
-cal_backend_kolab_notify_removed (ECalBackendKolab *self)
-{
-	ECalBackend *cbackend = NULL;
-
-	g_assert (E_IS_CAL_BACKEND_KOLAB (self));
-
-	cbackend = E_CAL_BACKEND (self);
-
-	e_cal_backend_notify_readonly (cbackend, TRUE);
-	e_cal_backend_notify_online (cbackend, FALSE);
-}
-
 /*----------------------------------------------------------------------------*/
 /* class functions */
 
@@ -414,48 +401,6 @@ cal_backend_kolab_open (ECalBackendSync *backend,
 }
 
 static void
-cal_backend_kolab_remove (ECalBackendSync *backend,
-                          EDataCal *cal,
-                          GCancellable *cancellable,
-                          GError **error)
-{
-	ECalBackendKolab *self = NULL;
-	ECalBackendKolabPrivate *priv = NULL;
-	GError *tmp_err = NULL;
-	gboolean ok = FALSE;
-
-	g_return_if_fail (error == NULL || *error == NULL);
-	e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_KOLAB (backend), InvalidArg);
-	/* cancellable may be NULL */
-	e_return_data_cal_error_if_fail (E_IS_DATA_CAL (cal), InvalidArg);
-
-	self = E_CAL_BACKEND_KOLAB (backend);
-	priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
-
-	if (priv->cal_koma != NULL) {
-		ok = kolab_mail_access_shutdown (priv->cal_koma,
-		                                 cancellable,
-		                                 &tmp_err);
-		if (ok) {
-			g_object_unref (priv->cal_koma);
-			priv->cal_koma = NULL;
-		} else {
-			g_propagate_error (error, tmp_err);
-		}
-	}
-
-	if (priv->cal_cache != NULL) {
-		(void) e_file_cache_remove (E_FILE_CACHE (priv->cal_cache));
-		g_object_unref (priv->cal_cache);
-		priv->cal_cache = NULL;
-	}
-
-	if (ok) {
-		cal_backend_kolab_notify_removed (self);
-	}
-}
-
-static void
 cal_backend_kolab_refresh (ECalBackendSync *backend,
                            EDataCal *cal,
                            GCancellable *cancellable,
@@ -1216,10 +1161,10 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
 			id = g_new0 (ECalComponentId, 1);
 			id->uid = g_strdup (uid);
 			id->rid = g_strdup (rid);
-			e_cal_backend_notify_object_removed (E_CAL_BACKEND (backend),
-			                                     id,
-			                                     NULL,
-			                                     NULL);
+			e_cal_backend_notify_component_removed (E_CAL_BACKEND (backend),
+			                                        id,
+			                                        NULL,
+			                                        NULL);
 			g_free (id);
 			break;
 		default:
@@ -1710,6 +1655,7 @@ cal_backend_kolab_start_view (ECalBackend *backend,
 {
 	ECalBackendKolab *self = NULL;
 	ECalBackendKolabPrivate *priv = NULL;
+	ECalBackendSExp *sexp;
 	GList *uid_list = NULL;
 	GList *it = NULL;
 	GSList *iCal_objects = NULL;
@@ -1735,7 +1681,8 @@ cal_backend_kolab_start_view (ECalBackend *backend,
 		goto exit;
 	}
 
-	query = e_data_cal_view_get_text (view);
+	sexp = e_data_cal_view_get_sexp (view);
+	query = e_cal_backend_sexp_text (sexp);
 	foldername = kolab_util_backend_get_foldername (E_BACKEND (backend));
 
 	/* try to switch into online mode. if that fails,
@@ -1980,7 +1927,6 @@ e_cal_backend_kolab_class_init (ECalBackendKolabClass *klass)
 
 	/* Sync backend class functions */
 	sync_class->open_sync = cal_backend_kolab_open;
-	sync_class->remove_sync = cal_backend_kolab_remove;
 	sync_class->refresh_sync = cal_backend_kolab_refresh;
 	sync_class->get_backend_property_sync = cal_backend_kolab_get_backend_property;
 	sync_class->get_object_sync = cal_backend_kolab_get_object;
diff --git a/src/configuration/e-book-config-kolab.c b/src/configuration/e-book-config-kolab.c
index 1ccf8fe..458580d 100644
--- a/src/configuration/e-book-config-kolab.c
+++ b/src/configuration/e-book-config-kolab.c
@@ -16,8 +16,6 @@
 
 #include "e-book-config-kolab.h"
 
-#include <misc/e-book-source-config.h>
-
 G_DEFINE_DYNAMIC_TYPE (
 	EBookConfigKolab,
 	e_book_config_kolab,
diff --git a/src/configuration/e-book-config-kolab.h b/src/configuration/e-book-config-kolab.h
index 56ce94b..3b53ed1 100644
--- a/src/configuration/e-book-config-kolab.h
+++ b/src/configuration/e-book-config-kolab.h
@@ -17,7 +17,7 @@
 #ifndef E_BOOK_CONFIG_KOLAB_H
 #define E_BOOK_CONFIG_KOLAB_H
 
-#include <misc/e-source-config-backend.h>
+#include <e-util/e-util.h>
 
 /* Standard GObject macros */
 #define E_TYPE_BOOK_CONFIG_KOLAB \
diff --git a/src/configuration/e-cal-config-kolab.c b/src/configuration/e-cal-config-kolab.c
index d55db24..2cc1bb7 100644
--- a/src/configuration/e-cal-config-kolab.c
+++ b/src/configuration/e-cal-config-kolab.c
@@ -16,8 +16,6 @@
 
 #include "e-cal-config-kolab.h"
 
-#include <misc/e-cal-source-config.h>
-
 G_DEFINE_DYNAMIC_TYPE (
 	ECalConfigKolab,
 	e_cal_config_kolab,
diff --git a/src/configuration/e-cal-config-kolab.h b/src/configuration/e-cal-config-kolab.h
index f15f50e..3803287 100644
--- a/src/configuration/e-cal-config-kolab.h
+++ b/src/configuration/e-cal-config-kolab.h
@@ -17,7 +17,7 @@
 #ifndef E_CAL_CONFIG_KOLAB_H
 #define E_CAL_CONFIG_KOLAB_H
 
-#include <misc/e-source-config-backend.h>
+#include <e-util/e-util.h>
 
 /* Standard GObject macros */
 #define E_TYPE_CAL_CONFIG_KOLAB \
diff --git a/src/configuration/e-mail-config-kolab-backend.c b/src/configuration/e-mail-config-kolab-backend.c
index db5ac22..23eca9b 100644
--- a/src/configuration/e-mail-config-kolab-backend.c
+++ b/src/configuration/e-mail-config-kolab-backend.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #include <glib/gi18n-lib.h>
 
-#include <misc/e-port-entry.h>
+#include <e-util/e-util.h>
 
 #include <mail/e-mail-config-auth-check.h>
 #include <mail/e-mail-config-service-page.h>
diff --git a/src/eplugin/e-kolab-backend-sync-conflict.h b/src/eplugin/e-kolab-backend-sync-conflict.h
index 993c924..bae0685 100644
--- a/src/eplugin/e-kolab-backend-sync-conflict.h
+++ b/src/eplugin/e-kolab-backend-sync-conflict.h
@@ -31,8 +31,6 @@
 
 /*----------------------------------------------------------------------------*/
 
-#include <e-util/e-config.h>
-#include <e-util/e-plugin.h>
 #include <shell/e-shell-view.h>
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/eplugin/e-kolab-folder-metadata.h b/src/eplugin/e-kolab-folder-metadata.h
index 852863e..b5b6abc 100644
--- a/src/eplugin/e-kolab-folder-metadata.h
+++ b/src/eplugin/e-kolab-folder-metadata.h
@@ -34,8 +34,8 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
+#include <e-util/e-util.h>
 #include <shell/e-shell-view.h>
-#include <misc/e-alert-bar.h>
 
 #include <libekolab/kolab-data-folder-metadata.h>
 
diff --git a/src/eplugin/e-kolab-folder-permissions.c b/src/eplugin/e-kolab-folder-permissions.c
index 3e97903..10f1185 100644
--- a/src/eplugin/e-kolab-folder-permissions.c
+++ b/src/eplugin/e-kolab-folder-permissions.c
@@ -30,8 +30,7 @@
 
 #include <glib/gi18n-lib.h>
 
-#include <e-util/e-config.h>
-#include <e-util/e-plugin.h>
+#include <e-util/e-util.h>
 
 #include <libekolab/camel-kolab-imapx-store.h>
 
diff --git a/src/eplugin/e-kolab-folder-permissions.h b/src/eplugin/e-kolab-folder-permissions.h
index 61d6c72..4665820 100644
--- a/src/eplugin/e-kolab-folder-permissions.h
+++ b/src/eplugin/e-kolab-folder-permissions.h
@@ -34,8 +34,8 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
+#include <e-util/e-util.h>
 #include <shell/e-shell-view.h>
-#include <misc/e-alert-bar.h>
 
 #include <libekolab/kolab-data-folder-permissions.h>
 #include <libekolab/kolab-data-imap-account.h>
diff --git a/src/eplugin/e-kolab-plugin-ui.c b/src/eplugin/e-kolab-plugin-ui.c
index b9e5bd4..bb31f8f 100644
--- a/src/eplugin/e-kolab-plugin-ui.c
+++ b/src/eplugin/e-kolab-plugin-ui.c
@@ -31,11 +31,6 @@
 #include <glib/gi18n-lib.h>
 
 #include <e-util/e-util.h>
-#include <e-util/e-dialog-utils.h>
-#include <e-util/e-plugin-ui.h>
-
-#include <libevolution-utils/e-alert.h>
-#include <misc/e-alert-bar.h>
 
 #include <libekolabutil/kolab-util-folder.h>
 
diff --git a/src/eplugin/e-kolab-plugin-ui.h b/src/eplugin/e-kolab-plugin-ui.h
index c2f2cd5..f1cb2d0 100644
--- a/src/eplugin/e-kolab-plugin-ui.h
+++ b/src/eplugin/e-kolab-plugin-ui.h
@@ -34,8 +34,6 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
-#include <e-util/e-config.h>
-#include <e-util/e-plugin.h>
 #include <shell/e-shell-view.h>
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/eplugin/e-kolab-plugin-util.c b/src/eplugin/e-kolab-plugin-util.c
index 428e6ea..95ad553 100644
--- a/src/eplugin/e-kolab-plugin-util.c
+++ b/src/eplugin/e-kolab-plugin-util.c
@@ -36,8 +36,6 @@
 #include <shell/e-shell-sidebar.h>
 #include <shell/e-shell-window.h>
 
-#include <libedataserverui/libedataserverui.h>
-
 #include <libekolab/e-source-kolab-folder.h>
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-error.h>
diff --git a/src/eplugin/e-kolab-plugin-util.h b/src/eplugin/e-kolab-plugin-util.h
index c206a4f..48e6129 100644
--- a/src/eplugin/e-kolab-plugin-util.h
+++ b/src/eplugin/e-kolab-plugin-util.h
@@ -34,8 +34,7 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
-#include <libevolution-utils/e-alert.h>
-#include <misc/e-alert-bar.h>
+#include <e-util/e-util.h>
 #include <shell/e-shell-view.h>
 
 #include <libekolab/camel-kolab-imapx-store.h>
diff --git a/src/eplugin/e-kolab-plugin.h b/src/eplugin/e-kolab-plugin.h
index 4b1edcf..b47dcd7 100644
--- a/src/eplugin/e-kolab-plugin.h
+++ b/src/eplugin/e-kolab-plugin.h
@@ -34,8 +34,7 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
-#include <e-util/e-config.h>
-#include <e-util/e-plugin.h>
+#include <e-util/e-util.h>
 #include <shell/e-shell-view.h>
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/libekolab/camel-kolab-session.c b/src/libekolab/camel-kolab-session.c
index 0e501dd..0bbc20c 100644
--- a/src/libekolab/camel-kolab-session.c
+++ b/src/libekolab/camel-kolab-session.c
@@ -43,7 +43,6 @@
 #include <pk11func.h>
 #include <prtypes.h>
 
-#include <libedataserverui/libedataserverui.h>
 #include <libemail-engine/e-mail-authenticator.h>
 
 /* Kolab error reporting */
@@ -316,7 +315,8 @@ static gint
 kolab_session_alert_user (CamelSession *session,
                           CamelSessionAlertType type,
                           const gchar *prompt,
-                          GSList *button_captions)
+                          GSList *button_captions,
+                          GCancellable *cancellable)
 {
 	gint rval = -1;
 



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