[evolution-data-server/wip/mcrha/libical-glib: 2/3] Initial changes in libical-glib usage



commit 62919f2e6b60143a43d924f10eca0e7703e570c1
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jan 8 22:43:05 2019 +0100

    Initial changes in libical-glib usage
    
    Mostly removal of:
    - deprecated code
    - obsolete code
    - unneeded configure checks
    - #include changes to use libical-glib instead of libical
    
    Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/33

 CMakeLists.txt                                     |   63 +-
 config.h.in                                        |   12 -
 po/POTFILES.in                                     |    1 -
 src/calendar/libecal/CMakeLists.txt                |    9 +-
 src/calendar/libecal/e-cal-check-timezones.c       |  341 +--
 src/calendar/libecal/e-cal-check-timezones.h       |   20 +-
 src/calendar/libecal/e-cal-client-view.c           |   30 -
 src/calendar/libecal/e-cal-client-view.h           |    5 -
 src/calendar/libecal/e-cal-client.c                |   62 -
 src/calendar/libecal/e-cal-client.h                |    8 -
 src/calendar/libecal/e-cal-component.c             |   16 -
 src/calendar/libecal/e-cal-component.h             |    6 +-
 src/calendar/libecal/e-cal-recur.c                 |   44 +-
 src/calendar/libecal/e-cal-recur.h                 |   14 +-
 src/calendar/libecal/e-cal-system-timezone.c       |    2 +
 src/calendar/libecal/e-cal-system-timezone.h       |    2 +-
 src/calendar/libecal/e-cal-time-util.h             |    2 +-
 src/calendar/libecal/e-cal-types.h                 |  126 --
 src/calendar/libecal/e-cal-util.h                  |   17 +-
 src/calendar/libecal/e-cal-view-private.h          |   37 -
 src/calendar/libecal/e-cal-view.c                  |  383 ----
 src/calendar/libecal/e-cal-view.h                  |   93 -
 src/calendar/libecal/e-cal.c                       | 2346 --------------------
 src/calendar/libecal/e-cal.h                       |  269 ---
 src/calendar/libecal/e-timezone-cache.h            |    2 +-
 src/calendar/libecal/libecal.h                     |    3 +-
 src/calendar/libecal/libecal.pc.in                 |    6 +-
 src/calendar/libedata-cal/CMakeLists.txt           |    6 +-
 src/calendar/libedata-cal/e-cal-backend-cache.c    |  735 ------
 src/calendar/libedata-cal/e-cal-backend-cache.h    |  127 --
 src/calendar/libedata-cal/e-cal-backend-factory.h  |    2 +-
 src/calendar/libedata-cal/e-cal-backend-sexp.c     |    2 -
 src/calendar/libedata-cal/e-cal-backend-store.c    |   48 +
 src/calendar/libedata-cal/e-cal-backend-store.h    |    3 +
 src/calendar/libedata-cal/e-cal-backend-sync.h     |   13 +-
 src/calendar/libedata-cal/e-cal-backend.c          |   51 -
 src/calendar/libedata-cal/e-cal-backend.h          |    8 +-
 src/calendar/libedata-cal/e-cal-cache.c            |    2 -
 src/calendar/libedata-cal/e-data-cal-factory.c     |   63 +-
 src/calendar/libedata-cal/e-data-cal.c             |    2 +-
 .../libedata-cal/e-subprocess-cal-factory.c        |   61 -
 src/calendar/libedata-cal/libedata-cal.h           |    1 -
 src/calendar/libedata-cal/libedata-cal.pc.in       |    4 +-
 src/camel/providers/imapx/camel-imapx-server.c     |    2 +-
 src/libedataserverui/libedataserverui.pc.in        |    2 +-
 .../evolution-calendar-factory.c                   |    8 +-
 tests/libecal/CMakeLists.txt                       |  107 +-
 tests/libecal/client/CMakeLists.txt                |   50 -
 tests/libecal/ecal-test-utils.c                    |  572 -----
 tests/libecal/ecal-test-utils.h                    |  126 --
 .../{client => }/test-cal-client-add-timezone.c    |    1 -
 .../{client => }/test-cal-client-bulk-methods.c    |    1 -
 .../{client => }/test-cal-client-create-object.c   |    1 -
 .../test-cal-client-get-attachment-uris.c          |    1 -
 .../{client => }/test-cal-client-get-free-busy.c   |    1 -
 .../{client => }/test-cal-client-get-object-list.c |    1 -
 .../{client => }/test-cal-client-get-revision.c    |    0
 .../{client => }/test-cal-client-get-view.c        |    1 -
 .../{client => }/test-cal-client-modify-object.c   |    1 -
 .../{client => }/test-cal-client-receive-objects.c |    1 -
 .../libecal/{client => }/test-cal-client-refresh.c |    1 -
 .../{client => }/test-cal-client-remove-object.c   |    1 -
 .../{client => }/test-cal-client-revision-view.c   |    1 -
 .../{client => }/test-cal-client-send-objects.c    |    1 -
 tests/libecal/test-ecal-add-timezone.c             |   78 -
 tests/libecal/test-ecal-create-object--2.c         |   74 -
 tests/libecal/test-ecal-create-object.c            |   69 -
 tests/libecal/test-ecal-get-alarm-email-address.c  |   56 -
 tests/libecal/test-ecal-get-cal-address.c          |   56 -
 tests/libecal/test-ecal-get-capabilities.c         |   52 -
 tests/libecal/test-ecal-get-default-object.c       |   60 -
 tests/libecal/test-ecal-get-free-busy.c            |  134 --
 tests/libecal/test-ecal-get-ldap-attribute.c       |   62 -
 tests/libecal/test-ecal-get-object-list.c          |   83 -
 tests/libecal/test-ecal-get-objects-for-uid.c      |   82 -
 tests/libecal/test-ecal-get-query.c                |  219 --
 tests/libecal/test-ecal-get-timezone.c             |   59 -
 tests/libecal/test-ecal-modify-object.c            |   98 -
 tests/libecal/test-ecal-receive-objects.c          |   67 -
 tests/libecal/test-ecal-recur-description.c        |  216 --
 tests/libecal/test-ecal-remove-object.c            |   70 -
 tests/libecal/test-ecal-send-objects.c             |   76 -
 tests/libecal/test-ecal-set-default-timezone.c     |   82 -
 tests/libedata-cal/test-cal-meta-backend.c         |    4 -
 tests/libedata-cal/test-intervaltree.c             |    1 -
 tests/test-server-utils/e-test-server-utils.c      |   36 -
 tests/test-server-utils/e-test-server-utils.h      |   11 +-
 tests/test-server-utils/test-fixture.c             |   16 -
 88 files changed, 115 insertions(+), 7573 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 141cb843c..8db800bc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,9 @@ set(BASE_VERSION 3.32)
 # library names for backward compatibility.
 set(API_VERSION 1.2)
 
+# API version of the calendar part
+set(CAL_API_VERSION 2.0)
+
 # Required for FindIntltool module
 set(GETTEXT_PACKAGE ${PROJECT_NAME})
 set(GETTEXT_PO_DIR ${CMAKE_SOURCE_DIR}/po)
@@ -38,7 +41,7 @@ set(PROJECT_DISTCONFIGURE_PARAMS
 # ******************************
 # Actual name can be modified with DBUS_SERVICES_PREFIX option
 set(ADDRESS_BOOK_DBUS_SERVICE_NAME     "org.gnome.evolution.dataserver.AddressBook9")
-set(CALENDAR_DBUS_SERVICE_NAME         "org.gnome.evolution.dataserver.Calendar7")
+set(CALENDAR_DBUS_SERVICE_NAME         "org.gnome.evolution.dataserver.Calendar8")
 set(SOURCES_DBUS_SERVICE_NAME          "org.gnome.evolution.dataserver.Sources5")
 set(USER_PROMPTER_DBUS_SERVICE_NAME    "org.gnome.evolution.dataserver.UserPrompter0")
 
@@ -73,11 +76,11 @@ set(LIBEDATABOOK_CURRENT 25)
 set(LIBEDATABOOK_REVISION 0)
 set(LIBEDATABOOK_AGE 0)
 
-set(LIBECAL_CURRENT 19)
+set(LIBECAL_CURRENT 1)
 set(LIBECAL_REVISION 0)
 set(LIBECAL_AGE 0)
 
-set(LIBEDATACAL_CURRENT 29)
+set(LIBEDATACAL_CURRENT 1)
 set(LIBEDATACAL_REVISION 0)
 set(LIBEDATACAL_AGE 0)
 
@@ -108,7 +111,7 @@ add_definitions(-DSOUP_VERSION_MIN_REQUIRED=${soup_encoded_version})
 
 set(gcr_minimum_version 3.4)
 set(libgdata_minimum_version 0.15.1)
-set(libical_minimum_version 2.0)
+set(libical_glib_minimum_version 3.0.4)
 set(libsecret_minimum_version 0.5)
 set(libxml_minimum_version 2.0.0)
 set(sqlite_minimum_version 3.7.17)
@@ -891,24 +894,6 @@ else(ENABLE_LARGEFILE)
        set(HAVE_O_LARGEFILE OFF)
 endif(ENABLE_LARGEFILE)
 
-# ******************************
-# libical tweaks, part I
-# ******************************
-
-pkg_check_at_least_version(HAVE_LIBICAL_2_0 libical 2.0)
-
-# *****
-# libical.pc from libical-0.43 has a bug in its CFlags.
-# It wants apps to include <libical/ical*.h> but it's CFlags make it difficult
-# to differentiate between <libical/ical.h> and <ical.h>
-# We have fixed all our instances to use <libical/ical.h>.
-# Work-around the buggy CFlags for the 0.43 version.
-# *****
-pkg_check_exact_version(libical_is_0_43 libical 0.43)
-if(libical_is_0_43)
-       pkg_check_variable(LIBICAL_EXTRA_CFLAGS libical includedir)
-endif(libical_is_0_43)
-
 # ******************************
 # subparts flags
 # ******************************
@@ -920,11 +905,11 @@ set(E_DATA_SERVER_LDFLAGS ${E_DATA_SERVER_LDFLAGS} ${MANUAL_NSPR_LIBS} ${MANUAL_
 
 pkg_check_modules(BACKEND REQUIRED gio-2.0 gmodule-2.0 libsecret-1 libsoup-2.4 libxml-2.0)
 pkg_check_modules(ADDRESSBOOK REQUIRED gio-2.0 libxml-2.0 libsoup-2.4 libsecret-1)
-pkg_check_modules(CALENDAR REQUIRED gio-2.0 libical>=${libical_minimum_version} libsoup-2.4 libxml-2.0 
libsecret-1)
+pkg_check_modules(CALENDAR REQUIRED gio-2.0 libical-glib>=${libical_glib_minimum_version} libsoup-2.4 
libxml-2.0 libsecret-1)
 set(ADDRESSBOOK_CFLAGS ${ADDRESSBOOK_CFLAGS} ${PHONENUMBER_DEFINITIONS})
 set(ADDRESSBOOK_INCLUDE_DIRS ${ADDRESSBOOK_INCLUDE_DIRS} ${PHONENUMBER_INCLUDE_DIRS})
 set(ADDRESSBOOK_LDFLAGS ${ADDRESSBOOK_LDFLAGS} ${PHONENUMBER_LDFLAGS})
-set(CALENDAR_CFLAGS ${CALENDAR_CFLAGS} ${LIBICAL_EXTRA_CFLAGS})
+set(CALENDAR_CFLAGS ${CALENDAR_CFLAGS})
 
 pkg_check_modules(CAMEL REQUIRED gio-2.0 gmodule-2.0 ${mozilla_nss} ${mozilla_nspr} 
sqlite3>=${sqlite_minimum_version})
 set(CAMEL_CFLAGS ${CAMEL_CFLAGS} ${KRB5_CFLAGS} ${MANUAL_NSS_CFLAGS} ${MANUAL_NSPR_CFLAGS} ${ICU_CFLAGS})
@@ -938,36 +923,6 @@ if(NOT (MANUAL_NSS_INCLUDES STREQUAL ""))
        list(APPEND CAMEL_INCLUDE_DIRS ${MANUAL_NSS_INCLUDES})
 endif(NOT (MANUAL_NSS_INCLUDES STREQUAL ""))
 
-# ******************************
-# libical tweaks, part II (re-using CALENDAR modules)
-# ******************************
-
-set(CMAKE_REQUIRED_DEFINITIONS ${CALENDAR_CFLAGS_OTHER})
-set(CMAKE_REQUIRED_INCLUDES ${CALENDAR_INCLUDE_DIRS})
-set(CMAKE_REQUIRED_LIBRARIES ${CALENDAR_LDFLAGS})
-
-CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
-                       int main(void) {
-                               ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
-                               return 0;
-                       }" HAVE_ICAL_UNKNOWN_TOKEN_HANDLING)
-
-CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
-                       int main(void) {
-                               icaltzutil_set_exact_vtimezones_support (0);
-                               return 0;
-                       }" HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT)
-
-CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
-                       int main(void) {
-                               icalproperty_status_to_string (ICAL_STATUS_DELETED);
-                               return 0;
-                       }" HAVE_ICAL_STATUS_DELETED)
-
-unset(CMAKE_REQUIRED_DEFINITIONS)
-unset(CMAKE_REQUIRED_INCLUDES)
-unset(CMAKE_REQUIRED_LIBRARIES)
-
 # ******************************
 # Vala binding
 # ******************************
diff --git a/config.h.in b/config.h.in
index 4f5d97e1c..2343e2444 100644
--- a/config.h.in
+++ b/config.h.in
@@ -174,18 +174,6 @@
 /* Have <et/com_err.h> */
 #cmakedefine HAVE_ET_COM_ERR_H 1
 
-/* Define if compiled with libical 2.0 */
-#cmakedefine HAVE_LIBICAL_2_0 1
-
-/* libical provides ical_set_unknown_token_handling_setting function */
-#cmakedefine HAVE_ICAL_UNKNOWN_TOKEN_HANDLING 1
-
-/* libical provides icaltzutil_set_exact_vtimezones_support function */
-#cmakedefine HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT 1
-
-/* libical has ICAL_STATUS_DELETED icalproperty_status value */
-#cmakedefine HAVE_ICAL_STATUS_DELETED 1
-
 /* Define to 1 if you have the libgdata package */
 #cmakedefine HAVE_LIBGDATA 1
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 02a78215e..0e1a75036 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -31,7 +31,6 @@ src/calendar/backends/contacts/e-cal-backend-contacts.c
 src/calendar/backends/file/e-cal-backend-file.c
 src/calendar/backends/http/e-cal-backend-http.c
 src/calendar/backends/weather/e-cal-backend-weather.c
-src/calendar/libecal/e-cal.c
 src/calendar/libecal/e-cal-client.c
 src/calendar/libecal/e-cal-client-view.c
 src/calendar/libecal/e-cal-component.c
diff --git a/src/calendar/libecal/CMakeLists.txt b/src/calendar/libecal/CMakeLists.txt
index b1cdf8d5a..7dfed98e8 100644
--- a/src/calendar/libecal/CMakeLists.txt
+++ b/src/calendar/libecal/CMakeLists.txt
@@ -1,6 +1,6 @@
 glib_mkenums(e-cal-enumtypes e-cal-types.h E_CAL_ENUMTYPES_H)
 
-add_pkgconfig_file(libecal.pc.in libecal-${API_VERSION}.pc)
+add_pkgconfig_file(libecal.pc.in libecal-${CAL_API_VERSION}.pc)
 
 set(DEPENDENCIES
        edbus-private
@@ -8,7 +8,6 @@ set(DEPENDENCIES
 )
 
 set(SOURCES
-       e-cal.c
        e-cal-client.c
        e-cal-client-view.c
        e-cal-component.c
@@ -17,8 +16,6 @@ set(SOURCES
        e-cal-check-timezones.c
        e-cal-system-timezone.c
        e-cal-util.c
-       e-cal-view.c
-       e-cal-view-private.h
        e-reminder-watcher.c
        e-timezone-cache.c
        ${CMAKE_CURRENT_BINARY_DIR}/e-cal-enumtypes.c
@@ -26,7 +23,6 @@ set(SOURCES
 
 set(HEADERS
        libecal.h
-       e-cal.h
        e-cal-client.h
        e-cal-client-view.h
        e-cal-component.h
@@ -36,7 +32,6 @@ set(HEADERS
        e-cal-system-timezone.h
        e-cal-types.h
        e-cal-util.h
-       e-cal-view.h
        e-reminder-watcher.h
        e-timezone-cache.h
        ${CMAKE_CURRENT_BINARY_DIR}/e-cal-enumtypes.h
@@ -54,7 +49,7 @@ add_dependencies(ecal
 set_target_properties(ecal PROPERTIES
        VERSION "${LIBECAL_CURRENT}.${LIBECAL_REVISION}.${LIBECAL_AGE}"
        SOVERSION ${LIBECAL_CURRENT}
-       OUTPUT_NAME ecal-${API_VERSION}
+       OUTPUT_NAME ecal-${CAL_API_VERSION}
 )
 
 target_compile_definitions(ecal PRIVATE
diff --git a/src/calendar/libecal/e-cal-check-timezones.c b/src/calendar/libecal/e-cal-check-timezones.c
index 32b18187c..8594317e3 100644
--- a/src/calendar/libecal/e-cal-check-timezones.c
+++ b/src/calendar/libecal/e-cal-check-timezones.c
@@ -18,13 +18,13 @@
 
 #include "evolution-data-server-config.h"
 
-#include <libical/ical.h>
-
-#include "e-cal-check-timezones.h"
-#include <libecal/e-cal.h>
-#include <libecal/e-cal-client.h>
 #include <string.h>
 #include <ctype.h>
+#include <libical-glib/libical-glib.h>
+
+#include "e-cal-client.h"
+
+#include "e-cal-check-timezones.h"
 
 /*
  * Matches a location to a system timezone definition via a fuzzy
@@ -201,337 +201,6 @@ addsystemtz (gpointer key,
        }
 }
 
-/**
- * e_cal_check_timezones:
- * @comp:     a VCALENDAR containing a list of
- *            VTIMEZONE and arbitrary other components, in
- *            arbitrary order: these other components are
- *            modified by this call
- * @comps: (element-type icalcomponent) (allow-none): a list of #icalcomponent
- * instances which also have to be patched; may be %NULL
- * @tzlookup: (allow-none): a callback function which is called to retrieve
- *            a calendar's VTIMEZONE definition; the returned
- *            definition is *not* freed by e_cal_check_timezones()
- *            (to be compatible with e_cal_get_timezone());
- *            %NULL indicates that no such timezone exists
- *            or an error occurred
- * @custom:   an arbitrary pointer which is passed through to
- *            the tzlookup function
- * @error:    an error description in case of a failure
- *
- * This function cleans up VEVENT, VJOURNAL, VTODO and VTIMEZONE
- * items which are to be imported into Evolution.
- *
- * Using VTIMEZONE definitions is problematic because they cannot be
- * updated properly when timezone definitions change. They are also
- * incomplete (for compatibility reason only one set of rules for
- * summer saving changes can be included, even if different rules
- * apply in different years). This function looks for matches of the
- * used TZIDs against system timezones and replaces such TZIDs with
- * the corresponding system timezone. This works for TZIDs containing
- * a location (found via a fuzzy string search) and for Outlook TZIDs
- * (via a hard-coded lookup table).
- *
- * Some programs generate broken meeting invitations with TZID, but
- * without including the corresponding VTIMEZONE. Importing such
- * invitations unchanged causes problems later on (meeting displayed
- * incorrectly, e_cal_get_component_as_string() fails). The situation
- * where this occurred in the past (found by a SyncEvolution user) is
- * now handled via the location based mapping.
- *
- * If this mapping fails, this function also deals with VTIMEZONE
- * conflicts: such conflicts occur when the calendar already contains
- * an old VTIMEZONE definition with the same TZID, but different
- * summer saving rules. Replacing the VTIMEZONE potentially breaks
- * displaying of old events, whereas not replacing it breaks the new
- * events (the behavior in Evolution <= 2.22.1).
- *
- * The way this problem is resolved is by renaming the new VTIMEZONE
- * definition until the TZID is unique. A running count is appended to
- * the TZID. All items referencing the renamed TZID are adapted
- * accordingly.
- *
- * Returns: TRUE if successful, FALSE otherwise.
- *
- * Since: 2.24
- *
- * Deprecated: 3.2: Use e_cal_client_check_timezones() instead.
- */
-gboolean
-e_cal_check_timezones (icalcomponent *comp,
-                       GList *comps,
-                       icaltimezone *(*tzlookup)(const gchar *tzid,
-                                                 gconstpointer custom,
-                                                 GError **error),
-                       gconstpointer custom,
-                       GError **error)
-{
-       gboolean success = TRUE;
-       icalcomponent *subcomp = NULL;
-       icaltimezone *zone = icaltimezone_new ();
-       gchar *key = NULL, *value = NULL;
-       gchar *buffer = NULL;
-       gchar *zonestr = NULL;
-       gchar *tzid = NULL;
-       GList *l;
-
-       /* a hash from old to new tzid; strings dynamically allocated */
-       GHashTable *mapping = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
-
-       /* a hash of all system time zone IDs which have to be added; strings are shared with mapping hash */
-       GHashTable *systemtzids = g_hash_table_new (g_str_hash, g_str_equal);
-
-       *error = NULL;
-
-       if (!mapping || !zone) {
-               goto nomem;
-       }
-
-       /* iterate over all VTIMEZONE definitions */
-       subcomp = icalcomponent_get_first_component (
-               comp, ICAL_VTIMEZONE_COMPONENT);
-       while (subcomp) {
-               if (icaltimezone_set_component (zone, subcomp)) {
-                       g_free (tzid);
-                       tzid = g_strdup (icaltimezone_get_tzid (zone));
-                       if (tzid) {
-                               const gchar *newtzid = e_cal_match_tzid (tzid);
-                               if (newtzid) {
-                                       /* matched against system time zone */
-                                       g_free (key);
-                                       key = g_strdup (tzid);
-                                       if (!key) {
-                                               goto nomem;
-                                       }
-
-                                       g_free (value);
-                                       value = g_strdup (newtzid);
-                                       if (!value) {
-                                               goto nomem;
-                                       }
-
-                                       g_hash_table_insert (mapping, key, value);
-                                       g_hash_table_insert (systemtzids, value, NULL);
-                                       key =
-                                               value = NULL;
-                               } else {
-                                       gint counter;
-
-                                       zonestr = icalcomponent_as_ical_string_r (subcomp);
-
-                                       /* check for collisions with existing timezones */
-                                       for (counter = 0;
-                                                counter < 100 /* sanity limit */;
-                                                counter++) {
-                                               icaltimezone *existing_zone;
-
-                                               if (counter) {
-                                                       g_free (value);
-                                                       value = g_strdup_printf ("%s %d", tzid, counter);
-                                               }
-                                               existing_zone = tzlookup (
-                                                       counter ? value : tzid,
-                                                       custom, error);
-                                               if (!existing_zone) {
-                                                       if (*error) {
-                                                               goto failed;
-                                                       } else {
-                                                               break;
-                                                       }
-                                               }
-                                               g_free (buffer);
-                                               buffer = icalcomponent_as_ical_string_r 
(icaltimezone_get_component (existing_zone));
-
-                                               if (counter) {
-                                                       gchar *fulltzid = g_strdup_printf ("TZID:%s", value);
-                                                       gsize baselen = strlen ("TZID:") + strlen (tzid);
-                                                       gsize fulllen = strlen (fulltzid);
-                                                       gchar *tzidprop;
-                                                       /*
-                                                        * Map TZID with counter suffix back to basename.
-                                                        */
-                                                       tzidprop = strstr (buffer, fulltzid);
-                                                       if (tzidprop) {
-                                                               memmove (
-                                                                       tzidprop + baselen,
-                                                                       tzidprop + fulllen,
-                                                                       strlen (tzidprop + fulllen) + 1);
-                                                       }
-                                                       g_free (fulltzid);
-                                               }
-
-                                               /*
-                                                * If the strings are identical, then the
-                                                * VTIMEZONE definitions are identical.  If
-                                                * they are not identical, then VTIMEZONE
-                                                * definitions might still be semantically
-                                                * correct and we waste some space by
-                                                * needlesly duplicating the VTIMEZONE. This
-                                                * is expected to occur rarely (if at all) in
-                                                * practice.
-                                                */
-                                               if (!strcmp (zonestr, buffer)) {
-                                                       break;
-                                               }
-                                       }
-
-                                       if (!counter) {
-                                               /* does not exist, nothing to do */
-                                       } else {
-                                               /* timezone renamed */
-                                               icalproperty *prop = icalcomponent_get_first_property (
-                                                       subcomp, ICAL_TZID_PROPERTY);
-                                               while (prop) {
-                                                       icalproperty_set_value_from_string (prop, value, 
"NO");
-                                                       prop = icalcomponent_get_next_property (
-                                                               subcomp, ICAL_ANY_PROPERTY);
-                                               }
-                                               g_free (key);
-                                               key = g_strdup (tzid);
-                                               g_hash_table_insert (mapping, key, value);
-                                               key = value = NULL;
-                                       }
-                               }
-                       }
-               }
-
-               subcomp = icalcomponent_get_next_component (
-                       comp, ICAL_VTIMEZONE_COMPONENT);
-       }
-
-       /*
-        * now replace all TZID parameters in place
-        */
-       subcomp = icalcomponent_get_first_component (
-               comp, ICAL_ANY_COMPONENT);
-       while (subcomp) {
-               /*
-                * Leave VTIMEZONE unchanged, iterate over properties of
-                * everything else.
-                *
-                * Note that no attempt is made to remove unused VTIMEZONE
-                * definitions. That would just make the code more complex for
-                * little additional gain. However, newly used time zones are
-                * added below.
-                */
-               patch_tzids (subcomp, mapping);
-               subcomp = icalcomponent_get_next_component (
-                       comp, ICAL_ANY_COMPONENT);
-       }
-
-       for (l = comps; l; l = l->next) {
-               patch_tzids (l->data, mapping);
-       }
-
-       /*
-        * add system time zones that we mapped to: adding them ensures
-        * that the VCALENDAR remains consistent
-        */
-       g_hash_table_foreach (systemtzids, addsystemtz, comp);
-
-       goto done;
- nomem:
-       /* set gerror for "out of memory" if possible, otherwise abort via g_error() */
-       *error = g_error_new(E_CALENDAR_ERROR, E_CALENDAR_STATUS_OTHER_ERROR, "out of memory");
-       if (!*error) {
-               g_error ("e_cal_check_timezones(): out of memory, cannot proceed - sorry!");
-       }
- failed:
-       /* gerror should have been set already */
-       success = FALSE;
- done:
-       if (mapping) {
-               g_hash_table_destroy (mapping);
-       }
-       if (systemtzids) {
-               g_hash_table_destroy (systemtzids);
-       }
-       if (zone) {
-               icaltimezone_free (zone, 1);
-       }
-       g_free (tzid);
-       g_free (zonestr);
-       g_free (buffer);
-       g_free (key);
-       g_free (value);
-
-       return success;
-}
-
-/**
- * e_cal_tzlookup_ecal:
- * @tzid: ID of the timezone to lookup
- * @custom: must be a valid #ECal pointer
- * @error: an error description in case of a failure
- *
- * An implementation of the tzlookup callback which clients
- * can use. Calls e_cal_get_timezone().
- *
- * Returns: A timezone object, or %NULL on failure. This object is owned
- *   by the @custom, thus do not free it.
- *
- * Since: 2.24
- *
- * Deprecated: 3.2: Use e_cal_client_tzlookup() instead.
- */
-icaltimezone *
-e_cal_tzlookup_ecal (const gchar *tzid,
-                     gconstpointer custom,
-                     GError **error)
-{
-       ECal *ecal = (ECal *) custom;
-       icaltimezone *zone = NULL;
-       GError *local_error = NULL;
-
-       g_return_val_if_fail (ecal != NULL, NULL);
-       g_return_val_if_fail (E_IS_CAL (ecal), NULL);
-
-       if (e_cal_get_timezone (ecal, tzid, &zone, &local_error)) {
-               g_warn_if_fail (local_error == NULL);
-               return zone;
-       }
-
-       if (g_error_matches (local_error, E_CALENDAR_ERROR,
-               E_CALENDAR_STATUS_OBJECT_NOT_FOUND)) {
-               /* We had to trigger this error to check for the
-                * timezone existance, clear it and return NULL. */
-               g_clear_error (&local_error);
-       }
-
-       g_propagate_error (error, local_error);
-
-       return NULL;
-}
-
-/**
- * e_cal_tzlookup_icomp:
- * @tzid: ID of the timezone to lookup
- * @custom: must be a icalcomponent pointer which contains
- *          either a VCALENDAR with VTIMEZONEs or VTIMEZONES
- *          directly
- * @error: an error description in case of a failure
- *
- * An implementation of the tzlookup callback which backends
- * like the file backend can use. Searches for the timezone
- * in the component list.
- *
- * Returns: A timezone object, or %NULL if not found inside @custom. This object is owned
- *   by the @custom, thus do not free it.
- *
- * Since: 2.24
- *
- * Deprecated: 3.2: Use e_cal_client_tzlookup_icomp() instead.
- **/
-icaltimezone *
-e_cal_tzlookup_icomp (const gchar *tzid,
-                      gconstpointer custom,
-                      GError **error)
-{
-    icalcomponent *icomp = (icalcomponent *) custom;
-
-    return icalcomponent_get_timezone (icomp, (gchar *) tzid);
-}
-
 /**
  * e_cal_client_check_timezones:
  * @comp:     a VCALENDAR containing a list of
diff --git a/src/calendar/libecal/e-cal-check-timezones.h b/src/calendar/libecal/e-cal-check-timezones.h
index 299615c76..a819dbad1 100644
--- a/src/calendar/libecal/e-cal-check-timezones.h
+++ b/src/calendar/libecal/e-cal-check-timezones.h
@@ -23,7 +23,7 @@
 #ifndef E_CAL_CHECK_TIMEZONES_H
 #define E_CAL_CHECK_TIMEZONES_H
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 #include <glib.h>
 #include <gio/gio.h>
 
@@ -49,24 +49,6 @@ icaltimezone *       e_cal_client_tzlookup_icomp
 
 const gchar *  e_cal_match_tzid                (const gchar *tzid);
 
-#ifndef EDS_DISABLE_DEPRECATED
-
-gboolean       e_cal_check_timezones           (icalcomponent *comp,
-                                                GList *comps,
-                                                icaltimezone * (*tzlookup) (const gchar *tzid, gconstpointer 
custom, GError **error),
-                                                gconstpointer custom,
-                                                GError **error);
-
-icaltimezone * e_cal_tzlookup_ecal             (const gchar *tzid,
-                                                gconstpointer custom,
-                                                GError **error);
-
-icaltimezone * e_cal_tzlookup_icomp            (const gchar *tzid,
-                                                gconstpointer custom,
-                                                GError **error);
-
-#endif /* EDS_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* E_CAL_CHECK_TIMEZONES_H */
diff --git a/src/calendar/libecal/e-cal-client-view.c b/src/calendar/libecal/e-cal-client-view.c
index 70dcb50e9..065d1f8f3 100644
--- a/src/calendar/libecal/e-cal-client-view.c
+++ b/src/calendar/libecal/e-cal-client-view.c
@@ -909,36 +909,6 @@ e_cal_client_view_ref_client (ECalClientView *client_view)
        return g_object_ref (client_view->priv->client);
 }
 
-/**
- * e_cal_client_view_get_client:
- * @client_view: an #ECalClientView
- *
- * Returns the #ECalClientView:client associated with @client_view.
- *
- * Returns: (transfer none): an #ECalClient
- *
- * Deprecated: 3.10: Use e_cal_client_view_ref_client() instead.
- *
- * Since: 3.2
- **/
-ECalClient *
-e_cal_client_view_get_client (ECalClientView *client_view)
-{
-       ECalClient *client;
-
-       g_return_val_if_fail (E_IS_CAL_CLIENT_VIEW (client_view), NULL);
-
-       client = e_cal_client_view_ref_client (client_view);
-
-       /* XXX Drop the ECalClient reference for backward-compatibility.
-        *     This is risky.  Without a reference, the ECalClient could
-        *     be finalized while the caller is still using it. */
-       if (client != NULL)
-               g_object_unref (client);
-
-       return client;
-}
-
 /**
  * e_cal_client_view_get_connection:
  * @client_view: an #ECalClientView
diff --git a/src/calendar/libecal/e-cal-client-view.h b/src/calendar/libecal/e-cal-client-view.h
index 54cb70990..effdae783 100644
--- a/src/calendar/libecal/e-cal-client-view.h
+++ b/src/calendar/libecal/e-cal-client-view.h
@@ -135,11 +135,6 @@ void               e_cal_client_view_set_flags     (ECalClientView *client_view,
                                                 ECalClientViewFlags flags,
                                                 GError **error);
 
-#ifndef EDS_DISABLE_DEPRECATED
-struct _ECalClient *
-               e_cal_client_view_get_client    (ECalClientView *client_view);
-#endif /* EDS_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* E_CAL_CLIENT_VIEW_H */
diff --git a/src/calendar/libecal/e-cal-client.c b/src/calendar/libecal/e-cal-client.c
index f0994f6f6..6ad0923bc 100644
--- a/src/calendar/libecal/e-cal-client.c
+++ b/src/calendar/libecal/e-cal-client.c
@@ -277,32 +277,6 @@ e_cal_client_error_to_string (ECalClientError code)
        return _("Unknown error");
 }
 
-/**
- * e_cal_client_error_create:
- * @code: an #ECalClientError code to create
- * @custom_msg: custom message to use for the error; can be %NULL
- *
- * Returns: a new #GError containing an E_CAL_CLIENT_ERROR of the given
- * @code. If the @custom_msg is NULL, then the error message is
- * the one returned from e_cal_client_error_to_string() for the @code,
- * otherwise the given message is used.
- *
- * Returned pointer should be freed with g_error_free().
- *
- * Since: 3.2
- *
- * Deprecated: 3.8: Just use the #GError API directly.
- **/
-GError *
-e_cal_client_error_create (ECalClientError code,
-                           const gchar *custom_msg)
-{
-       if (custom_msg == NULL)
-               custom_msg = e_cal_client_error_to_string (code);
-
-       return g_error_new_literal (E_CAL_CLIENT_ERROR, code, custom_msg);
-}
-
 static gpointer
 cal_client_dbus_thread (gpointer user_data)
 {
@@ -1959,42 +1933,6 @@ e_cal_client_connect_finish (GAsyncResult *result,
        return E_CLIENT (g_async_result_get_source_object (result));
 }
 
-/**
- * e_cal_client_new:
- * @source: An #ESource pointer
- * @source_type: source type of the calendar
- * @error: A #GError pointer
- *
- * Creates a new #ECalClient corresponding to the given source.  There are
- * only two operations that are valid on this calendar at this point:
- * e_client_open(), and e_client_remove().
- *
- * Returns: a new but unopened #ECalClient.
- *
- * Since: 3.2
- *
- * Deprecated: 3.8: It covertly makes synchronous D-Bus calls, with no
- *                  way to cancel.  Use e_cal_client_connect() instead,
- *                  which combines e_cal_client_new() and e_client_open()
- *                  into one step.
- **/
-ECalClient *
-e_cal_client_new (ESource *source,
-                  ECalClientSourceType source_type,
-                  GError **error)
-{
-       g_return_val_if_fail (E_IS_SOURCE (source), NULL);
-       g_return_val_if_fail (
-               source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS ||
-               source_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS ||
-               source_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS, NULL);
-
-       return g_initable_new (
-               E_TYPE_CAL_CLIENT, NULL, error,
-               "source", source,
-               "source-type", source_type, NULL);
-}
-
 /**
  * e_cal_client_get_source_type:
  * @client: A calendar client.
diff --git a/src/calendar/libecal/e-cal-client.h b/src/calendar/libecal/e-cal-client.h
index 5e04986bb..0fdd5bf3f 100644
--- a/src/calendar/libecal/e-cal-client.h
+++ b/src/calendar/libecal/e-cal-client.h
@@ -539,14 +539,6 @@ gboolean   e_cal_client_add_timezone_sync  (ECalClient *client,
                                                 GCancellable *cancellable,
                                                 GError **error);
 
-#ifndef EDS_DISABLE_DEPRECATED
-ECalClient *   e_cal_client_new                (ESource *source,
-                                                ECalClientSourceType source_type,
-                                                GError **error);
-GError *       e_cal_client_error_create       (ECalClientError code,
-                                                const gchar *custom_msg);
-#endif /* EDS_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* E_CAL_CLIENT_H */
diff --git a/src/calendar/libecal/e-cal-component.c b/src/calendar/libecal/e-cal-component.c
index a2e2c1fdc..c492b167c 100644
--- a/src/calendar/libecal/e-cal-component.c
+++ b/src/calendar/libecal/e-cal-component.c
@@ -393,22 +393,6 @@ e_cal_component_init (ECalComponent *comp)
        comp->priv->alarm_uid_hash = g_hash_table_new (g_str_hash, g_str_equal);
 }
 
-/**
- * e_cal_component_gen_uid:
- *
- * Generates a unique identifier suitable for calendar components.
- *
- * Returns: A unique identifier string.  Every time this function is called
- * a different string is returned.
- *
- * Deprecated: Since 3.26, use e_util_generate_uid() instead
- **/
-gchar *
-e_cal_component_gen_uid (void)
-{
-       return e_util_generate_uid ();
-}
-
 /**
  * e_cal_component_new:
  *
diff --git a/src/calendar/libecal/e-cal-component.h b/src/calendar/libecal/e-cal-component.h
index eb8441626..b63b3b8e9 100644
--- a/src/calendar/libecal/e-cal-component.h
+++ b/src/calendar/libecal/e-cal-component.h
@@ -26,7 +26,7 @@
 
 #include <time.h>
 #include <glib-object.h>
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 
 /* Standard GObject macros */
 #define E_TYPE_CAL_COMPONENT \
@@ -331,10 +331,6 @@ struct _ECalComponentClass {
 
 GType          e_cal_component_get_type        (void);
 
-/* #ifndef EDS_DISABLE_DEPRECATED*/
-gchar *                e_cal_component_gen_uid         (void);
-/*#endif / * EDS_DISABLE_DEPRECATED */
-
 ECalComponent *        e_cal_component_new             (void);
 ECalComponent *        e_cal_component_new_from_string (const gchar *calobj);
 ECalComponent *        e_cal_component_new_from_icalcomponent
diff --git a/src/calendar/libecal/e-cal-recur.c b/src/calendar/libecal/e-cal-recur.c
index 34ca5ca01..dc8112807 100644
--- a/src/calendar/libecal/e-cal-recur.c
+++ b/src/calendar/libecal/e-cal-recur.c
@@ -1223,7 +1223,6 @@ static ECalRecurVTable cal_obj_secondly_vtable = {
        cal_obj_bysecond_filter
 };
 
-#ifdef HAVE_LIBICAL_2_0
 struct BackwardCompatibilityData
 {
        ECalComponent *comp;
@@ -1276,8 +1275,6 @@ backward_compatibility_instance_cb (icalcomponent *comp,
        return FALSE;
 }
 
-#endif
-
 /**
  * e_cal_recur_generate_instances:
  * @comp: A calendar component object
@@ -1319,7 +1316,6 @@ e_cal_recur_generate_instances (ECalComponent *comp,
                                 gpointer tz_cb_data,
                                 icaltimezone *default_timezone)
 {
-#ifdef HAVE_LIBICAL_2_0
        struct icaltimetype istart, iend;
        struct BackwardCompatibilityData bcd;
 
@@ -1336,12 +1332,6 @@ e_cal_recur_generate_instances (ECalComponent *comp,
                backward_compatibility_instance_cb, &bcd,
                backward_compatibility_resolve_timezone_cb, &bcd,
                default_timezone, NULL, NULL);
-#else
-       e_cal_recur_generate_instances_of_rule (
-               comp, NULL, start, end,
-               cb, cb_data, tz_cb, tz_cb_data,
-               default_timezone);
-#endif
 }
 
 /*
@@ -4735,19 +4725,7 @@ e_cal_recur_set_rule_end_date (icalproperty *prop,
        g_free (end_date_string);
 }
 
-#ifdef G_OS_WIN32
-#undef e_cal_recur_nth
-static
-#endif
-/**
- * e_cal_recur_nth:
- *
- * An array of 31 translated strings for each day of the month (i.e. "1st",
- * "2nd", and so on).
- *
- * Deprecated: 3.28: Use e_cal_recur_get_localized_nth() instead
- */
-const gchar *e_cal_recur_nth[31] = {
+static const gchar *e_cal_recur_nth[31] = {
        N_("1st"),
        N_("2nd"),
        N_("3rd"),
@@ -4781,26 +4759,6 @@ const gchar *e_cal_recur_nth[31] = {
        N_("31st")
 };
 
-#ifdef G_OS_WIN32
-
-/**
- * e_cal_get_recur_nth:
- *
- * Returns an array of 31 translated strings for each day of the month
- * (i.e. "1st", "2nd", and so on).
- *
- * Returns: a pointer to an array of strings.  This array is static, do not free it.
- *
- * Deprecated: 3.28: Use e_cal_recur_get_localized_nth() instead
- */
-const gchar **
-e_cal_get_recur_nth (void)
-{
-       return e_cal_recur_nth;
-}
-
-#endif
-
 /**
  * e_cal_recur_get_localized_nth:
  * @nth: the nth index, counting from zero
diff --git a/src/calendar/libecal/e-cal-recur.h b/src/calendar/libecal/e-cal-recur.h
index 025cfdbed..1cbeef787 100644
--- a/src/calendar/libecal/e-cal-recur.h
+++ b/src/calendar/libecal/e-cal-recur.h
@@ -29,7 +29,7 @@
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 #include <libecal/e-cal-component.h>
 
 G_BEGIN_DECLS
@@ -86,18 +86,6 @@ e_cal_recur_ensure_end_dates (ECalComponent  *comp,
                            ECalRecurResolveTimezoneFn  tz_cb,
                            gpointer             tz_cb_data);
 
-#ifndef EDS_DISABLE_DEPRECATED
-
-/* Localized nth-day-of-month strings. (Use with _() ) */
-#ifdef G_OS_WIN32
-extern const gchar **e_cal_get_recur_nth (void);
-#define e_cal_recur_nth (e_cal_get_recur_nth ())
-#else
-extern const gchar *e_cal_recur_nth[31];
-#endif
-
-#endif /* EDS_DISABLE_DEPRECATED */
-
 const gchar *          e_cal_recur_get_localized_nth           (gint nth);
 
 /**
diff --git a/src/calendar/libecal/e-cal-system-timezone.c b/src/calendar/libecal/e-cal-system-timezone.c
index b51f70e8d..25bbb6713 100644
--- a/src/calendar/libecal/e-cal-system-timezone.c
+++ b/src/calendar/libecal/e-cal-system-timezone.c
@@ -19,6 +19,8 @@
 #include <glib/gstdio.h>
 #include <gio/gio.h>
 #include <string.h>
+#include <libical-glib/libical-glib.h>
+
 #include "e-cal-system-timezone.h"
 
 #ifndef G_OS_WIN32
diff --git a/src/calendar/libecal/e-cal-system-timezone.h b/src/calendar/libecal/e-cal-system-timezone.h
index 49bcb9072..017dcad8f 100644
--- a/src/calendar/libecal/e-cal-system-timezone.h
+++ b/src/calendar/libecal/e-cal-system-timezone.h
@@ -23,7 +23,7 @@
 #ifndef E_CAL_SYSTEM_TIMEZONE_H
 #define E_CAL_SYSTEM_TIMEZONE_H
 
-#include <libical/ical.h>
+#include <glib.h>
 
 gchar *e_cal_system_timezone_get_location (void);
 
diff --git a/src/calendar/libecal/e-cal-time-util.h b/src/calendar/libecal/e-cal-time-util.h
index 550a90145..df665226f 100644
--- a/src/calendar/libecal/e-cal-time-util.h
+++ b/src/calendar/libecal/e-cal-time-util.h
@@ -28,7 +28,7 @@
 #define TIMEUTIL_H
 
 #include <time.h>
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 #include <glib.h>
 
 G_BEGIN_DECLS
diff --git a/src/calendar/libecal/e-cal-types.h b/src/calendar/libecal/e-cal-types.h
index 2b780929b..5bd037082 100644
--- a/src/calendar/libecal/e-cal-types.h
+++ b/src/calendar/libecal/e-cal-types.h
@@ -67,132 +67,6 @@ typedef enum {
        E_CAL_OBJ_MOD_ONLY_THIS = 1 << 3
 } ECalObjModType;
 
-/* Everything below this point is deprecated. */
-
-#ifndef EDS_DISABLE_DEPRECATED
-
-/**
- * E_CALENDAR_ERROR:
- *
- * The error domain for the deprecated #ECal
- *
- * Deprecated: 3.2: Use #ECalClient and it's errors instead
- */
-#define E_CALENDAR_ERROR e_calendar_error_quark()
-
-GQuark e_calendar_error_quark (void) G_GNUC_CONST;
-
-/**
- * ECalChangeType:
- * @E_CAL_CHANGE_ADDED: A component was added
- * @E_CAL_CHANGE_MODIFIED: A component was modified
- * @E_CAL_CHANGE_DELETED: A component was deleted
- *
- * Indicates the type of change in an #ECalChange
- *
- * Deprecated: 3.2: Use #ECalClient instead
- */
-typedef enum {
-       E_CAL_CHANGE_ADDED = 1 << 0,
-       E_CAL_CHANGE_MODIFIED = 1 << 1,
-       E_CAL_CHANGE_DELETED = 1 << 2
-} ECalChangeType;
-
-/**
- * ECalChange:
- * @comp: The #ECalComponent which changed
- * @type: The #ECalChangeType which occurred
- *
- * A structure indicating a calendar change
- *
- * Deprecated: 3.2: Use #ECalClient instead
- **/
-typedef struct {
-       ECalComponent *comp;
-       ECalChangeType type;
-} ECalChange;
-
-/**
- * ECalendarStatus:
- *
- * Error codes for the #E_CALENDAR_ERROR error domain
- *
- * Deprecated: 3.2: Use #ECalClient and it's errors instead
- */
-/*
- * Marked all these deprecated errors as private to avoid
- * warnings from gtk-doc
- */
-typedef enum { /*< private >*/
-       E_CALENDAR_STATUS_OK,
-       E_CALENDAR_STATUS_INVALID_ARG,
-       E_CALENDAR_STATUS_BUSY,
-       E_CALENDAR_STATUS_REPOSITORY_OFFLINE,
-       E_CALENDAR_STATUS_NO_SUCH_CALENDAR,
-       E_CALENDAR_STATUS_OBJECT_NOT_FOUND,
-       E_CALENDAR_STATUS_INVALID_OBJECT,
-       E_CALENDAR_STATUS_URI_NOT_LOADED,
-       E_CALENDAR_STATUS_URI_ALREADY_LOADED,
-       E_CALENDAR_STATUS_PERMISSION_DENIED,
-       E_CALENDAR_STATUS_UNKNOWN_USER,
-       E_CALENDAR_STATUS_OBJECT_ID_ALREADY_EXISTS,
-       E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED,
-       E_CALENDAR_STATUS_CANCELLED,
-       E_CALENDAR_STATUS_COULD_NOT_CANCEL,
-       E_CALENDAR_STATUS_AUTHENTICATION_FAILED,
-       E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED,
-       E_CALENDAR_STATUS_DBUS_EXCEPTION,
-       E_CALENDAR_STATUS_OTHER_ERROR,
-       E_CALENDAR_STATUS_INVALID_SERVER_VERSION,
-       E_CALENDAR_STATUS_NOT_SUPPORTED
-} ECalendarStatus;
-
-/**
- * E_CALENDAR_STATUS_CORBA_EXCEPTION:
- *
- * A deprecated #ECalendarStatus error code
- *
- * Deprecated: Use #ECalClient and it's errors instead
- */
-#define E_CALENDAR_STATUS_CORBA_EXCEPTION E_CALENDAR_STATUS_DBUS_EXCEPTION
-
-/**
- * EDataCalObjType:
- *
- * A deprecated object type indicator
- *
- * Deprecated
- **/
-typedef enum { /*< private >*/
-       Event = 1 << 0,
-       Todo = 1 << 1,
-       Journal = 1 << 2,
-       AnyType = 0x07
-} EDataCalObjType;
-
-/**
- * EDataCalObjModType:
- *
- * A deprecated object modification type indicator
- *
- * Deprecated
- **/
-typedef enum { /*< private >*/
-       This = 1 << 0,
-       ThisAndPrior = 1 << 1,
-       ThisAndFuture = 1 << 2,
-       All = 0x07
-} EDataCalObjModType;
-
-typedef ECalObjModType CalObjModType;
-#define CALOBJ_MOD_THIS          E_CAL_OBJ_MOD_THIS
-#define CALOBJ_MOD_THISANDPRIOR  E_CAL_OBJ_MOD_THIS_AND_PRIOR
-#define CALOBJ_MOD_THISANDFUTURE E_CAL_OBJ_MOD_THIS_AND_FUTURE
-#define CALOBJ_MOD_ALL           E_CAL_OBJ_MOD_ALL
-#define CALOBJ_MOD_ONLY_THIS     E_CAL_OBJ_MOD_ONLY_THIS
-
-#endif /* EDS_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* E_CAL_TYPES_H */
diff --git a/src/calendar/libecal/e-cal-util.h b/src/calendar/libecal/e-cal-util.h
index 0bbbd1259..f1327ef73 100644
--- a/src/calendar/libecal/e-cal-util.h
+++ b/src/calendar/libecal/e-cal-util.h
@@ -24,7 +24,7 @@
 #ifndef E_CAL_UTIL_H
 #define E_CAL_UTIL_H
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 #include <time.h>
 #include <libecal/e-cal-component.h>
 #include <libecal/e-cal-recur.h>
@@ -309,21 +309,6 @@ gboolean   e_cal_util_mark_task_complete_sync
                                                 GCancellable *cancellable,
                                                 GError **error);
 
-#ifndef EDS_DISABLE_DEPRECATED
-/* Used for mode stuff */
-typedef enum {
-       CAL_MODE_INVALID = -1,
-       CAL_MODE_LOCAL = 1 << 0,
-       CAL_MODE_REMOTE = 1 << 1,
-       CAL_MODE_ANY = 0x07
-} CalMode;
-
-#define cal_mode_to_corba(mode) \
-       (mode == CAL_MODE_LOCAL ? Local : \
-        mode == CAL_MODE_REMOTE ? Remote : \
-        AnyMode)
-#endif /* EDS_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* E_CAL_UTIL_H */
diff --git a/src/calendar/libecal/e-timezone-cache.h b/src/calendar/libecal/e-timezone-cache.h
index fb5dfe0b9..af1b46de7 100644
--- a/src/calendar/libecal/e-timezone-cache.h
+++ b/src/calendar/libecal/e-timezone-cache.h
@@ -23,7 +23,7 @@
 #define E_TIMEZONE_CACHE_H
 
 #include <glib-object.h>
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 
 /* Standard GObject macros */
 #define E_TYPE_TIMEZONE_CACHE \
diff --git a/src/calendar/libecal/libecal.h b/src/calendar/libecal/libecal.h
index e14eb9d4b..35a0376ba 100644
--- a/src/calendar/libecal/libecal.h
+++ b/src/calendar/libecal/libecal.h
@@ -20,9 +20,9 @@
 
 #define __LIBECAL_H_INSIDE__
 
+#include <libical-glib/libical-glib.h>
 #include <libedataserver/libedataserver.h>
 
-#include <libecal/e-cal.h>
 #include <libecal/e-cal-check-timezones.h>
 #include <libecal/e-cal-client-view.h>
 #include <libecal/e-cal-client.h>
@@ -33,7 +33,6 @@
 #include <libecal/e-cal-time-util.h>
 #include <libecal/e-cal-types.h>
 #include <libecal/e-cal-util.h>
-#include <libecal/e-cal-view.h>
 #include <libecal/e-reminder-watcher.h>
 #include <libecal/e-timezone-cache.h>
 
diff --git a/src/calendar/libecal/libecal.pc.in b/src/calendar/libecal/libecal.pc.in
index ac2f07499..a71e414f6 100644
--- a/src/calendar/libecal/libecal.pc.in
+++ b/src/calendar/libecal/libecal.pc.in
@@ -9,6 +9,6 @@ privincludedir=@privincludedir@
 Name: libecal
 Description: Client library for evolution calendars
 Version: @PROJECT_VERSION@
-Requires: libical libedataserver-@API_VERSION@
-Libs: -L${libdir} -lecal-@API_VERSION@
-Cflags: -I${privincludedir} @LIBICAL_EXTRA_CFLAGS@
+Requires: libical-glib libedataserver-@API_VERSION@
+Libs: -L${libdir} -lecal-@CAL_API_VERSION@
+Cflags: -I${privincludedir}
diff --git a/src/calendar/libedata-cal/CMakeLists.txt b/src/calendar/libedata-cal/CMakeLists.txt
index 749fdf68d..43906d2b2 100644
--- a/src/calendar/libedata-cal/CMakeLists.txt
+++ b/src/calendar/libedata-cal/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_pkgconfig_file(libedata-cal.pc.in libedata-cal-${API_VERSION}.pc)
+add_pkgconfig_file(libedata-cal.pc.in libedata-cal-${CAL_API_VERSION}.pc)
 
 set(DEPENDENCIES
        ebackend
@@ -9,7 +9,6 @@ set(DEPENDENCIES
 
 set(SOURCES
        e-cal-backend.c
-       e-cal-backend-cache.c
        e-cal-backend-factory.c
        e-cal-backend-intervaltree.c
        e-cal-backend-sexp.c
@@ -27,7 +26,6 @@ set(SOURCES
 set(HEADERS
        libedata-cal.h
        e-cal-backend.h
-       e-cal-backend-cache.h
        e-cal-backend-factory.h
        e-cal-backend-intervaltree.h
        e-cal-backend-sync.h
@@ -54,7 +52,7 @@ add_dependencies(edata-cal
 set_target_properties(edata-cal PROPERTIES
        VERSION "${LIBEDATACAL_CURRENT}.${LIBEDATACAL_REVISION}.${LIBEDATACAL_AGE}"
        SOVERSION ${LIBEDATACAL_CURRENT}
-       OUTPUT_NAME edata-cal-${API_VERSION}
+       OUTPUT_NAME edata-cal-${CAL_API_VERSION}
 )
 
 target_compile_definitions(edata-cal PRIVATE
diff --git a/src/calendar/libedata-cal/e-cal-backend-factory.h 
b/src/calendar/libedata-cal/e-cal-backend-factory.h
index 8d46685c6..b41752e64 100644
--- a/src/calendar/libedata-cal/e-cal-backend-factory.h
+++ b/src/calendar/libedata-cal/e-cal-backend-factory.h
@@ -25,7 +25,7 @@
 #ifndef E_CAL_BACKEND_FACTORY_H
 #define E_CAL_BACKEND_FACTORY_H
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 #include <libebackend/libebackend.h>
 
 /* Standard GObject macros */
diff --git a/src/calendar/libedata-cal/e-cal-backend-sexp.c b/src/calendar/libedata-cal/e-cal-backend-sexp.c
index faa2faf9e..b7b1f0b7f 100644
--- a/src/calendar/libedata-cal/e-cal-backend-sexp.c
+++ b/src/calendar/libedata-cal/e-cal-backend-sexp.c
@@ -590,10 +590,8 @@ matches_status (ECalComponent *comp ,const gchar *str)
                return g_str_equal (str, "PENDING");
        case ICAL_STATUS_FAILED:
                return g_str_equal (str, "FAILED");
-#ifdef HAVE_ICAL_STATUS_DELETED
        case ICAL_STATUS_DELETED:
                return g_str_equal (str, "DELETED");
-#endif
        case ICAL_STATUS_X:
                break;
        }
diff --git a/src/calendar/libedata-cal/e-cal-backend-store.c b/src/calendar/libedata-cal/e-cal-backend-store.c
index b0795b22c..7a6a6c870 100644
--- a/src/calendar/libedata-cal/e-cal-backend-store.c
+++ b/src/calendar/libedata-cal/e-cal-backend-store.c
@@ -1673,3 +1673,51 @@ e_cal_backend_store_interval_tree_add_comp (ECalBackendStore *store,
                store->priv->intervaltree,
                occurence_start, occurence_end, comp);
 }
+
+gboolean
+e_cal_backend_cache_remove (const gchar *dirname,
+                            const gchar *basename)
+{
+       gchar *filename;
+
+       g_return_val_if_fail (dirname != NULL, FALSE);
+       g_return_val_if_fail (basename != NULL, FALSE);
+
+       filename = g_build_filename (dirname, basename, NULL);
+
+       if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
+               gchar *full_path;
+               const gchar *fname;
+               GDir *dir;
+               gboolean success;
+
+               /* remove all files in the directory */
+               dir = g_dir_open (dirname, 0, NULL);
+               if (dir) {
+                       while ((fname = g_dir_read_name (dir))) {
+                               full_path = g_build_filename (dirname, fname, NULL);
+                               if (g_unlink (full_path) != 0) {
+                                       g_free (full_path);
+                                       g_dir_close (dir);
+
+                                       return FALSE;
+                               }
+
+                               g_free (full_path);
+                       }
+
+                       g_dir_close (dir);
+               }
+
+               /* remove the directory itself */
+               success = g_rmdir (dirname) == 0;
+
+               /* free all memory */
+               g_free (filename);
+               return success;
+       }
+
+       g_free (filename);
+
+       return FALSE;
+}
diff --git a/src/calendar/libedata-cal/e-cal-backend-store.h b/src/calendar/libedata-cal/e-cal-backend-store.h
index d2a11b882..fdb8edccb 100644
--- a/src/calendar/libedata-cal/e-cal-backend-store.h
+++ b/src/calendar/libedata-cal/e-cal-backend-store.h
@@ -193,6 +193,9 @@ void                e_cal_backend_store_interval_tree_add_comp
                                                 time_t occurence_start,
                                                 time_t occurence_end);
 
+gboolean
+e_cal_backend_cache_remove (const gchar *dirname,
+                            const gchar *basename);
 G_END_DECLS
 
 #endif /* E_CAL_BACKEND_STORE_H */
diff --git a/src/calendar/libedata-cal/e-cal-backend-sync.h b/src/calendar/libedata-cal/e-cal-backend-sync.h
index 5dc6ae32c..84ae1f76c 100644
--- a/src/calendar/libedata-cal/e-cal-backend-sync.h
+++ b/src/calendar/libedata-cal/e-cal-backend-sync.h
@@ -64,7 +64,6 @@ struct _ECalBackendSync {
  * ECalBackendSyncClass:
  * @open_sync: Open the calendar
  * @refresh_sync: Refresh the calendar
- * @set_backend_property_sync: Deprecated: Set backend property
  * @get_object_sync: Get single object
  * @get_object_list_sync: Get multiple objects at once
  * @get_free_busy_sync: Get Free/Busy objects
@@ -98,15 +97,6 @@ struct _ECalBackendSyncClass {
                                                 GCancellable *cancellable,
                                                 GError **error);
 
-       /* This method is deprecated. */
-       gboolean        (*set_backend_property_sync)
-                                               (ECalBackendSync *backend,
-                                                EDataCal *cal,
-                                                GCancellable *cancellable,
-                                                const gchar *prop_name,
-                                                const gchar *prop_value,
-                                                GError **error);
-
        void            (*get_object_sync)      (ECalBackendSync *backend,
                                                 EDataCal *cal,
                                                 GCancellable *cancellable,
@@ -189,6 +179,9 @@ struct _ECalBackendSyncClass {
                                                 GCancellable *cancellable,
                                                 const gchar *tzobject,
                                                 GError **error);
+
+       /* Padding for future expansion */
+       gpointer reserved_padding[20];
 };
 
 GType          e_cal_backend_sync_get_type     (void) G_GNUC_CONST;
diff --git a/src/calendar/libedata-cal/e-cal-backend.c b/src/calendar/libedata-cal/e-cal-backend.c
index 20b47d399..b380d1076 100644
--- a/src/calendar/libedata-cal/e-cal-backend.c
+++ b/src/calendar/libedata-cal/e-cal-backend.c
@@ -29,7 +29,6 @@
 #include <glib/gi18n-lib.h>
 
 #include "e-cal-backend.h"
-#include "e-cal-backend-cache.h"
 
 #define E_CAL_BACKEND_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
@@ -4556,56 +4555,6 @@ e_cal_backend_notify_property_changed (ECalBackend *backend,
        }
 }
 
-/**
- * e_cal_backend_empty_cache:
- * @backend: an #ECalBackend
- * @cache: Backend's cache to empty.
- *
- * Empties backend's cache with all notifications and so on, thus all listening
- * will know there is nothing in this backend.
- *
- * Since: 2.28
- **/
-void
-e_cal_backend_empty_cache (ECalBackend *backend,
-                           ECalBackendCache *cache)
-{
-       GList *comps_in_cache;
-
-       g_return_if_fail (backend != NULL);
-       g_return_if_fail (E_IS_CAL_BACKEND (backend));
-
-       if (!cache)
-               return;
-
-       g_return_if_fail (E_IS_CAL_BACKEND_CACHE (cache));
-
-       e_file_cache_freeze_changes (E_FILE_CACHE (cache));
-
-       for (comps_in_cache = e_cal_backend_cache_get_components (cache);
-            comps_in_cache;
-            comps_in_cache = comps_in_cache->next) {
-               ECalComponentId *id;
-               ECalComponent *comp = comps_in_cache->data;
-
-               id = e_cal_component_get_id (comp);
-
-               if (id) {
-                       e_cal_backend_cache_remove_component (cache, id->uid, id->rid);
-
-                       e_cal_backend_notify_component_removed (backend, id, comp, NULL);
-
-                       e_cal_component_free_id (id);
-               }
-
-               g_object_unref (comp);
-       }
-
-       g_list_free (comps_in_cache);
-
-       e_file_cache_thaw_changes (E_FILE_CACHE (cache));
-}
-
 /**
  * e_cal_backend_prepare_for_completion:
  * @backend: an #ECalBackend
diff --git a/src/calendar/libedata-cal/e-cal-backend.h b/src/calendar/libedata-cal/e-cal-backend.h
index 9836d413d..e729d032d 100644
--- a/src/calendar/libedata-cal/e-cal-backend.h
+++ b/src/calendar/libedata-cal/e-cal-backend.h
@@ -48,8 +48,6 @@
 
 G_BEGIN_DECLS
 
-struct _ECalBackendCache;
-
 typedef struct _ECalBackend ECalBackend;
 typedef struct _ECalBackendClass ECalBackendClass;
 typedef struct _ECalBackendPrivate ECalBackendPrivate;
@@ -200,6 +198,9 @@ struct _ECalBackendClass {
        void            (*closed)               (ECalBackend *backend,
                                                 const gchar *sender);
        void            (*shutdown)             (ECalBackend *backend);
+
+       /* Padding for future expansion */
+       gpointer reserved_padding[20];
 };
 
 GType          e_cal_backend_get_type          (void) G_GNUC_CONST;
@@ -473,9 +474,6 @@ void                e_cal_backend_notify_property_changed
                                                 const gchar *prop_name,
                                                 const gchar *prop_value);
 
-void           e_cal_backend_empty_cache       (ECalBackend *backend,
-                                                struct _ECalBackendCache *cache);
-
 GSimpleAsyncResult *
                e_cal_backend_prepare_for_completion
                                                (ECalBackend *backend,
diff --git a/src/calendar/libedata-cal/e-cal-cache.c b/src/calendar/libedata-cal/e-cal-cache.c
index a91fec1d5..5802eb4aa 100644
--- a/src/calendar/libedata-cal/e-cal-cache.c
+++ b/src/calendar/libedata-cal/e-cal-cache.c
@@ -816,10 +816,8 @@ ecc_get_status_as_string (icalproperty_status status)
                return "pending";
        case ICAL_STATUS_FAILED:
                return "failed";
-#ifdef HAVE_ICAL_STATUS_DELETED
        case ICAL_STATUS_DELETED:
                return "deleted";
-#endif
        case ICAL_STATUS_X:
                break;
        }
diff --git a/src/calendar/libedata-cal/e-data-cal-factory.c b/src/calendar/libedata-cal/e-data-cal-factory.c
index dcb05be23..a0ace0a98 100644
--- a/src/calendar/libedata-cal/e-data-cal-factory.c
+++ b/src/calendar/libedata-cal/e-data-cal-factory.c
@@ -47,27 +47,7 @@
 #include "e-data-cal.h"
 #include "e-data-cal-factory.h"
 
-#include <libical/ical.h>
-
-/*
- * FIXME: Remove this when there's a build time dependency on libical
- * 3.0.4 (where this is fixed). See
- * https://github.com/libical/libical/pull/335 and the implementation in
- * https://github.com/libical/libical/blob/master/src/libical/icalversion.h.cmake.
- */
-#if defined(ICAL_CHECK_VERSION) && defined(ICAL_MAJOR_VERSION) && defined(ICAL_MINOR_VERSION) && 
defined(ICAL_MICRO_VERSION)
-#undef ICAL_CHECK_VERSION
-#define ICAL_CHECK_VERSION(major,minor,micro)                          \
-    (ICAL_MAJOR_VERSION > (major) ||                                   \
-    (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION > (minor)) || \
-    (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION == (minor) && \
-    ICAL_MICRO_VERSION >= (micro)))
-#else
-#if defined(ICAL_CHECK_VERSION)
-#undef ICAL_CHECK_VERSION
-#endif
-#define ICAL_CHECK_VERSION(major,minor,micro) (0)
-#endif
+#include <libical-glib/libical-glib.h>
 
 #define d(x)
 
@@ -384,48 +364,7 @@ e_data_cal_factory_new (gint backend_per_process,
                        GCancellable *cancellable,
                         GError **error)
 {
-#if !ICAL_CHECK_VERSION(3, 0, 2)
-       icalarray *builtin_timezones;
-       gint ii;
-#endif
-
-#ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
        ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
-#endif
-
-#ifdef HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT
-       icaltzutil_set_exact_vtimezones_support (0);
-#endif
-
-#if !ICAL_CHECK_VERSION(3, 0, 2)
-       /* XXX Pre-load all built-in timezones in libical.
-        *
-        *     Built-in time zones in libical 0.43 are loaded on demand,
-        *     but not in a thread-safe manner, resulting in a race when
-        *     multiple threads call icaltimezone_load_builtin_timezone()
-        *     on the same time zone.  Until built-in time zone loading
-        *     in libical is made thread-safe, work around the issue by
-        *     loading all built-in time zones now, so libical's internal
-        *     time zone array will be fully populated before any threads
-        *     are spawned.
-        *
-        *     This is apparently fixed with additional locking in
-        *     libical 3.0.1 and 3.0.2:
-        *     https://github.com/libical/libical/releases/tag/v3.0.1
-        *     https://github.com/libical/libical/releases/tag/v3.0.2
-        */
-       builtin_timezones = icaltimezone_get_builtin_timezones ();
-       for (ii = 0; ii < builtin_timezones->num_elements; ii++) {
-               icaltimezone *zone;
-
-               zone = icalarray_element_at (builtin_timezones, ii);
-
-               /* We don't care about the component right now,
-                * we just need some function that will trigger
-                * icaltimezone_load_builtin_timezone(). */
-               icaltimezone_get_component (zone);
-       }
-#endif
 
        return g_initable_new (E_TYPE_DATA_CAL_FACTORY, cancellable, error,
                "reload-supported", TRUE,
diff --git a/src/calendar/libedata-cal/e-data-cal.c b/src/calendar/libedata-cal/e-data-cal.c
index a1c052bf7..270588df7 100644
--- a/src/calendar/libedata-cal/e-data-cal.c
+++ b/src/calendar/libedata-cal/e-data-cal.c
@@ -26,7 +26,7 @@
 
 #include "evolution-data-server-config.h"
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 #include <glib/gi18n-lib.h>
 #include <unistd.h>
 
diff --git a/src/calendar/libedata-cal/e-subprocess-cal-factory.c 
b/src/calendar/libedata-cal/e-subprocess-cal-factory.c
index 7547a30fb..40a4329e9 100644
--- a/src/calendar/libedata-cal/e-subprocess-cal-factory.c
+++ b/src/calendar/libedata-cal/e-subprocess-cal-factory.c
@@ -38,26 +38,6 @@
 
 #include <e-dbus-subprocess-backend.h>
 
-/*
- * FIXME: Remove this when there's a build time dependency on libical
- * 3.0.4 (where this is fixed). See
- * https://github.com/libical/libical/pull/335 and the implementation in
- * https://github.com/libical/libical/blob/master/src/libical/icalversion.h.cmake.
- */
-#if defined(ICAL_CHECK_VERSION) && defined(ICAL_MAJOR_VERSION) && defined(ICAL_MINOR_VERSION) && 
defined(ICAL_MICRO_VERSION)
-#undef ICAL_CHECK_VERSION
-#define ICAL_CHECK_VERSION(major,minor,micro)                          \
-    (ICAL_MAJOR_VERSION > (major) ||                                   \
-    (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION > (minor)) || \
-    (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION == (minor) && \
-    ICAL_MICRO_VERSION >= (micro)))
-#else
-#if defined(ICAL_CHECK_VERSION)
-#undef ICAL_CHECK_VERSION
-#endif
-#define ICAL_CHECK_VERSION(major,minor,micro) (0)
-#endif
-
 /* Forward Declarations */
 static void    e_subprocess_cal_factory_initable_init
                                                (GInitableIface *iface);
@@ -157,48 +137,7 @@ ESubprocessCalFactory *
 e_subprocess_cal_factory_new (GCancellable *cancellable,
                               GError **error)
 {
-#if !ICAL_CHECK_VERSION(3, 0, 2)
-       icalarray *builtin_timezones;
-       gint ii;
-#endif
-
-#ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
        ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
-#endif
-
-#ifdef HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT
-       icaltzutil_set_exact_vtimezones_support (0);
-#endif
-
-#if !ICAL_CHECK_VERSION(3, 0, 2)
-       /* XXX Pre-load all built-in timezones in libical.
-        *
-        *     Built-in time zones in libical 0.43 are loaded on demand,
-        *     but not in a thread-safe manner, resulting in a race when
-        *     multiple threads call icaltimezone_load_builtin_timezone()
-        *     on the same time zone.  Until built-in time zone loading
-        *     in libical is made thread-safe, work around the issue by
-        *     loading all built-in time zones now, so libical's internal
-        *     time zone array will be fully populated before any threads
-        *     are spawned.
-        *
-        *     This is apparently fixed with additional locking in
-        *     libical 3.0.1 and 3.0.2:
-        *     https://github.com/libical/libical/releases/tag/v3.0.1
-        *     https://github.com/libical/libical/releases/tag/v3.0.2
-        */
-       builtin_timezones = icaltimezone_get_builtin_timezones ();
-       for (ii = 0; ii < builtin_timezones->num_elements; ii++) {
-               icaltimezone *zone;
-
-               zone = icalarray_element_at (builtin_timezones, ii);
-
-               /* We don't care about the component right now,
-                * we just need some function that will trigger
-                * icaltimezone_load_builtin_timezone(). */
-               icaltimezone_get_component (zone);
-       }
-#endif
 
        return g_initable_new (
                E_TYPE_SUBPROCESS_CAL_FACTORY,
diff --git a/src/calendar/libedata-cal/libedata-cal.h b/src/calendar/libedata-cal/libedata-cal.h
index a754d7019..b1fa12538 100644
--- a/src/calendar/libedata-cal/libedata-cal.h
+++ b/src/calendar/libedata-cal/libedata-cal.h
@@ -23,7 +23,6 @@
 #include <libecal/libecal.h>
 #include <libebackend/libebackend.h>
 
-#include <libedata-cal/e-cal-backend-cache.h>
 #include <libedata-cal/e-cal-backend-factory.h>
 #include <libedata-cal/e-cal-backend.h>
 #include <libedata-cal/e-cal-backend-intervaltree.h>
diff --git a/src/calendar/libedata-cal/libedata-cal.pc.in b/src/calendar/libedata-cal/libedata-cal.pc.in
index da2670892..3b6cda36e 100644
--- a/src/calendar/libedata-cal/libedata-cal.pc.in
+++ b/src/calendar/libedata-cal/libedata-cal.pc.in
@@ -13,6 +13,6 @@ backenddir=@ecal_backenddir@
 Name: libedata-cal
 Description: Backend library for evolution calendars
 Version: @PROJECT_VERSION@
-Requires: libical libebackend-@API_VERSION@ libecal-@API_VERSION@
-Libs: -L${libdir} -ledata-cal-@API_VERSION@
+Requires: libical-glib libebackend-@API_VERSION@ libecal-@CAL_API_VERSION@
+Libs: -L${libdir} -ledata-cal-@CAL_API_VERSION@
 Cflags: -I${privincludedir}
diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c
index 91b13609a..14e1a6499 100644
--- a/src/camel/providers/imapx/camel-imapx-server.c
+++ b/src/camel/providers/imapx/camel-imapx-server.c
@@ -27,7 +27,7 @@
 #include <glib/gi18n-lib.h>
 #include <gio/gnetworking.h>
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 
 #ifndef G_OS_WIN32
 #include <glib-unix.h>
diff --git a/src/libedataserverui/libedataserverui.pc.in b/src/libedataserverui/libedataserverui.pc.in
index 1b9747f54..f631fe1ec 100644
--- a/src/libedataserverui/libedataserverui.pc.in
+++ b/src/libedataserverui/libedataserverui.pc.in
@@ -14,7 +14,7 @@ uimoduledir=@uimoduledir@
 Name: libedataserverui
 Description: UI utility library for Evolution Data Server
 Version: @PROJECT_VERSION@
-Requires: gio-2.0 gmodule-2.0 libsecret-1 libxml-2.0 libsoup-2.4 gtk+-3.0 libedataserver-@API_VERSION@ 
libecal-@API_VERSION@
+Requires: gio-2.0 gmodule-2.0 libsecret-1 libxml-2.0 libsoup-2.4 gtk+-3.0 libedataserver-@API_VERSION@ 
libecal-@CAL_API_VERSION@
 Requires.private: camel-@API_VERSION@
 Libs: -L${libdir} -ledataserver-@API_VERSION@ -ledataserverui-@API_VERSION@
 Cflags: -I${privincludedir}
diff --git a/src/services/evolution-calendar-factory/evolution-calendar-factory.c 
b/src/services/evolution-calendar-factory/evolution-calendar-factory.c
index 4217305bd..08a07a64b 100644
--- a/src/services/evolution-calendar-factory/evolution-calendar-factory.c
+++ b/src/services/evolution-calendar-factory/evolution-calendar-factory.c
@@ -25,7 +25,7 @@
 #include <gtk/gtk.h>
 #endif
 
-#include <libical/ical.h>
+#include <libical-glib/libical-glib.h>
 
 #include <libedataserver/libedataserver.h>
 #include <libedata-cal/libedata-cal.h>
@@ -84,13 +84,7 @@ main (gint argc,
                exit (EXIT_FAILURE);
        }
 
-#ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
        ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
-#endif
-
-#ifdef HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT
-       icaltzutil_set_exact_vtimezones_support (0);
-#endif
 
        e_xml_initialize_in_main ();
 
diff --git a/tests/libecal/CMakeLists.txt b/tests/libecal/CMakeLists.txt
index fbf037180..b580028e0 100644
--- a/tests/libecal/CMakeLists.txt
+++ b/tests/libecal/CMakeLists.txt
@@ -1,19 +1,14 @@
 set(extra_deps
        ecal
-       etestserverutils
 )
 
-set(extra_defines
-       -DLOCALEDIR=\"${LOCALE_INSTALL_DIR}\"
-)
+set(extra_defines)
 
 set(extra_cflags
        ${CALENDAR_CFLAGS}
 )
 
 set(extra_incdirs
-       ${CMAKE_BINARY_DIR}/src/calendar
-       ${CMAKE_SOURCE_DIR}/src/calendar
        ${CALENDAR_INCLUDE_DIRS}
 )
 
@@ -21,73 +16,22 @@ set(extra_ldflags
        ${CALENDAR_LDFLAGS}
 )
 
-set(SOURCES
-       ecal-test-utils.c
-       ecal-test-utils.h
-)
-
-add_library(ecal-test-utils STATIC
-       ${SOURCES}
-)
-
-add_dependencies(ecal-test-utils
-       edataserver
-       ${extra_deps}
-)
-
-target_compile_definitions(ecal-test-utils PRIVATE
-       -DG_LOG_DOMAIN=\"ecal-test-utils\"
-       ${extra_defines}
-)
-
-target_compile_options(ecal-test-utils PUBLIC
-       ${BACKEND_CFLAGS}
-       ${DATA_SERVER_CFLAGS}
-       ${extra_cflags}
-)
-
-target_include_directories(ecal-test-utils PUBLIC
-       ${CMAKE_BINARY_DIR}
-       ${CMAKE_BINARY_DIR}/src
-       ${CMAKE_SOURCE_DIR}/src
-       ${BACKEND_INCLUDE_DIRS}
-       ${DATA_SERVER_INCLUDE_DIRS}
-       ${extra_incdirs}
-)
-
-target_link_libraries(ecal-test-utils
-       edataserver
-       ${extra_deps}
-       ${BACKEND_LDFLAGS}
-       ${DATA_SERVER_LDFLAGS}
-       ${extra_ldflags}
-)
-
-set(extra_deps
-       ecal
-       ecal-test-utils
-)
-
 # Should be kept ordered approximately from least to most difficult/complex
 set(TESTS
-       test-ecal-get-timezone
-       test-ecal-add-timezone
-       test-ecal-set-default-timezone
-       test-ecal-recur-description
-       test-ecal-get-alarm-email-address
-       test-ecal-get-cal-address
-       test-ecal-get-ldap-attribute
-       test-ecal-get-capabilities
-       test-ecal-get-default-object
-       test-ecal-create-object
-       test-ecal-create-object--2
-       test-ecal-get-objects-for-uid
-       test-ecal-remove-object
-       test-ecal-get-object-list
-       test-ecal-modify-object
-       test-ecal-send-objects
-       test-ecal-receive-objects
-       test-ecal-get-query
+       test-cal-client-refresh
+       test-cal-client-add-timezone
+       test-cal-client-create-object
+       test-cal-client-remove-object
+       test-cal-client-get-object-list
+       test-cal-client-modify-object
+       test-cal-client-send-objects
+       test-cal-client-receive-objects
+        test-cal-client-bulk-methods
+       test-cal-client-get-attachment-uris
+       test-cal-client-get-view
+       test-cal-client-revision-view
+       test-cal-client-get-revision
+       test-cal-client-get-free-busy
 )
 
 foreach(_test ${TESTS})
@@ -104,24 +48,3 @@ foreach(_test ${TESTS})
                "TEST_INSTALLED_SERVICES=1"
        )
 endforeach(_test)
-
-# test-ecal-get-free-busy:
-#   broken by design, the API needs to be fixed.
-set(TESTS_SKIP
-       test-ecal-get-free-busy
-)
-
-foreach(_test ${TESTS_SKIP})
-       set(SOURCES ${_test}.c)
-
-       build_only_installable_test(${_test}
-               SOURCES
-               extra_deps
-               extra_defines
-               extra_cflags
-               extra_incdirs
-               extra_ldflags
-       )
-endforeach(_test)
-
-add_subdirectory(client)
diff --git a/tests/libecal/client/test-cal-client-add-timezone.c 
b/tests/libecal/test-cal-client-add-timezone.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-add-timezone.c
rename to tests/libecal/test-cal-client-add-timezone.c
index 85f4e58ee..6ae44745b 100644
--- a/tests/libecal/client/test-cal-client-add-timezone.c
+++ b/tests/libecal/test-cal-client-add-timezone.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-bulk-methods.c 
b/tests/libecal/test-cal-client-bulk-methods.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-bulk-methods.c
rename to tests/libecal/test-cal-client-bulk-methods.c
index 971424281..5e960bf3e 100644
--- a/tests/libecal/client/test-cal-client-bulk-methods.c
+++ b/tests/libecal/test-cal-client-bulk-methods.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-create-object.c 
b/tests/libecal/test-cal-client-create-object.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-create-object.c
rename to tests/libecal/test-cal-client-create-object.c
index 29e04b856..0d5bbd8f3 100644
--- a/tests/libecal/client/test-cal-client-create-object.c
+++ b/tests/libecal/test-cal-client-create-object.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-get-attachment-uris.c 
b/tests/libecal/test-cal-client-get-attachment-uris.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-get-attachment-uris.c
rename to tests/libecal/test-cal-client-get-attachment-uris.c
index 49cad5a47..48dd415f3 100644
--- a/tests/libecal/client/test-cal-client-get-attachment-uris.c
+++ b/tests/libecal/test-cal-client-get-attachment-uris.c
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-get-free-busy.c 
b/tests/libecal/test-cal-client-get-free-busy.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-get-free-busy.c
rename to tests/libecal/test-cal-client-get-free-busy.c
index d3949ea83..12ebbc610 100644
--- a/tests/libecal/client/test-cal-client-get-free-busy.c
+++ b/tests/libecal/test-cal-client-get-free-busy.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-get-object-list.c 
b/tests/libecal/test-cal-client-get-object-list.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-get-object-list.c
rename to tests/libecal/test-cal-client-get-object-list.c
index 3143dcdf4..45e333ae5 100644
--- a/tests/libecal/client/test-cal-client-get-object-list.c
+++ b/tests/libecal/test-cal-client-get-object-list.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-get-revision.c 
b/tests/libecal/test-cal-client-get-revision.c
similarity index 100%
rename from tests/libecal/client/test-cal-client-get-revision.c
rename to tests/libecal/test-cal-client-get-revision.c
diff --git a/tests/libecal/client/test-cal-client-get-view.c b/tests/libecal/test-cal-client-get-view.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-get-view.c
rename to tests/libecal/test-cal-client-get-view.c
index 228064613..c141c8f59 100644
--- a/tests/libecal/client/test-cal-client-get-view.c
+++ b/tests/libecal/test-cal-client-get-view.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-modify-object.c 
b/tests/libecal/test-cal-client-modify-object.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-modify-object.c
rename to tests/libecal/test-cal-client-modify-object.c
index 62afb49dd..7bc0ef579 100644
--- a/tests/libecal/client/test-cal-client-modify-object.c
+++ b/tests/libecal/test-cal-client-modify-object.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-receive-objects.c 
b/tests/libecal/test-cal-client-receive-objects.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-receive-objects.c
rename to tests/libecal/test-cal-client-receive-objects.c
index edc59257b..afc656a19 100644
--- a/tests/libecal/client/test-cal-client-receive-objects.c
+++ b/tests/libecal/test-cal-client-receive-objects.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-refresh.c b/tests/libecal/test-cal-client-refresh.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-refresh.c
rename to tests/libecal/test-cal-client-refresh.c
index 4eaf84130..a17892cd8 100644
--- a/tests/libecal/client/test-cal-client-refresh.c
+++ b/tests/libecal/test-cal-client-refresh.c
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-remove-object.c 
b/tests/libecal/test-cal-client-remove-object.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-remove-object.c
rename to tests/libecal/test-cal-client-remove-object.c
index be5dcbef4..200eaad2d 100644
--- a/tests/libecal/client/test-cal-client-remove-object.c
+++ b/tests/libecal/test-cal-client-remove-object.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-revision-view.c 
b/tests/libecal/test-cal-client-revision-view.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-revision-view.c
rename to tests/libecal/test-cal-client-revision-view.c
index fdb386ca7..c1b57fa4d 100644
--- a/tests/libecal/client/test-cal-client-revision-view.c
+++ b/tests/libecal/test-cal-client-revision-view.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libecal/client/test-cal-client-send-objects.c 
b/tests/libecal/test-cal-client-send-objects.c
similarity index 99%
rename from tests/libecal/client/test-cal-client-send-objects.c
rename to tests/libecal/test-cal-client-send-objects.c
index 609f24037..20e9ed0f1 100644
--- a/tests/libecal/client/test-cal-client-send-objects.c
+++ b/tests/libecal/test-cal-client-send-objects.c
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <libecal/libecal.h>
-#include <libical/ical.h>
 
 #include "e-test-server-utils.h"
 
diff --git a/tests/libedata-cal/test-cal-meta-backend.c b/tests/libedata-cal/test-cal-meta-backend.c
index f13215443..edfe7e1a8 100644
--- a/tests/libedata-cal/test-cal-meta-backend.c
+++ b/tests/libedata-cal/test-cal-meta-backend.c
@@ -3689,10 +3689,6 @@ main (gint argc,
        g_assert (g_setenv ("LC_ALL", "en_US.UTF-8", TRUE));
        setlocale (LC_ALL, "");
 
-#ifdef HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT
-       icaltzutil_set_exact_vtimezones_support (0);
-#endif
-
        e_test_server_utils_prepare_run (0);
        e_test_server_utils_setup (&tsfixture, &tsclosure);
 
diff --git a/tests/libedata-cal/test-intervaltree.c b/tests/libedata-cal/test-intervaltree.c
index 8d90a3556..9740ba246 100644
--- a/tests/libedata-cal/test-intervaltree.c
+++ b/tests/libedata-cal/test-intervaltree.c
@@ -19,7 +19,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <libical/ical.h>
 #include <libedata-cal/libedata-cal.h>
 
 #define NUM_INTERVALS_CLOSED  100
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 09a00bee1..13da331d0 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -96,7 +96,6 @@ add_weak_ref (ETestServerFixture *fixture,
        case E_TEST_SERVER_DIRECT_ADDRESS_BOOK:
        case E_TEST_SERVER_CALENDAR:
        case E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK:
-       case E_TEST_SERVER_DEPRECATED_CALENDAR:
 
                /* They're all the same object pointer */
                object = E_TEST_SERVER_UTILS_SERVICE (fixture, GObject);
@@ -152,7 +151,6 @@ assert_object_finalized (ETestServerFixture *fixture,
                ref = &fixture->client_ref;
                break;
        case E_TEST_SERVER_CALENDAR:
-       case E_TEST_SERVER_DEPRECATED_CALENDAR:
                message = "Timed out waiting for calendar client to finalize";
                ref = &fixture->client_ref;
                break;
@@ -380,7 +378,6 @@ e_test_server_utils_client_ready (GObject *source_object,
 
                break;
        case E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK:
-       case E_TEST_SERVER_DEPRECATED_CALENDAR:
        case E_TEST_SERVER_NONE:
                g_assert_not_reached ();
        }
@@ -490,29 +487,6 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
 
                break;
 
-       case E_TEST_SERVER_DEPRECATED_CALENDAR:
-
-               /* Dont bother testing the Async apis for deprecated APIs */
-               pair->fixture->service.calendar = e_cal_new (source, pair->closure->calendar_source_type);
-               if (!pair->fixture->service.calendar) {
-                       if (pair->retries < 3)
-                               need_retry = TRUE;
-                       else
-                               g_error ("Unable to create the test calendar");
-
-                       break;
-               }
-
-               if (!e_cal_open (pair->fixture->service.calendar, FALSE, &error)) {
-                       if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND) &&
-                           pair->retries < 3)
-                               need_retry = TRUE;
-                       else
-                               g_error ("Unable to open calendar: %s", error->message);
-               }
-
-               break;
-
        case E_TEST_SERVER_NONE:
                return;
        }
@@ -588,7 +562,6 @@ e_test_server_utils_bootstrap_idle (FixturePair *pair)
 
                break;
        case E_TEST_SERVER_CALENDAR:
-       case E_TEST_SERVER_DEPRECATED_CALENDAR:
 
                if (!pair->fixture->source_name)
                        pair->fixture->source_name = generate_source_name ();
@@ -747,15 +720,6 @@ e_test_server_utils_teardown (ETestServerFixture *fixture,
                fixture->service.calendar_client = NULL;
                break;
 
-       case E_TEST_SERVER_DEPRECATED_CALENDAR:
-               if (!closure->keep_work_directory &&
-                   !e_cal_remove (fixture->service.calendar, &error)) {
-                       g_message ("Failed to remove test calendar: %s (ignoring)", error->message);
-                       g_clear_error (&error);
-               }
-               g_object_unref (fixture->service.calendar);
-               fixture->service.calendar = NULL;
-
        case E_TEST_SERVER_NONE:
                break;
        }
diff --git a/tests/test-server-utils/e-test-server-utils.h b/tests/test-server-utils/e-test-server-utils.h
index c8bc74928..f6b5f1c87 100644
--- a/tests/test-server-utils/e-test-server-utils.h
+++ b/tests/test-server-utils/e-test-server-utils.h
@@ -62,7 +62,6 @@ typedef void (* ETestSourceCustomizeFunc) (ESource            *scratch,
  * @E_TEST_SERVER_DIRECT_ADDRESS_BOOK: An #EBookClient in direct read access mode will be created and opened 
for the test
  * @E_TEST_SERVER_CALENDAR: An #ECalClient will be created and opened for the test
  * @E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK: An #EBook will be created and opened for the test
- * @E_TEST_SERVER_DEPRECATED_CALENDAR: An #ECal will be created and opened for the test
  *
  * The type of service to test
  */
@@ -71,16 +70,14 @@ typedef enum {
        E_TEST_SERVER_ADDRESS_BOOK,
        E_TEST_SERVER_DIRECT_ADDRESS_BOOK,
        E_TEST_SERVER_CALENDAR,
-       E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK,
-       E_TEST_SERVER_DEPRECATED_CALENDAR
+       E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK
 } ETestServiceType;
 
 /**
  * ETestServerClosure:
  * @type:                 An #ETestServiceType, type of the service
  * @customize:            An #ETestSourceCustomizeFunc to use to parameterize the scratch #ESource, or %NULL
- * @calendar_source_type: An #ECalClientSourceType or #ECalSourceType; for %E_TEST_SERVER_CALENDAR
- *                        and %E_TEST_SERVER_DEPRECATED_CALENDAR tests
+ * @calendar_source_type: An #ECalClientSourceType for %E_TEST_SERVER_CALENDAR tests
  * @keep_work_directory:  If specified, the work directory will not be deleted between tests
  * @destroy_closure_func: A function to destroy an allocated #ETestServerClosure, this it
  *                        typically used by sub-fixtures which embed this structure in their closures.
@@ -94,7 +91,7 @@ typedef enum {
 struct _ETestServerClosure {
        ETestServiceType         type;
        ETestSourceCustomizeFunc customize;
-       gint                     calendar_source_type;
+       ECalClientSourceType     calendar_source_type;
        gboolean                 keep_work_directory;
        GDestroyNotify           destroy_closure_func;
        gboolean                 use_async_connect;
@@ -106,7 +103,6 @@ struct _ETestServerClosure {
  * @book_client: An #EBookClient, created for %E_TEST_SERVER_ADDRESS_BOOK tests
  * @calendar_client: An #ECalClient, created for %E_TEST_SERVER_CALENDAR tests
  * @book: An #EBook, created for %E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK tests
- * @calendar: An #ECal, created for %E_TEST_SERVER_DEPRECATED_CALENDAR tests
  *
  * A union of service types, holds the object to test in a #ETestServerFixture.
  *
@@ -116,7 +112,6 @@ typedef union {
        EBookClient *book_client;
        ECalClient  *calendar_client;
        EBook       *book;
-       ECal        *calendar;
 } ETestService;
 
 /**
diff --git a/tests/test-server-utils/test-fixture.c b/tests/test-server-utils/test-fixture.c
index 335ae9379..f1b17127e 100644
--- a/tests/test-server-utils/test-fixture.c
+++ b/tests/test-server-utils/test-fixture.c
@@ -27,7 +27,6 @@ static ETestServerClosure registry_closure = { E_TEST_SERVER_NONE, NULL, 0 };
 static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
 static ETestServerClosure calendar_closure = { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS 
};
 static ETestServerClosure deprecated_book_closure = { E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure deprecated_calendar_closure = { E_TEST_SERVER_DEPRECATED_CALENDAR, NULL, 
E_CAL_SOURCE_TYPE_EVENT };
 
 static void
 empty_test (ETestServerFixture *fixture,
@@ -44,7 +43,6 @@ main (gint argc,
        gchar **book_keys;
        gchar **calendar_keys;
        gchar **deprecated_book_keys;
-       gchar **deprecated_calendar_keys;
        gint i;
        gint ret;
 
@@ -55,7 +53,6 @@ main (gint argc,
        book_keys = g_new0 (gchar *, N_CYCLES);
        calendar_keys = g_new0 (gchar *, N_CYCLES);
        deprecated_book_keys = g_new0 (gchar *, N_CYCLES);
-       deprecated_calendar_keys = g_new0 (gchar *, N_CYCLES);
 
        for (i = 0; i < N_CYCLES; i++) {
                registry_keys[i] = g_strdup_printf ("/Fixture/Registry%d", i);
@@ -101,17 +98,6 @@ main (gint argc,
                        e_test_server_utils_teardown);
        }
 
-       for (i = 0; i < N_CYCLES; i++) {
-               deprecated_calendar_keys[i] = g_strdup_printf ("/Fixture/Deprecated/Calendar%d", i);
-               g_test_add (
-                       deprecated_calendar_keys[i],
-                       ETestServerFixture,
-                       &deprecated_calendar_closure,
-                       e_test_server_utils_setup,
-                       empty_test,
-                       e_test_server_utils_teardown);
-       }
-
        ret = e_test_server_utils_run ();
 
        for (i = 0; i < N_CYCLES; i++) {
@@ -119,14 +105,12 @@ main (gint argc,
                g_free (book_keys[i]);
                g_free (calendar_keys[i]);
                g_free (deprecated_book_keys[i]);
-               g_free (deprecated_calendar_keys[i]);
        }
 
        g_free (registry_keys);
        g_free (book_keys);
        g_free (calendar_keys);
        g_free (deprecated_book_keys);
-       g_free (deprecated_calendar_keys);
 
        return ret;
 }


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