[evolution-kolab/ek-wip-porting] ECalBackendKolab: rewrite to 3.x E-D-S API (started)



commit dfa6ca95666494793cf73a8bdeb67af3c592e817
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Dec 12 16:22:55 2011 +0100

    ECalBackendKolab: rewrite to 3.x E-D-S API (started)
    
    * added skeleton implementations for ECalBackend(Sync)
      virtual functions
    * removed setter function for local KolabMailAccess
      reference (we will take care of that internally)
    * moved old code into probably-fitting places,
      commented out (to be ported later)

 src/calendar/e-cal-backend-kolab.c | 1851 ++++++++++++++++++++----------------
 src/calendar/e-cal-backend-kolab.h |   18 +-
 src/calendar/kolab-util-calendar.h |   14 +-
 3 files changed, 1051 insertions(+), 832 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index b5ccf7e..cd8cb9f 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -13,12 +13,12 @@
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
@@ -26,9 +26,10 @@
 
 /*----------------------------------------------------------------------------*/
 
-#include "kolab-util-calendar.h"
-#include "kolab-util-calendar-cache.h"
-#include "e-cal-backend-kolab.h"
+#include <libedata-cal/e-cal-backend-cache.h>
+#include <libecal/e-cal.h>
+
+#include <libical/ical.h>
 
 #include <libekolab/kolab-types.h>
 #include <libekolab/kolab-mail-access.h>
@@ -40,11 +41,14 @@
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-cal-freebusy.h>
 
-#include <libedata-cal/e-cal-backend-cache.h>
-#include <libecal/e-cal.h>
-#include <camel/camel-exception.h>
+#include "kolab-util-calendar.h"
+#include "kolab-util-calendar-cache.h"
+#include "e-cal-backend-kolab.h"
 
-#include <libical/ical.h>
+/*----------------------------------------------------------------------------*/
+/* table of KolabMailAccess objects */
+
+/* static GHashTable *koma_objects = NULL; */
 
 /*----------------------------------------------------------------------------*/
 
@@ -54,8 +58,6 @@ G_DEFINE_TYPE (ECalBackendKolab, e_cal_backend_kolab, E_TYPE_CAL_BACKEND_SYNC)
 
 /* private structures for Kolab calendar class ********************************/
 
-static ECalBackendSyncStatus e_cal_backend_kolab_add_timezone (ECalBackendSync *backend, EDataCal *cal, const gchar *tzobj);
-
 /* TODO check what is appropriate for Kolab here */
 
 typedef struct {
@@ -67,11 +69,6 @@ typedef struct {
 /* Private part of the ECalBackendKolab structure */
 typedef struct _ECalBackendKolabPrivate ECalBackendKolabPrivate;
 struct _ECalBackendKolabPrivate {
-	/*
-	kolab_id_t 		fid;
-	uint32_t 		olFolder;
-	gchar 			*profile;
-	*/
 	GHashTable		*koma_table;
 	CalMode			cal_mode;
 	KolabMailAccess		*cal_koma;
@@ -83,191 +80,48 @@ struct _ECalBackendKolabPrivate {
 	gchar *			cal_uri;
 };
 
-/* Forward declarations for internal use */
-
-static void e_cal_backend_kolab_set_mode (ECalBackend *backend, CalMode mode);
-
-/* implementation of parent class' virtual methods ****************************/
-
-/**
- * e_cal_backend_kolab_is_read_only:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @read_only: Return value for read-only status.
- *
- * Queries whether a calendar backend is read only or not.
- *
- * Returns: Status code.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_is_read_only (ECalBackendSync *backend,
-                                  EDataCal *cal,
-                                  gboolean *read_only)
-{
-	(void) cal;
-
-	g_return_val_if_fail (backend && E_IS_CAL_BACKEND_KOLAB (backend), GNOME_Evolution_Calendar_OtherError);
-	g_return_val_if_fail (read_only, GNOME_Evolution_Calendar_OtherError);
-
-	*read_only = FALSE;
-	
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_is_read_only () */
-
-/**
- * e_cal_backend_kolab_get_cal_address:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @address: Return value for the address.
- *
- * Queries the cal address associated with a calendar backend, which must
- * already have an open calendar.
- *
- * Returns: Status code.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_cal_address (ECalBackendSync *backend,
-                                     EDataCal *cal,
-                                     gchar **address)
-{
-	/* See comment at e_cal_backend_kolab_get_alarm_email_address (). */
-	(void) backend;
-	(void) cal;
-
-	*address = NULL;
-
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_cal_address () */
-
-/**
- * e_cal_backend_kolab_get_alarm_email_address:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @address: Return value for the address.
- *
- * Queries the address to be used for alarms in a calendar client.
- *
- * Returns: Status code.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_alarm_email_address (ECalBackendSync *backend,
-                                             EDataCal *cal,
-                                             gchar **address)
-{
-	/* There is no obvious implementation for this feature in the context
-	 * of kolab: The question to answer would be: how does a user supply, 
-	 * to which e-mail address a notification about an alarm should be send.
-	 */
-	(void) backend;
-	(void) cal;
-
-	*address = NULL;
-
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_alarm_email_address () */
-
-/**
- * e_cal_backend_kolab_get_ldap_attribute:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @attribute: Return value for the LDAP attribute.
- *
- * Queries the LDAP attribute for a calendar client. This implementation 
- * always provides NULL via the LDAP attribute.
- *
- * Returns: ECalBackendSyncStatus code.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_ldap_attribute (ECalBackendSync *backend,
-                                        EDataCal *cal,
-                                        char **attribute)
-{
-	/* ..._get_ldap_attribute is only required by Sun ONE connector.
-	 * Whatever that means, it seems sufficient to return NULL via *attribute.
-	 */
-	(void) backend;
-	(void) cal;
-
-	*attribute = NULL;
-
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_ldap_attribute () */
-
-/**
- * e_cal_backend_kolab_get_static_capabilities:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @capabilities: Return value for capabilities.
- *
- * Queries the calendar for static capabilities.
- *
- * Returns: Status code.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_static_capabilities (ECalBackendSync *backend,
-                                             EDataCal *cal,
-                                             gchar **capabilities)
-{
-	(void) backend;
-	(void) cal;
-
-	*capabilities = g_strdup ("");
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_static_capabilities () */
+/*----------------------------------------------------------------------------*/
+/* internal statics */
 
 /**
  * e_cal_backend_kolab_open:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
+ * @cancellable: A cancellation stack.
  * @only_if_exists: Whether to open the calendar if and only if it already exists
  * or just create it when it does not exist.
- * @username: User name to use for authentication.
- * @password: Password to use for authentication.
+ * @err: A GError placeholder.
  *
  * Opens a calendar backend with data from a calendar stored at the specified URI.
- *
- * Returns: Status code.
  */
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_open (ECalBackendSync *backend,
                           EDataCal *cal,
+                          GCancellable *cancellable,
                           gboolean only_if_exists,
-                          const gchar *username,
-                          const gchar *password)
+                          GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	gchar *servername = NULL;
-	gchar *user_at_server = NULL;
-	CamelURL *c_url = NULL;
-	CamelException *cex = NULL;
-	GError *error = NULL;
-	ESource *esource = NULL;
-	icalcomponent_kind icalkind;
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
-	gboolean ok;
-	KolabMailAccess *tmp_koma = NULL;
-	gchar *tmp_key = NULL;
-	const gchar *prop_str = NULL;
-	gchar *sourcename = NULL;
-	KolabSyncStrategyID sync_value;
-#if 0
-	KolabTLSVariantID enc_value;
-	KolabReqPkcs11 req_pkcs11_value;
-#endif
-	KolabSettingsHandler *ksettings = NULL;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)only_if_exists; /* FIXME */
+	g_return_if_fail (err == NULL || *err == NULL);
 
-	(void)cal;
-	(void)only_if_exists;
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
 
-	/* to trigger eds to pass along username and password, set the property 
+#if 0 /* FIXME old */
+	/* to trigger eds to pass along username and password, set the property
 	 * "auth" to "true" in the source setting:
 	 * <property name="auth" value="true"/>
 	 * <property name="username" value="..."/>
 	 */
 
 	if (priv->already_opened == TRUE) return status;
-	
+
 	esource = e_cal_backend_get_source (E_CAL_BACKEND (backend));
 	/* Getting the esource from the cal-Object did not work as expected? */
 
@@ -284,20 +138,22 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
 		priv->source_type = E_CAL_SOURCE_TYPE_JOURNAL;
 		break;
 	default:
-		g_error ("%s()[%u]: Unknown Type used in e-cal-backend-kolab initialization!", __func__, __LINE__);
+		g_error ("%s()[%u]: Unknown Type used in e-cal-backend-kolab initialization!",
+		         __func__, __LINE__);
 	}
 
 	kolab_util_glib_init ();
 	kolab_util_http_init ();
 	/* libcamel
 	 * Curl init may configure the underlying SSL lib,
-	 * but as far as SSL goes, we want Camel to rule here 
+	 * but as far as SSL goes, we want Camel to rule here
 	 * TODO check whether Camel session needs to be initialized before or after libcurl.
 	 */
 	ok = kolab_util_camel_init (&error);
 	if (! ok) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		error = NULL;
 	}
@@ -307,7 +163,9 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
 	cex = camel_exception_new ();
 	c_url = camel_url_new (priv->cal_uri, cex);
 	if (c_url == NULL) {
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, camel_exception_get_description (cex));
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__,
+		           camel_exception_get_description (cex));
 		camel_exception_free (cex);
 		status = GNOME_Evolution_Calendar_OtherError;
 	}
@@ -318,7 +176,8 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
 	if (priv->cal_cache != NULL) {
 		g_object_unref (priv->cal_cache);
 	}
-	priv->cal_cache = e_cal_backend_cache_new (priv->cal_uri, priv->source_type);
+	priv->cal_cache = e_cal_backend_cache_new (priv->cal_uri,
+	                                           priv->source_type);
 	ok = e_file_cache_clean (E_FILE_CACHE (priv->cal_cache));
 
 	/* Prepare data from sync strategy property */
@@ -329,85 +188,112 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
 	/* This was the easy part. Now try to get the KoMA objects figured out */
 	user_at_server = g_strdup_printf ("%s %s", username, servername);
 
-	ok = g_hash_table_lookup_extended (priv->koma_table, user_at_server, (gpointer *) &tmp_key, (gpointer *) &tmp_koma);
+	ok = g_hash_table_lookup_extended (priv->koma_table,
+	                                   user_at_server,
+	                                   (gpointer *) &tmp_key,
+	                                   (gpointer *) &tmp_koma);
 	if (ok) {
 		/* There is already a KoMA instance for $servername. Use it and return */
 		g_object_ref (tmp_koma);
 		priv->cal_koma = tmp_koma;
 		g_free (user_at_server);
 		ksettings = kolab_mail_access_get_settings_handler (priv->cal_koma);
-		kolab_util_backend_prepare_settings (ksettings, NULL, NULL, NULL, NULL, sourcename, &sync_value);
+		kolab_util_backend_prepare_settings (ksettings,
+		                                     NULL,
+		                                     NULL,
+		                                     NULL,
+		                                     NULL,
+		                                     sourcename,
+		                                     &sync_value);
 		goto notifications;
 	}
 	/* Otherwise we need to setup a new KoMA instance and a settings handler */
 
 	ksettings = KOLAB_SETTINGS_HANDLER (g_object_new (KOLAB_TYPE_SETTINGS_HANDLER, NULL));
-	(void) kolab_settings_handler_configure (ksettings, KOLAB_FOLDER_CONTEXT_CALENDAR, &error);
+	(void) kolab_settings_handler_configure (ksettings,
+	                                         KOLAB_FOLDER_CONTEXT_CALENDAR,
+	                                         &error);
 	if (error != NULL) {
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		error = NULL;
 	}
-	(void) kolab_settings_handler_bringup (ksettings, &error);
+	(void) kolab_settings_handler_bringup (ksettings,
+	                                       &error);
 	if (error != NULL) {
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		error = NULL;
 	}
-	kolab_util_backend_prepare_settings (ksettings, esource, servername, username, password, sourcename, &sync_value);
+	kolab_util_backend_prepare_settings (ksettings,
+	                                     esource,
+	                                     servername,
+	                                     username,
+	                                     password,
+	                                     sourcename,
+	                                     &sync_value);
 
 	priv->cal_koma = KOLAB_MAIL_ACCESS (g_object_new (KOLAB_TYPE_MAIL_ACCESS, NULL));
-	g_object_add_toggle_ref (G_OBJECT (priv->cal_koma), kolab_util_backend_koma_table_cleanup_cb, priv->koma_table);
-	g_hash_table_insert (priv->koma_table, user_at_server, priv->cal_koma);
-
-	kolab_mail_access_configure (priv->cal_koma, ksettings, &error);
+	g_object_add_toggle_ref (G_OBJECT (priv->cal_koma),
+	                         kolab_util_backend_koma_table_cleanup_cb,
+	                         priv->koma_table);
+	g_hash_table_insert (priv->koma_table,
+	                     user_at_server,
+	                     priv->cal_koma);
+
+	kolab_mail_access_configure (priv->cal_koma,
+	                             ksettings,
+	                             &error);
 	g_object_unref (ksettings);
 	if (error != NULL) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		return status;
 	}
-	kolab_mail_access_bringup (priv->cal_koma, &error);
+	kolab_mail_access_bringup (priv->cal_koma,
+	                           &error);
 	if (error != NULL) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		return status;
 	}
-	
-notifications:
+
+ notifications:
 	priv->already_opened = TRUE;
-	e_cal_backend_kolab_set_mode (E_CAL_BACKEND (backend), priv->cal_mode);
+	e_cal_backend_kolab_set_mode (E_CAL_BACKEND (backend),
+	                              priv->cal_mode);
 
 	g_free (sourcename);
 	g_free (servername);
 
 	return status;
-} /* e_cal_backend_kolab_open () */
-
-static ECalBackendSyncStatus
-e_cal_backend_kolab_refresh (ECalBackendSync *backend,
-                             EDataCal *cal)
-{
-	/* TODO: implement me */
-	(void) backend;
-	(void) cal;
-
-	g_warning ("Unimplemented method called: %s()", __func__);
-
-	return GNOME_Evolution_Calendar_UnsupportedMethod;
-} /* e_cal_backend_kolab_refresh () */
+#endif
+}
 
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_remove (ECalBackendSync *backend,
-                            EDataCal *cal)
+                            EDataCal *cal,
+                            GCancellable *cancellable,
+                            GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
 
-	(void) cal;
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
 
+#if 0 /* FIXME old */
 	if (priv->already_opened != FALSE) {
 		g_object_unref (priv->cal_koma);
 		priv->cal_koma = NULL;
@@ -422,110 +308,121 @@ e_cal_backend_kolab_remove (ECalBackendSync *backend,
 	}
 
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_remove () */
+#endif
+}
 
-/**
- * e_cal_backend_kolab_get_default_object:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @object: Placeholder for returned object.
- *
- * Returns the default object via object placeholder.
- *
- * Returns: Status code.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_default_object (ECalBackendSync *backend,
-                                        EDataCal *cal,
-                                        gchar **object)
+static void
+e_cal_backend_kolab_refresh (ECalBackendSync *backend,
+                             EDataCal *cal,
+                             GCancellable *cancellable,
+                             GError **err)
 {
-	/* FIXME: Remove experimental code related to summary*/
-	ECalComponent *comp;
-	ECalComponentText *summary = NULL;
-	ECalComponentText *desc = NULL;
-	GSList *desclist = NULL;
-	gchar *tmpsum = g_strdup ("");
-	gchar *tmploc = g_strdup ("");
-	gchar *tmpdesc1 = g_strdup ("");
-	(void) cal;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
 
-	summary = g_new0 (ECalComponentText, 1);
-	summary->value=tmpsum;
-	desc = g_new0 (ECalComponentText, 1);
-	desc->value=tmpdesc1;
-	desclist = g_slist_append(desclist, desc);
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_return_if_fail (err == NULL || *err == NULL);
 
-	comp = e_cal_component_new ();
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
 
-	switch (e_cal_backend_get_kind (E_CAL_BACKEND (backend))) {
-	case ICAL_VEVENT_COMPONENT:
-		e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
-		e_cal_component_set_summary (comp, summary);
-		e_cal_component_set_description_list (comp, desclist);
-		e_cal_component_set_location (comp, tmploc);
-		break;
-	default:
-		g_object_unref (comp);
-		return GNOME_Evolution_Calendar_ObjectNotFound;
-	}
+static gboolean
+e_cal_backend_kolab_get_backend_property (ECalBackendSync *backend,
+                                          EDataCal *cal,
+                                          GCancellable *cancellable,
+                                          const gchar *prop_name,
+                                          gchar **prop_value,
+                                          GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
 
-	*object = e_cal_component_get_as_string (comp);
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (prop_name != NULL);
+	(void)prop_value; /* FIXME */ /* must be NULL? */
+	g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
 
-	if (comp)
-		g_object_unref (comp);
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
 
-	g_free (summary);
-	g_free (tmploc);
-	g_free (tmpdesc1);
-	g_slist_foreach (desclist, (GFunc) g_free, NULL);
-	g_slist_free (desclist);
+	return FALSE;
+}
 
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_default_object () */
+static gboolean
+e_cal_backend_kolab_set_backend_property (ECalBackendSync *backend,
+                                          EDataCal *cal,
+                                          GCancellable *cancellable,
+                                          const gchar *prop_name,
+                                          const gchar *prop_value,
+                                          GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (prop_name != NULL);
+	(void)prop_value; /* FIXME */ /* may be NULL? */
+	g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+	return FALSE;
+}
 
 /**
  * e_cal_backend_kolab_get_object:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
+ * @cancellable: A cancellation stack.
  * @uid: UID of the object to get.
  * @rid: Recurrence ID of the specific instance to get, or NULL if getting the
  * master object.
- * @object: Placeholder for returned object.
+ * @calobject: Placeholder for returned object.
+ * @err: GError placeholder.
  *
  * Queries a calendar backend for a calendar object based on its unique
  * identifier and its recurrence ID (if a recurrent appointment).
- *
- * Returns: Status code.
  */
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_get_object (ECalBackendSync *backend,
                                 EDataCal *cal,
+                                GCancellable *cancellable,
                                 const gchar *uid,
                                 const gchar *rid,
-                                gchar **object)
+                                gchar **calobj,
+                                GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	ECalComponent *ecalcomp = NULL;
-#if 0
-	ECalComponent *oldcomp = NULL;
-	gchar *old_object = NULL;
-#endif
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
-	GError *error = NULL;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (uid != NULL);
+	(void)rid; /* FIXME */ /* may be NULL? */
+	(void)calobj; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
 
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) cal;
 	(void) rid;
-#if 0
-	oldcomp = e_cal_backend_cache_get_component (priv->cal_cache, uid, rid);
-	if (oldcomp == NULL)
-		old_object = NULL;
-	else {
-		old_object = e_cal_component_get_as_string (oldcomp);
-		g_object_unref (oldcomp);
-	}
-#endif
-	ecalcomp = kolab_util_calendar_cache_get_object (priv->cal_cache, priv->cal_koma, priv->cal_uri, uid, FALSE, &error);
+	ecalcomp = kolab_util_calendar_cache_get_object (priv->cal_cache,
+	                                                 priv->cal_koma,
+	                                                 priv->cal_uri,
+	                                                 uid,
+	                                                 FALSE,
+	                                                 &error);
 	if (error != NULL) {
 		status = kolab_util_calendar_map_error (error);
 		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
@@ -542,28 +439,46 @@ e_cal_backend_kolab_get_object (ECalBackendSync *backend,
 	}
 
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_object () */
+#endif
+}
 
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_get_object_list (ECalBackendSync *backend,
                                      EDataCal *cal,
-                                     const gchar *query,
-                                     GList **objects)
+                                     GCancellable *cancellable,
+                                     const gchar *sexp,
+                                     GSList **calobjs,
+                                     GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	gchar *sourcename = NULL;
-	GList *uid_list = NULL;
-	GList *it = NULL;
-	GError *error = NULL;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)sexp; /* FIXME */ /* sexp may be NULL */
+	(void)calobjs; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) cal;
 
 	sourcename = kolab_util_backend_get_relative_path_from_uri (priv->cal_uri);
 
-	kolab_util_calendar_cache_update_on_query (priv->cal_cache, priv->cal_koma, query, priv->cal_uri);
-	uid_list = kolab_mail_access_query_uids (priv->cal_koma, sourcename, query, &error);
+	kolab_util_calendar_cache_update_on_query (priv->cal_cache,
+	                                           priv->cal_koma,
+	                                           query,
+	                                           priv->cal_uri);
+	uid_list = kolab_mail_access_query_uids (priv->cal_koma,
+	                                         sourcename,
+	                                         query,
+	                                         &error);
 	if (error != NULL) {
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		error = NULL;
 	}
@@ -571,15 +486,21 @@ e_cal_backend_kolab_get_object_list (ECalBackendSync *backend,
 	for (it = g_list_first (uid_list); it != NULL; it = g_list_next (it)) {
 		gchar *uid = it->data;
 		ECalComponent *ecalcomp = NULL;
-		ecalcomp = kolab_util_calendar_cache_get_object (priv->cal_cache, priv->cal_koma, priv->cal_uri, uid, TRUE, &error);
+		ecalcomp = kolab_util_calendar_cache_get_object (priv->cal_cache,
+		                                                 priv->cal_koma,
+		                                                 priv->cal_uri,
+		                                                 uid,
+		                                                 TRUE,
+		                                                 &error);
 		if (error != NULL) {
-			g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+			g_warning ("%s()[%u]: %s",
+			           __func__, __LINE__, error->message);
 			g_error_free (error);
 			error = NULL;
 		}
-		/* [FIXME speed] ecalcomp = e_cal_backend_cache_get_component (priv->cal_cache, uid, NULL); */		
 		if (ecalcomp != NULL) {
-			*objects = g_list_append (*objects, e_cal_component_get_as_string (ecalcomp));
+			*objects = g_list_append (*objects,
+			                          e_cal_component_get_as_string (ecalcomp));
 			g_object_unref (ecalcomp);
 		}
 	}
@@ -588,66 +509,139 @@ e_cal_backend_kolab_get_object_list (ECalBackendSync *backend,
 	kolab_util_glib_glist_free (uid_list);
 
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_object_list () */
-
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_attachment_list (ECalBackendSync *backend,
-                                         EDataCal *cal,
-                                         const gchar *uid,
-                                         const gchar *rid,
-                                         GSList **list)
-{
-	/* currently not supported. */
-	(void) backend;
-	(void) cal;
-	(void) uid;
-	(void) rid;
-	(void) list;
-g_error ("%s()[%u]: called.", __func__, __LINE__);
-	return GNOME_Evolution_Calendar_UnsupportedMethod;
-} /* e_cal_backend_kolab_get_attachment_list () */
+#endif
+}
 
-/**
- * e_cal_backend_kolab_create_object:
- * @backend: (sync) kolab calendar backend object.
- * @cal: An EDataCal object.
- * @calobj: Contains the event to be created in the calendar as iCalendar string.
- * @uid: Return value of the created events uid.
- *
- * Creates a new calendar entry in the Kolab calendar. This method gets called, 
- * when Evolution requests a new entry to be saved in the calendar.
- */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_create_object (ECalBackendSync *backend,
+static void
+e_cal_backend_kolab_get_free_busy (ECalBackendSync *backend,
                                    EDataCal *cal,
-                                   gchar **calobj,
-                                   gchar **uid)
+                                   GCancellable *cancellable,
+                                   const GSList *users,
+                                   time_t start,
+                                   time_t end,
+                                   GSList **freebusyobjs,
+                                   GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	ECalComponent *ecalcomp = NULL;
-	ECalComponent *tzcomp = NULL;
-	GError *error = NULL;
-	const gchar *tmp_uid = NULL;
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
-		
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)users; /* FIXME */
+	(void)start; /* FIXME */
+	(void)end; /* FIXME */
+	(void)freebusyobjs; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) cal;
+	(void) start;
+	(void) end;
 
-	/* What do we have here? There is an ECalComponent, unable to hold
-	 * timezone information and an calendar entry at the same time.
+	ksettings = kolab_mail_access_get_settings_handler (priv->cal_koma);
+	if (ksettings == NULL)
+		return GNOME_Evolution_Calendar_OtherError;
+
+	/* receive the xfb information */
+	for (it = g_list_first(users); it != NULL; it = g_list_next (it)) {
+		KolabHttpJob *job = NULL;
+		ECalComponent *ecalcomp = NULL;
+
+		job = kolab_util_calendar_retrieve_xfb (ksettings, (gchar *) it->data);
+		if (job != NULL) {
+			ecalcomp = kolabconv_cal_util_freebusy_ecalcomp_new_from_ics ((gchar *) (job->buffer->data),
+			                                                              job->nbytes,
+			                                                              &error);
+			if (error != NULL) {
+				g_warning ("%s", error->message);
+				g_error_free (error);
+				error = NULL;
+				internal_state = FALSE;
+			}
+			kolab_http_job_free (job);
+		}
+		if (ecalcomp == NULL) {
+			/* this is not an error, but there's no F/B
+			 * information available.
+			 */
+			g_object_unref (ksettings);
+			return GNOME_Evolution_Calendar_ObjectNotFound;
+		}
+		else {
+			*freebusy = g_list_append (*freebusy,
+			                           g_strdup (e_cal_component_get_as_string (ecalcomp)));
+			g_object_unref (ecalcomp);
+		}
+	}
+	g_object_unref (ksettings);
+	if (internal_state == TRUE)
+		return GNOME_Evolution_Calendar_Success;
+	else
+		return GNOME_Evolution_Calendar_OtherError;
+#endif
+}
+
+/**
+ * e_cal_backend_kolab_create_object:
+ * @backend: (sync) kolab calendar backend object.
+ * @cal: An EDataCal object.
+ * @cancellable: A cancellation stack
+ * @calobj: Contains the event to be created in the calendar as iCalendar string.
+ * @uid: Return value of the created events uid.
+ * @new_component: The newly created component, serialized as ical component string.
+ * @err: A GError placeholder.
+ *
+ * Creates a new calendar entry in the Kolab calendar. This method gets called
+ * when Evolution requests a new entry to be saved in the calendar.
+ */
+static void
+e_cal_backend_kolab_create_object (ECalBackendSync *backend,
+                                   EDataCal *cal,
+                                   GCancellable *cancellable,
+                                   const gchar *calobj,
+                                   gchar **uid,
+                                   icalcomponent **new_component,
+                                   GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)calobj; /* FIXME */
+	(void)uid; /* FIXME */
+	(void)new_component; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
+	(void) cal;
+
+	/* What do we have here? There is an ECalComponent, unable to hold
+	 * timezone information and an calendar entry at the same time.
 	 * So Kolab glue code expects two ECalComponents, one for the calendar entry
 	 * one for the timezone.
 	 */
 	ecalcomp = e_cal_component_new_from_string (*calobj);
 	if (ecalcomp == NULL) {
-		g_warning (" + **calobj could not be parsed into ECalComponent: %s", *calobj);
+		g_warning (" + **calobj could not be parsed into ECalComponent: %s",
+		           *calobj);
 		return GNOME_Evolution_Calendar_InvalidObject;
 	}
-	tzcomp = kolab_util_calendar_cache_get_tz (priv->cal_cache, ecalcomp);
+	tzcomp = kolab_util_calendar_cache_get_tz (priv->cal_cache,
+	                                           ecalcomp);
 
 	if (tzcomp == NULL) {
 		gchar *tzid = NULL;
-		tzid = kolab_util_calendar_get_tzid (ecalcomp, E_CAL_COMPONENT_FIELD_DTSTART);
+		tzid = kolab_util_calendar_get_tzid (ecalcomp,
+		                                     E_CAL_COMPONENT_FIELD_DTSTART);
 		/* If tzid is UTC, everything is fine */
 		if (g_strcmp0 ("UTC", tzid) == 0) {
 			g_free (tzid);
@@ -660,17 +654,23 @@ e_cal_backend_kolab_create_object (ECalBackendSync *backend,
 			 */
 			g_free (tzid);
 			g_object_unref (ecalcomp);
-			/* Don't ever expect to get the following message to see.
-			 * Ignorance is bliss. 
-			 */
-			e_data_cal_notify_error (cal, "TZID is set, but no timezone is available. Currently this may happen, if an object is copied to an empty calendar.");
+			/* Don't ever expect to get to see the following message */
+			e_data_cal_notify_error (cal, "TZID is set, but no timezone is available. "
+			                         "Currently this may happen if an object is copied "
+			                         "to an empty calendar.");
 			return GNOME_Evolution_Calendar_InvalidObject;
 		}
 	}
 
-	if (! kolab_util_calendar_cache_assure_uid_on_ecalcomponent (priv->cal_cache, priv->cal_koma, priv->cal_uri, ecalcomp, FALSE, &error)) {
+	if (! kolab_util_calendar_cache_assure_uid_on_ecalcomponent (priv->cal_cache,
+	                                                             priv->cal_koma,
+	                                                             priv->cal_uri,
+	                                                             ecalcomp,
+	                                                             FALSE,
+	                                                             &error)) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		g_object_unref (ecalcomp);
 		if (tzcomp != NULL)
@@ -678,14 +678,19 @@ e_cal_backend_kolab_create_object (ECalBackendSync *backend,
 		return status;
 	}
 
-	kolab_util_calendar_store (ecalcomp, tzcomp, priv->default_zone, priv->cal_koma, priv->cal_uri, &error);
+	kolab_util_calendar_store (ecalcomp,
+	                           tzcomp,
+	                           priv->default_zone,
+	                           priv->cal_koma,
+	                           priv->cal_uri,
+	                           &error);
 	if (error != NULL) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		return status;
-	}	
-	/* [FIXME speed] e_cal_backend_cache_put_component (priv->cal_cache, ecalcomp); */
+	}
 	e_cal_component_get_uid (ecalcomp, &tmp_uid);
 	*uid = g_strdup (tmp_uid);
 	*calobj = e_cal_component_get_as_string (ecalcomp);
@@ -695,42 +700,51 @@ e_cal_backend_kolab_create_object (ECalBackendSync *backend,
 	g_object_unref (ecalcomp);
 
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_create_object () */
+#endif
+}
 
 /**
  * e_cal_backend_kolab_modify_object:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
+ * @cancellable: A cancellation stack.
  * @calobj: Object to be modified.
  * @mod: Type of modification to be done.
- * @old_object: Placeholder for returning the old object as it was stored on the
+ * @old_component: Placeholder for returning the old object as it was stored on the
  * backend.
- * @new_object: Placeholder for returning the new object as it has been stored
+ * @new_component: Placeholder for returning the new object as it has been stored
  * on the backend.
+ * @err: A GError placeholder.
  *
- * Requests the calendar backend to modify an existing object. If the object 
+ * Requests the calendar backend to modify an existing object. If the object
  * does not exist on the calendar, it will be issued as new event.
- *
- * Returns: Status code.
  */
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
                                    EDataCal *cal,
+                                   GCancellable *cancellable,
                                    const gchar *calobj,
                                    CalObjModType mod,
-                                   gchar **old_object,
-                                   gchar **new_object)
+                                   icalcomponent **old_component,
+                                   icalcomponent **new_component,
+                                   GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	ECalComponent *ecalcomp = NULL;
-	ECalComponent *oldcomp = NULL;
-	ECalComponent *ecaltz = NULL;
-	GError *error = NULL;
-	const gchar *uid = NULL;
-	gboolean is_instance = FALSE;
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
-	
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)calobj; /* FIXME */
+	(void)mod; /* FIXME */
+	(void)old_component; /* FIXME */ /* must not be NULL? */
+	(void)new_component; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+# if 0 /* FIXME old */
 	(void) mod;
 	(void) cal;
 
@@ -751,11 +765,17 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 	if (ecalcomp == NULL)
 		return GNOME_Evolution_Calendar_InvalidObject;
 	e_cal_component_get_uid (ecalcomp, &uid);
-	
-	oldcomp = kolab_util_calendar_cache_get_object (priv->cal_cache, priv->cal_koma, priv->cal_uri, uid, FALSE, &error);
+
+	oldcomp = kolab_util_calendar_cache_get_object (priv->cal_cache,
+	                                                priv->cal_koma,
+	                                                priv->cal_uri,
+	                                                uid,
+	                                                FALSE,
+	                                                &error);
 	if (error != NULL) {
 		/* TODO: how to handle request to modify non existing objects? */
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		g_object_unref (ecalcomp);
 		g_object_unref (oldcomp);
@@ -768,7 +788,8 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 	 * to the timezone has been made. In any other case the timezone
 	 * information from ecalcomp and oldcomp should be all the same.
 	 */
-	ecaltz = kolab_util_calendar_cache_get_tz (priv->cal_cache, ecalcomp);
+	ecaltz = kolab_util_calendar_cache_get_tz (priv->cal_cache,
+	                                           ecalcomp);
 	is_instance = e_cal_component_is_instance (ecalcomp);
 	if (is_instance) {
 		/* Handling of (c) */
@@ -777,15 +798,26 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 		gchar *rid = NULL;
 		gchar *notify_object = NULL;
 
-		oldtz = kolab_util_calendar_cache_get_tz (priv->cal_cache, oldcomp);
+		oldtz = kolab_util_calendar_cache_get_tz (priv->cal_cache,
+		                                          oldcomp);
 		rid = e_cal_component_get_recurid_as_string (ecalcomp);
 		/* This removes the recurrence from ecalcomp. */
 		e_cal_component_set_recurid (ecalcomp, NULL);
 		/* This removes ecalcomp from the recurrence. */
-		newcomp = kolab_util_calendar_cache_remove_instance (priv->cal_cache, CALOBJ_MOD_THIS, oldcomp, uid, rid);
-		if (! kolab_util_calendar_cache_assure_uid_on_ecalcomponent (priv->cal_cache, priv->cal_koma, priv->cal_uri, ecalcomp, TRUE, &error)) {
+		newcomp = kolab_util_calendar_cache_remove_instance (priv->cal_cache,
+		                                                     CALOBJ_MOD_THIS,
+		                                                     oldcomp,
+		                                                     uid,
+		                                                     rid);
+		if (! kolab_util_calendar_cache_assure_uid_on_ecalcomponent (priv->cal_cache,
+		                                                             priv->cal_koma,
+		                                                             priv->cal_uri,
+		                                                             ecalcomp,
+		                                                             TRUE,
+		                                                             &error)) {
 			status = kolab_util_calendar_map_error (error);
-			g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+			g_warning ("%s()[%u]: %s",
+			           __func__, __LINE__, error->message);
 			g_error_free (error);
 			if (oldtz != NULL)
 				g_object_unref (oldtz);
@@ -799,10 +831,16 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 			return status;
 		}
 
-		kolab_util_calendar_store (newcomp, oldtz, priv->default_zone, priv->cal_koma, priv->cal_uri, &error);
+		kolab_util_calendar_store (newcomp,
+		                           oldtz,
+		                           priv->default_zone,
+		                           priv->cal_koma,
+		                           priv->cal_uri,
+		                           &error);
 		if (error != NULL) {
 			status = kolab_util_calendar_map_error (error);
-			g_warning ("%s()[%u]: error : %s", __func__, __LINE__, error->message);
+			g_warning ("%s()[%u]: error : %s",
+			           __func__, __LINE__, error->message);
 			g_error_free (error);
 			if (oldtz != NULL)
 				g_object_unref (oldtz);
@@ -816,27 +854,33 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 			return status;
 		}
 		notify_object = e_cal_component_get_as_string (newcomp);
-		e_cal_backend_notify_object_modified (E_CAL_BACKEND (kolab), *old_object, notify_object);
+		e_cal_backend_notify_object_modified (E_CAL_BACKEND (kolab),
+		                                      *old_object,
+		                                      notify_object);
 		g_free (notify_object);
 		g_object_unref (newcomp);
 		if (oldtz != NULL)
 			g_object_unref (oldtz);
 	}
 	g_object_unref (oldcomp);
-	kolab_util_calendar_store (ecalcomp, ecaltz, priv->default_zone, priv->cal_koma, priv->cal_uri, &error);
+	kolab_util_calendar_store (ecalcomp,
+	                           ecaltz,
+	                           priv->default_zone,
+	                           priv->cal_koma,
+	                           priv->cal_uri,
+	                           &error);
 	if (error != NULL) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		g_object_unref (ecalcomp);
 		return status;
 	}
-	/* [FIXME speed] e_cal_backend_cache_put_component (priv->cal_cache, ecalcomp); */
-
-	/* g_free (*new_object); */
 	*new_object = g_strdup (e_cal_component_get_as_string (ecalcomp));
 	if (is_instance) {
-		e_cal_backend_notify_object_created (E_CAL_BACKEND (backend), *new_object);
+		e_cal_backend_notify_object_created (E_CAL_BACKEND (backend),
+		                                     *new_object);
 	}
 
 	g_object_unref (ecalcomp);
@@ -844,69 +888,88 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 		g_object_unref (ecaltz);
 
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_modify_object () */
+#endif
+}
 
 /**
  * e_cal_backend_kolab_remove_object:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
+ * @cancellable: A cancellation stack.
  * @uid: UID of the object to remove.
  * @rid: Recurrence ID of the instance to remove, or NULL if removing the
  * whole object.
  * @mod: Type of removal.
- * @old_object: Placeholder for returning the old object as it was stored on the
+ * @old_component: Placeholder for returning the old object as it was stored on the
  * backend.
- * @object: Placeholder for returning the object after it has been modified (when
+ * @new_component: Placeholder for returning the object after it has been modified (when
  * removing individual instances). If removing the whole object, this will be
  * NULL.
+ * @err: A GError placeholder.
  *
  * Removes an (a part of a [recurring] ) object from a calendar backend. The
  * backend will notify all of its clients about the change.
- *
- * Returns: Status code.
  */
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_remove_object (ECalBackendSync *backend,
                                    EDataCal *cal,
+                                   GCancellable *cancellable,
                                    const gchar *uid,
                                    const gchar *rid,
                                    CalObjModType mod,
-                                   gchar **old_object,
-                                   gchar **object)
+                                   icalcomponent **old_component,
+                                   icalcomponent **new_component,
+                                   GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	KolabSettingsHandler *ksettings = NULL;
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
-	gchar *sourcename = NULL;
-	ECalComponent *oldcomp = NULL;
-	ECalComponent *newcomp = NULL;
-	ECalComponent *oldtz = NULL;
-	ECalComponentId *id = NULL;
-	GError *error = NULL;
-	gboolean ok;
-
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)uid; /* FIXME */
+	(void)rid; /* FIXME */ /* may be NULL? */
+	(void)mod; /* FIXME */
+	(void)old_component; /* FIXME */ /* must not be NULL? */
+	(void)new_component; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) cal;
 
 	if (rid == NULL)
 		mod = CALOBJ_MOD_ALL;
 
-	oldcomp = kolab_util_calendar_cache_get_object (priv->cal_cache, priv->cal_koma, priv->cal_uri, uid, FALSE, &error);
+	oldcomp = kolab_util_calendar_cache_get_object (priv->cal_cache,
+	                                                priv->cal_koma,
+	                                                priv->cal_uri,
+	                                                uid,
+	                                                FALSE,
+	                                                &error);
 	if (error != NULL) {
 		switch (error->code) {
 		case KOLAB_BACKEND_ERROR_NOTFOUND:
-			(void) e_cal_backend_cache_remove_component (priv->cal_cache, uid, NULL);
+			(void) e_cal_backend_cache_remove_component (priv->cal_cache,
+			                                             uid,
+			                                             NULL);
 			/* Don't bother if this worked */
 			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_object_removed (E_CAL_BACKEND (backend),
+			                                     id,
+			                                     NULL,
+			                                     NULL);
 			g_free (id);
 			status = GNOME_Evolution_Calendar_Success;
 			break;
 		default:
 			status = kolab_util_calendar_map_error (error);
-			g_warning ("%s()[%u]: error (%s) code (%i)", __func__, __LINE__, error->message, error->code);
+			g_warning ("%s()[%u]: error (%s) code (%i)",
+			           __func__, __LINE__, error->message, error->code);
 		}
 		g_error_free (error);
 		return status;
@@ -916,13 +979,24 @@ e_cal_backend_kolab_remove_object (ECalBackendSync *backend,
 	id = e_cal_component_get_id (oldcomp);
 	switch (mod) {
 	case CALOBJ_MOD_THIS:
-		oldtz = kolab_util_calendar_cache_get_tz (priv->cal_cache, oldcomp);
-		newcomp = kolab_util_calendar_cache_remove_instance (priv->cal_cache, CALOBJ_MOD_THIS, oldcomp, uid, rid);
+		oldtz = kolab_util_calendar_cache_get_tz (priv->cal_cache,
+		                                          oldcomp);
+		newcomp = kolab_util_calendar_cache_remove_instance (priv->cal_cache,
+		                                                     CALOBJ_MOD_THIS,
+		                                                     oldcomp,
+		                                                     uid,
+		                                                     rid);
 		/* newcomp now contains an exception rule for the rid */
-		kolab_util_calendar_store (newcomp, oldtz, priv->default_zone, priv->cal_koma, priv->cal_uri, &error);
+		kolab_util_calendar_store (newcomp,
+		                           oldtz,
+		                           priv->default_zone,
+		                           priv->cal_koma,
+		                           priv->cal_uri,
+		                           &error);
 		if (error != NULL) {
 			status = kolab_util_calendar_map_error (error);
-			g_warning ("%s()[%u]: error %s", __func__, __LINE__, error->message);
+			g_warning ("%s()[%u]: error %s",
+			           __func__, __LINE__, error->message);
 			g_error_free (error);
 			g_object_unref (newcomp);
 			g_object_unref (oldcomp);
@@ -934,27 +1008,35 @@ e_cal_backend_kolab_remove_object (ECalBackendSync *backend,
 		g_object_unref (newcomp);
 		break;
 	case CALOBJ_MOD_THISANDPRIOR: /* not supported by ui */
-		g_warning ("%s()[%u]: removing this and prior not supported.", __func__, __LINE__);
+		g_warning ("%s()[%u]: removing this and prior not supported.",
+		           __func__, __LINE__);
 		status = GNOME_Evolution_Calendar_UnsupportedMethod;
 		break;
 	case CALOBJ_MOD_THISANDFUTURE: /* not supported by ui */
-		g_warning ("%s()[%u]: removing this and future not supported.", __func__, __LINE__);
+		g_warning ("%s()[%u]: removing this and future not supported.",
+		           __func__, __LINE__);
 		status = GNOME_Evolution_Calendar_UnsupportedMethod;
 		break;
 	case CALOBJ_MOD_ALL:
 	default:
 		sourcename = kolab_util_backend_get_relative_path_from_uri (priv->cal_uri);
-		ok = kolab_mail_access_delete_by_uid (priv->cal_koma, uid, sourcename, &error);
+		ok = kolab_mail_access_delete_by_uid (priv->cal_koma,
+		                                      uid,
+		                                      sourcename,
+		                                      &error);
 		if (error != NULL) {
 			status = kolab_util_calendar_map_error (error);
-			g_warning ("%s()[%u]: error %s", __func__, __LINE__, error->message);
+			g_warning ("%s()[%u]: error %s",
+			           __func__, __LINE__, error->message);
 			g_error_free (error);
 			error = NULL;
 		} else {
 			/* Notification is not necessary. (?) */
 			status = GNOME_Evolution_Calendar_Success;
 		}
-		(void) e_cal_backend_cache_remove_component (priv->cal_cache, uid, NULL);
+		(void) e_cal_backend_cache_remove_component (priv->cal_cache,
+		                                             uid,
+		                                             NULL);
 
 		ksettings = kolab_mail_access_get_settings_handler (priv->cal_koma);
 		g_object_unref (ksettings);
@@ -963,77 +1045,75 @@ e_cal_backend_kolab_remove_object (ECalBackendSync *backend,
 	g_object_unref (oldcomp);
 	/* Do we need this? */
 
-	ok = kolab_mail_access_source_fbtrigger_needed (priv->cal_koma, sourcename, &error);
+	ok = kolab_mail_access_source_fbtrigger_needed (priv->cal_koma,
+	                                                sourcename,
+	                                                &error);
 	if (error != NULL)
-	{
-		status = kolab_util_calendar_map_error (error);
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
-		g_error_free (error);
-		error = NULL;
-		goto cleanup;
-	}
+		{
+			status = kolab_util_calendar_map_error (error);
+			g_warning ("%s()[%u]: %s",
+			           __func__, __LINE__, error->message);
+			g_error_free (error);
+			error = NULL;
+			goto cleanup;
+		}
 	if (ok) {
 		ksettings = kolab_mail_access_get_settings_handler (priv->cal_koma);
-		kolab_util_calendar_toggle_pfb_trigger (ksettings, sourcename);
+		kolab_util_calendar_toggle_pfb_trigger (ksettings,
+		                                        sourcename);
 		g_object_unref (ksettings);
 	}
 
-	e_cal_backend_notify_object_removed (E_CAL_BACKEND (kolab), id, *old_object, *object);
+	e_cal_backend_notify_object_removed (E_CAL_BACKEND (kolab),
+	                                     id,
+	                                     *old_object,
+	                                     *object);
 	e_cal_component_free_id (id);
 
-cleanup:
+ cleanup:
 	g_free (sourcename);
 
 	return status;
-} /* e_cal_backend_kolab_remove_object () */
-
-static ECalBackendSyncStatus
-e_cal_backend_kolab_discard_alarm (ECalBackendSync *backend,
-                                   EDataCal *cal,
-                                   const gchar *uid,
-                                   const gchar *auid)
-{
-	/* TODO implement me */
-	(void) backend;
-	(void) cal;
-	(void) uid;
-	(void) auid;
-
-	g_warning ("Unimplemented method called: %s()", __func__);
-
-	return GNOME_Evolution_Calendar_UnsupportedMethod;
-} /* e_cal_backend_kolab_discard_alarm () */
+#endif
+}
 
 /**
  * e_cal_backend_kolab_receive_objects:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
+ * @cancellable: A cancellation stack.
  * @calobj: iCalendar object to receive.
+ * @err: A GError placeholder.
  *
  * Submits a (series of) calendar event(s) through iCalendar object(s).
- *
- * Returns: Status code.
  */
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_receive_objects (ECalBackendSync *backend,
                                      EDataCal *cal,
-                                     const gchar *calobj)
+                                     GCancellable *cancellable,
+                                     const gchar *calobj,
+                                     GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
-	icalcomponent *icalcomp = NULL;
-	ECalComponent *ecalcomp = NULL;
-	ECalComponent *tzcomp = NULL;
-	gchar *tzstr;
-	GError *error = NULL;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)calobj; /* FIXME */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) cal;
 
 	/* Workflow:
 	 * Incoming calobj is supposed to be a vcalendar string.
-	 * KolabMailHandle is the data structure we want to 
-	 * generate and KolabMailHandle takes an ECalComponent and a timezone 
-	 * (as ECalComponent). The task at hand: convert calobj into an 
+	 * KolabMailHandle is the data structure we want to
+	 * generate and KolabMailHandle takes an ECalComponent and a timezone
+	 * (as ECalComponent). The task at hand: convert calobj into an
 	 * icalcomponent ( #1 ). Afterwards process this icalcomponent and extract
 	 * the relevant information an ECalComponent can handle ( #2 ). Then
 	 * create the ECalComponent, generate a timezone and stuff it
@@ -1042,104 +1122,197 @@ e_cal_backend_kolab_receive_objects (ECalBackendSync *backend,
 
 	icalcomp = icalparser_parse_string (calobj);
 	if (icalcomp == NULL) {
-		g_warning (" + *calobj could not be parsed into an icalcomponent: %s", calobj);
+		g_warning (" + *calobj could not be parsed into an icalcomponent: %s",
+		           calobj);
 		return GNOME_Evolution_Calendar_InvalidObject;
 	}
 	/* now this better should be an vcalendar entry */
 	if (icalcomponent_isa (icalcomp) != ICAL_VCALENDAR_COMPONENT) {
-		g_warning (" + **calobj does not represent an vcalendar entry: %s", calobj);
+		g_warning (" + **calobj does not represent an vcalendar entry: %s",
+		           calobj);
 		icalcomponent_free (icalcomp);
 		return GNOME_Evolution_Calendar_InvalidObject;
 	}
-	/* ( #1 ) check */
 
-	status = kolab_util_calendar_extract (icalcomp, priv->source_type, &ecalcomp, &tzcomp);
+	status = kolab_util_calendar_extract (icalcomp,
+	                                      priv->source_type,
+	                                      &ecalcomp,
+	                                      &tzcomp);
 	if (status != GNOME_Evolution_Calendar_Success) {
 		icalcomponent_free (icalcomp);
 		return status;
 	}
 	icalcomponent_free (icalcomp);
-	/* ( #2 ) check */
-	/* _receive_object () is not supposed to generate new uids. If an object
-	 * with the same uid is already in the database, then it will be
-	 * replaced by the new object.
-	 * if (! kolab_util_calendar_cache_assure_uid_on_ecalcomponent (priv->cal_cache, priv->cal_koma, priv->cal_uri, ecalcomp, &error)) {
-	 * 	g_debug ("%s()[%u]: %s", __func__, __LINE__, error->message);
-	 * 	g_error_free (error);
-	 * 	g_object_unref (ecalcomp);
-	 * 	if (tzcomp != NULL)
-	 * 		g_object_unref (tzcomp);
-	 * 	return GNOME_Evolution_Calendar_OtherError;
-	 * }
-	 */
 
-	kolab_util_calendar_store (ecalcomp, tzcomp, priv->default_zone, priv->cal_koma, priv->cal_uri, &error);
+	kolab_util_calendar_store (ecalcomp,
+	                           tzcomp,
+	                           priv->default_zone,
+	                           priv->cal_koma,
+	                           priv->cal_uri,
+	                           &error);
 	if (error != NULL) {
 		status = kolab_util_calendar_map_error (error);
-		g_warning ("Error during KolabMailHandle creation: %s", error->message);
+		g_warning ("Error during KolabMailHandle creation: %s",
+		           error->message);
 		g_error_free (error);
 		g_object_unref (ecalcomp);
 		if (tzcomp != NULL)
 			g_object_unref (tzcomp);
 		return status;
 	}
-	/* ( #3 ) check */
 
 	if (tzcomp != NULL) {
 		tzstr = e_cal_component_get_as_string (tzcomp);
-		status = e_cal_backend_kolab_add_timezone (backend, cal, tzstr);
+		status = e_cal_backend_kolab_add_timezone (backend,
+		                                           cal,
+		                                           tzstr);
 	}
 	if (status != GNOME_Evolution_Calendar_Success)
 		return status;
-#if 0 /* [FIXME speed] */
-	if (e_cal_backend_cache_put_component (priv->cal_cache, ecalcomp) == FALSE)
-		status = GNOME_Evolution_Calendar_OtherError;
-#endif
-	e_cal_backend_notify_object_created (E_CAL_BACKEND (kolab), e_cal_component_get_as_string (ecalcomp));
+	e_cal_backend_notify_object_created (E_CAL_BACKEND (kolab),
+	                                     e_cal_component_get_as_string (ecalcomp));
 	g_object_unref (ecalcomp);
 	if (tzcomp != NULL)
 		g_object_unref (tzcomp);
 
 	return status;
-} /* e_cal_backend_kolab_receive_objects () */
+#endif
+}
 
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_send_objects (ECalBackendSync *backend,
                                   EDataCal *cal,
+                                  GCancellable *cancellable,
                                   const gchar *calobj,
-                                  GList **users,
-                                  gchar **modified_calobj)
+                                  GSList **users,
+                                  gchar **modified_calobj,
+                                  GError **err)
 {
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
 
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	(void)calobj; /* FIXME */
+	(void)users; /* FIXME */ /* may be NULL? */
+	(void)modified_calobj; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) backend;
 	(void) cal;
 
 	*users = NULL;
-
 	*modified_calobj = g_strdup (calobj);
 
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_send_objects () */
+#endif
+}
+
+static void
+e_cal_backend_kolab_get_attachment_uris (ECalBackendSync *backend,
+                                         EDataCal *cal,
+                                         GCancellable *cancellable,
+                                         const gchar *uid,
+                                         const gchar *rid,
+                                         GSList **attachments,
+                                         GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (uid != NULL);
+	(void)rid; /* FIXME */ /* may be NULL? */
+	(void)attachments; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
+
+static void
+e_cal_backend_kolab_discard_alarm (ECalBackendSync *backend,
+                                   EDataCal *cal,
+                                   GCancellable *cancellable,
+                                   const gchar *uid,
+                                   const gchar *rid,
+                                   const gchar *auid,
+                                   GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (uid != NULL);
+	(void)rid; /* FIXME */ /* may be NULL? */
+	(void)auid; /* FIXME */ /* may be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
+
+static void
+e_cal_backend_kolab_get_timezone (ECalBackendSync *backend,
+                                  EDataCal *cal,
+                                  GCancellable *cancellable,
+                                  const gchar *tzid,
+                                  gchar **tzobject,
+                                  GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (tzid != NULL);
+	(void)tzobject; /* FIXME */ /* must be NULL? */
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
 
 /**
  * e_cal_backend_kolab_add_timezone:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
- * @tzobj: VTIMEZONE object to be added.
+ * @cancellable: A cancellation stack.
+ * @tzobject: VTIMEZONE object to be added.
+ * @err: A GError placeholder.
  *
  * Add a timezone object to the given backend.
- *
- * Returns: Status code.
  */
-static ECalBackendSyncStatus
+static void
 e_cal_backend_kolab_add_timezone (ECalBackendSync *backend,
                                   EDataCal *cal,
-                                  const gchar *tzobj)
+                                  GCancellable *cancellable,
+                                  const gchar *tzobject,
+                                  GError **err)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	icalcomponent *icalcomp = NULL;
-	icaltimezone *icaltz = NULL;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL (cal));
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (tzobject != NULL);
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+
+#if 0 /* FIXME old */
 	(void) cal;
 
 	icalcomp = icalparser_parse_string (tzobj);
@@ -1149,190 +1322,343 @@ e_cal_backend_kolab_add_timezone (ECalBackendSync *backend,
 	if (icalcomponent_isa (icalcomp) == ICAL_VTIMEZONE_COMPONENT) {
 
 		icaltz = icaltimezone_new ();
-		icaltimezone_set_component (icaltz, icalcomp);
+		icaltimezone_set_component (icaltz,
+		                            icalcomp);
 
 		if (e_cal_backend_cache_put_timezone (priv->cal_cache, icaltz) == FALSE) {
-			g_warning ("%s()[%u]: Putting timezone in cache did not succeed.",__func__, __LINE__);
+			g_warning ("%s()[%u]: Putting timezone in cache did not succeed.",
+			           __func__, __LINE__);
 			icaltimezone_free (icaltz, 1);
 			return GNOME_Evolution_Calendar_OtherError;
 		}
 		icaltimezone_free (icaltz, 1);
 	}
 	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_add_timezone () */
+#endif
+}
+
+static void
+e_cal_backend_kolab_authenticate_user (ECalBackendSync *backend,
+                                       GCancellable *cancellable,
+                                       ECredentials *credentials,
+                                       GError **err)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	(void)cancellable; /* FIXME */ /* cancellable may be NULL */
+	g_assert (credentials != NULL);
+	g_return_if_fail (err == NULL || *err == NULL);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
 
 /**
- * e_cal_backend_kolab_set_default_zone:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @tz: Timezone object as string.
- *
- * Sets the default timezone for the calendar, which is used to resolve DATE and
- * floating DATE-TIME values.
+ * e_cal_backend_kolab_start_view:
+ * @backend: A calendar backend.
+ * @view: The view to be started.
  *
- * Returns: Status code.
+ * Starts a new live query on the given backend.
  */
-static ECalBackendSyncStatus
-e_cal_backend_kolab_set_default_zone (ECalBackendSync *backend,
-                                      EDataCal *cal,
-                                      const gchar *tzobj)
+static void
+e_cal_backend_kolab_start_view (ECalBackend *backend,
+                                EDataCalView *view)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	ECalComponent *ecaltz = NULL;
-	(void) cal;
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
 
-	ecaltz = e_cal_component_new_from_string (tzobj);
-	if (ecaltz == NULL)
-		return GNOME_Evolution_Calendar_InvalidObject;
+	g_assert (E_IS_DATA_CAL_VIEW (view));
 
-	if (priv->default_zone != NULL)
-		g_object_unref (priv->default_zone);
-	priv->default_zone = ecaltz;
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_set_default_zone () */
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
 
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_free_busy (ECalBackendSync *backend,
-                                   EDataCal *cal,
-                                   GList *users,
-                                   time_t start,
-                                   time_t end,
-                                   GList **freebusy)
-{
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	GList *it;
-	GError *error = NULL;
-	gboolean internal_state = TRUE;
-	KolabSettingsHandler *ksettings = NULL;
+#if 0 /* FIXME old */
+	query = e_data_cal_view_get_text (cal_view);
+	ksexp = e_cal_backend_sexp_new (query);
 
-	(void) cal;
-	(void) start;
-	(void) end;
+	sourcename = kolab_util_backend_get_relative_path_from_uri (priv->cal_uri);
 
-	ksettings = kolab_mail_access_get_settings_handler (priv->cal_koma);
-	if (ksettings == NULL)
-		return GNOME_Evolution_Calendar_OtherError;
+	kolab_util_calendar_cache_update_on_query (priv->cal_cache,
+	                                           priv->cal_koma,
+	                                           query,
+	                                           priv->cal_uri);
+	uid_list = kolab_mail_access_query_uids (priv->cal_koma,
+	                                         sourcename,
+	                                         query,
+	                                         &error);
+	if (error != NULL) {
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
+		g_error_free (error);
+		error = NULL;
+	}
 
-	/* receive the xfb information */
-	for (it = g_list_first(users); it != NULL; it = g_list_next (it)) {
-		KolabHttpJob *job = NULL;
+	for (it = g_list_first (uid_list); it != NULL; it = g_list_next (it)) {
+		gchar *uid = it->data;
 		ECalComponent *ecalcomp = NULL;
-
-		job = kolab_util_calendar_retrieve_xfb (ksettings, (gchar *) it->data);
-		if (job != NULL) {
-			ecalcomp = kolabconv_cal_util_freebusy_ecalcomp_new_from_ics ((gchar *) (job->buffer->data), job->nbytes, &error);
-			if (error != NULL) {
-				g_warning ("%s", error->message);
-				g_error_free (error);
-				error = NULL;
-				internal_state = FALSE;
-			}
-			kolab_http_job_free (job);
-		}
-		if (ecalcomp == NULL) {
-			/* Strictly, this is not an error, but there's no F/B
-			 * information available.
-			 */
-			g_object_unref (ksettings);
-			return GNOME_Evolution_Calendar_ObjectNotFound;
+		ecalcomp = kolab_util_calendar_cache_get_object (priv->cal_cache,
+		                                                 priv->cal_koma,
+		                                                 priv->cal_uri,
+		                                                 uid,
+		                                                 TRUE,
+		                                                 &error);
+		if (error != NULL) {
+			g_warning ("%s()[%u]: %s",
+			           __func__, __LINE__, error->message);
+			g_error_free (error);
+			error = NULL;
 		}
-		else {
-			*freebusy = g_list_append (*freebusy, g_strdup (e_cal_component_get_as_string (ecalcomp)));
+		if (ecalcomp != NULL) {
+			iCal_objects = g_list_append (iCal_objects,
+			                              e_cal_component_get_as_string (ecalcomp));
 			g_object_unref (ecalcomp);
 		}
 	}
-	g_object_unref (ksettings);
-	if (internal_state == TRUE)
-		return GNOME_Evolution_Calendar_Success;
-	else
-		return GNOME_Evolution_Calendar_OtherError;
-} /* e_cal_backend_kolab_get_free_busy () */
 
-static ECalBackendSyncStatus
-e_cal_backend_kolab_get_changes (ECalBackendSync *backend,
-                                 EDataCal *cal,
-                                 const gchar *change_id,
-                                 GList **adds,
-                                 GList **modifies,
-                                 GList **deletes)
-{
-	/* TODO implement me */
-	(void) backend;
-	(void) cal;
-	(void) change_id;
-	(void) adds;
-	(void) modifies;
-	(void) deletes;
+	e_data_cal_view_notify_objects_added (cal_view,
+	                                      iCal_objects);
 
-	g_warning ("Unimplemented method called: %s()", __func__);
+	g_list_foreach (iCal_objects, (GFunc) g_free, NULL);
+	g_list_free (iCal_objects);
+	g_object_unref (ksexp);
+	g_free (sourcename);
 
-	return GNOME_Evolution_Calendar_Success;
-} /* e_cal_backend_kolab_get_changes () */
+	kolab_util_glib_glist_free (uid_list);
+
+	e_data_cal_view_notify_done (cal_view, status);
+#endif
+}
+
+static void
+e_cal_backend_kolab_stop_view (ECalBackend *backend,
+                               EDataCalView *view)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_assert (E_IS_DATA_CAL_VIEW (view));
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
+
+static void
+e_cal_backend_kolab_last_client_gone (ECalBackend *backend)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	(void)self;
+	(void)priv;
+	g_error ("%s: FIXME implement me", __func__);
+}
+
+/*----------------------------------------------------------------------------*/
+/* object/class init */
+
+static void
+e_cal_backend_kolab_init (ECalBackendKolab *backend)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_debug ("%s()[%u] called.", __func__, __LINE__);
+
+	priv->koma_table = NULL;
+	priv->cal_mode = 0;
+	priv->cal_koma = NULL;
+	priv->cal_cache = NULL;
+	priv->user_email = NULL;
+	priv->default_zone = NULL;
+	priv->source_type = 0;
+	priv->already_opened = FALSE;
+	priv->cal_uri = NULL;
+} /* e_cal_backend_kolab_init () */
+
+static void
+e_cal_backend_kolab_dispose (GObject *object)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (object);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_debug ("%s()[%u] called.", __func__, __LINE__);
+
+	if (priv->already_opened != FALSE) {
+		priv->already_opened = FALSE;
+		g_object_unref (priv->cal_koma);
+		priv->cal_koma = NULL;
+	}
+	if (priv->default_zone != NULL) {
+		g_object_unref (priv->default_zone);
+		priv->default_zone = NULL;
+	}
+	if (priv->cal_cache != NULL) {
+		g_object_unref (priv->cal_cache);
+		priv->cal_cache = NULL;
+	}
+
+	G_OBJECT_CLASS (e_cal_backend_kolab_parent_class)->dispose (object);
+} /* e_cal_backend_kolab_dispose () */
+
+static void
+e_cal_backend_kolab_finalize (GObject *object)
+{
+	ECalBackendKolab *self = E_CAL_BACKEND_KOLAB (object);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
+
+	g_debug ("%s()[%u] called.", __func__, __LINE__);
+
+	if (priv->user_email != NULL)
+		g_free (priv->user_email);
+	if (priv->cal_uri != NULL)
+		g_free (priv->cal_uri);
+
+	G_OBJECT_CLASS (e_cal_backend_kolab_parent_class)->finalize (object);
+} /* e_book_backend_kolab_finalize () */
 
 /**
- * e_cal_backend_kolab_start_query:
- * @backend: A calendar backend.
- * @query: The query to be started.
+ * e_cal_backend_kolab_class_init:
+ * @klass: An ECalBackendKolabClass type.
  *
- * Starts a new live query on the given backend.
+ * Class initialisation function for the Kolab backend.
  */
 static void
-e_cal_backend_kolab_start_query (ECalBackend *backend,
-                                 EDataCalView *cal_view)
+e_cal_backend_kolab_class_init (ECalBackendKolabClass *klass)
 {
-	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-	GError *error = NULL;
-	const gchar *query = NULL;
-	ECalBackendSExp *ksexp = NULL;
-	gchar *sourcename = NULL;
-	GList *iCal_objects = NULL; /* list of gchar * (iCal) */
-	GList *uid_list = NULL;
-	GList *it = NULL;
-	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success;
+	GObjectClass* object_class = G_OBJECT_CLASS (klass);
+	ECalBackendClass *backend_class = E_CAL_BACKEND_CLASS (klass);
+	ECalBackendSyncClass* sync_class = E_CAL_BACKEND_SYNC_CLASS (klass);
 
-	query = e_data_cal_view_get_text (cal_view);
-	ksexp = e_cal_backend_sexp_new (query);
+	g_type_class_add_private (klass, sizeof (ECalBackendKolabPrivate));
 
-	sourcename = kolab_util_backend_get_relative_path_from_uri (priv->cal_uri);
+	/* Sync backend class functions */
+	sync_class->open_sync = e_cal_backend_kolab_open;
+	sync_class->remove_sync = e_cal_backend_kolab_remove;
+	sync_class->refresh_sync = e_cal_backend_kolab_refresh;
+	sync_class->get_backend_property_sync = e_cal_backend_kolab_get_backend_property;
+	sync_class->set_backend_property_sync = e_cal_backend_kolab_set_backend_property;
+	sync_class->get_object_sync = e_cal_backend_kolab_get_object;
+	sync_class->get_object_list_sync = e_cal_backend_kolab_get_object_list;
+	sync_class->get_free_busy_sync = e_cal_backend_kolab_get_free_busy;
+	sync_class->create_object_sync = e_cal_backend_kolab_create_object;
+	sync_class->modify_object_sync = e_cal_backend_kolab_modify_object;
+	sync_class->remove_object_sync = e_cal_backend_kolab_remove_object;
+	sync_class->receive_objects_sync = e_cal_backend_kolab_receive_objects;
+	sync_class->send_objects_sync = e_cal_backend_kolab_send_objects;
+	sync_class->get_attachment_uris_sync = e_cal_backend_kolab_get_attachment_uris;
+	sync_class->discard_alarm_sync = e_cal_backend_kolab_discard_alarm;
+	sync_class->get_timezone_sync = e_cal_backend_kolab_get_timezone;
+	sync_class->add_timezone_sync = e_cal_backend_kolab_add_timezone;
+	sync_class->authenticate_user_sync = e_cal_backend_kolab_authenticate_user;
 
-	kolab_util_calendar_cache_update_on_query (priv->cal_cache, priv->cal_koma, query, priv->cal_uri);
-	uid_list = kolab_mail_access_query_uids (priv->cal_koma, sourcename, query, &error);
-	if (error != NULL) {
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
-		g_error_free (error);
-		error = NULL;
-	}
+	/* Backend parent class methods methods not covered in the sync backend part */
+	backend_class->start_view = e_cal_backend_kolab_start_view;
+	backend_class->stop_view = e_cal_backend_kolab_stop_view;
+	backend_class->last_client_gone = e_cal_backend_kolab_last_client_gone;
 
-	for (it = g_list_first (uid_list); it != NULL; it = g_list_next (it)) {
-		gchar *uid = it->data;
-		ECalComponent *ecalcomp = NULL;
-		ecalcomp = kolab_util_calendar_cache_get_object (priv->cal_cache, priv->cal_koma, priv->cal_uri, uid, TRUE, &error);
-		if (error != NULL) {
-			g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
-			g_error_free (error);
-			error = NULL;
-		}
-		/* [FIXME speed] ecalcomp = e_cal_backend_cache_get_component (priv->cal_cache, uid, NULL); */		
-		if (ecalcomp != NULL) {
-			iCal_objects = g_list_append (iCal_objects, e_cal_component_get_as_string (ecalcomp));
-			g_object_unref (ecalcomp);
-		}
+	object_class->dispose = e_cal_backend_kolab_dispose;
+	object_class->finalize = e_cal_backend_kolab_finalize;
+
+} /* e_cal_backend_kolab_class_init () */
+
+
+/*----------------------------------------------------------------------------*/
+
+#if 0 /* FIXME old */
+
+/**
+ * e_cal_backend_kolab_get_default_object:
+ * @backend: An ECalBackendSync object.
+ * @cal: An EDataCal object.
+ * @object: Placeholder for returned object.
+ *
+ * Returns the default object via object placeholder.
+ *
+ * Returns: Status code.
+ */
+static ECalBackendSyncStatus
+e_cal_backend_kolab_get_default_object (ECalBackendSync *backend,
+                                        EDataCal *cal,
+                                        gchar **object)
+{
+	/* FIXME: Remove experimental code related to summary*/
+	ECalComponent *comp;
+	ECalComponentText *summary = NULL;
+	ECalComponentText *desc = NULL;
+	GSList *desclist = NULL;
+	gchar *tmpsum = g_strdup ("");
+	gchar *tmploc = g_strdup ("");
+	gchar *tmpdesc1 = g_strdup ("");
+	(void) cal;
+
+	summary = g_new0 (ECalComponentText, 1);
+	summary->value=tmpsum;
+	desc = g_new0 (ECalComponentText, 1);
+	desc->value=tmpdesc1;
+	desclist = g_slist_append(desclist, desc);
+
+	comp = e_cal_component_new ();
+
+	switch (e_cal_backend_get_kind (E_CAL_BACKEND (backend))) {
+	case ICAL_VEVENT_COMPONENT:
+		e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
+		e_cal_component_set_summary (comp, summary);
+		e_cal_component_set_description_list (comp, desclist);
+		e_cal_component_set_location (comp, tmploc);
+		break;
+	default:
+		g_object_unref (comp);
+		return GNOME_Evolution_Calendar_ObjectNotFound;
 	}
 
-	e_data_cal_view_notify_objects_added (cal_view, iCal_objects);
+	*object = e_cal_component_get_as_string (comp);
 
-	g_list_foreach (iCal_objects, (GFunc) g_free, NULL);
-	g_list_free (iCal_objects);
-	g_object_unref (ksexp);
-	g_free (sourcename);
+	if (comp)
+		g_object_unref (comp);
 
-	kolab_util_glib_glist_free (uid_list);
+	g_free (summary);
+	g_free (tmploc);
+	g_free (tmpdesc1);
+	g_slist_foreach (desclist, (GFunc) g_free, NULL);
+	g_slist_free (desclist);
 
-	e_data_cal_view_notify_done (cal_view, status);
-} /* e_cal_backend_kolab_start_query () */
+	return GNOME_Evolution_Calendar_Success;
+} /* e_cal_backend_kolab_get_default_object () */
+
+/**
+ * e_cal_backend_kolab_set_default_zone:
+ * @backend: An ECalBackendSync object.
+ * @cal: An EDataCal object.
+ * @tz: Timezone object as string.
+ *
+ * Sets the default timezone for the calendar, which is used to resolve DATE and
+ * floating DATE-TIME values.
+ *
+ * Returns: Status code.
+ */
+static ECalBackendSyncStatus
+e_cal_backend_kolab_set_default_zone (ECalBackendSync *backend,
+                                      EDataCal *cal,
+                                      const gchar *tzobj)
+{
+	ECalBackendKolab *kolab = E_CAL_BACKEND_KOLAB (backend);
+	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
+	ECalComponent *ecaltz = NULL;
+	(void) cal;
+
+	ecaltz = e_cal_component_new_from_string (tzobj);
+	if (ecaltz == NULL)
+		return GNOME_Evolution_Calendar_InvalidObject;
+
+	if (priv->default_zone != NULL)
+		g_object_unref (priv->default_zone);
+	priv->default_zone = ecaltz;
+	return GNOME_Evolution_Calendar_Success;
+} /* e_cal_backend_kolab_set_default_zone () */
 
 /**
  * e_cal_backend_internal_get_default_timezone:
@@ -1376,12 +1702,14 @@ e_cal_backend_kolab_get_mode (ECalBackend *backend)
 	GError *error = NULL;
 
 	if (priv->cal_koma == NULL) {
-		g_warning ("%s()[%u]: KolabMailAccess object not existent.", __func__, __LINE__);
+		g_warning ("%s()[%u]: KolabMailAccess object not existent.",
+		           __func__, __LINE__);
 		return CAL_MODE_INVALID;
 	}
 	koma_mode = kolab_mail_access_get_opmode (priv->cal_koma, &error);
 	if (error != NULL) {
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
+		g_warning ("%s()[%u]: %s",
+		           __func__, __LINE__, error->message);
 		g_error_free (error);
 		return CAL_MODE_INVALID;
 	}
@@ -1398,7 +1726,8 @@ e_cal_backend_kolab_get_mode (ECalBackend *backend)
 	case KOLAB_MAIL_ACCESS_OPMODE_INVAL:
 	case KOLAB_MAIL_ACCESS_OPMODE_CONFIGURED:
 	default:
-		g_warning ("%s()[%u]: KolabMailAccess object's state unknown: %u.", __func__, __LINE__, koma_mode);
+		g_warning ("%s()[%u]: KolabMailAccess object's state unknown: %u.",
+		           __func__, __LINE__, koma_mode);
 		return CAL_MODE_INVALID;
 	}
 } /* e_cal_backend_kolab_get_mode () */
@@ -1407,7 +1736,7 @@ e_cal_backend_kolab_get_mode (ECalBackend *backend)
  * e_cal_backend_kolab_set_mode:
  * @backend: A Kolab calendar backend.
  * @mode: Mode to change to.
- * 
+ *
  * Sets the mode of the calendar backend to the given mode.
  */
 static void
@@ -1438,47 +1767,57 @@ e_cal_backend_kolab_set_mode (ECalBackend *backend,
 		g_assert_not_reached();
 	}
 	if (priv->cal_koma == NULL) {
-		g_warning ("%s()[%u]: KolabMailAccess object not existent.", __func__, __LINE__);
+		g_warning ("%s()[%u]: KolabMailAccess object not existent.",
+		           __func__, __LINE__);
 		return;
 	}
-	tmp_mode = kolab_mail_access_get_opmode (priv->cal_koma, &error);
+	tmp_mode = kolab_mail_access_get_opmode (priv->cal_koma,
+	                                         &error);
 	if (error != NULL)
-	{
-		g_warning ("%s()[%u]: error getting mode: %s", __func__, __LINE__, error->message);
-		g_error_free (error);
-		return;
-	}
+		{
+			g_warning ("%s()[%u]: error getting mode: %s",
+			           __func__, __LINE__, error->message);
+			g_error_free (error);
+			return;
+		}
 
 	if (tmp_mode < KOLAB_MAIL_ACCESS_OPMODE_OFFLINE) {
 		return;
 	}
-	ok = kolab_mail_access_set_opmode (priv->cal_koma, koma_mode, &error);
+	ok = kolab_mail_access_set_opmode (priv->cal_koma,
+	                                   koma_mode,
+	                                   &error);
 	if (error != NULL)
-	{
-		g_warning ("%s()[%u]: error setting mode: %s", __func__, __LINE__, error->message);
-		g_error_free (error);
-		error = NULL;
-		return;
-	}
-	
+		{
+			g_warning ("%s()[%u]: error setting mode: %s",
+			           __func__, __LINE__, error->message);
+			g_error_free (error);
+			error = NULL;
+			return;
+		}
+
 	if (ok && (koma_mode < KOLAB_MAIL_ACCESS_OPMODE_ONLINE))
 		return;
-	
+
 	sourcename = kolab_util_backend_get_relative_path_from_uri (priv->cal_uri);
-	ok = kolab_mail_access_source_fbtrigger_needed (priv->cal_koma, sourcename, &error);
+	ok = kolab_mail_access_source_fbtrigger_needed (priv->cal_koma,
+	                                                sourcename,
+	                                                &error);
 	if (error != NULL)
-	{
-		g_warning ("%s()[%u]: %s", __func__, __LINE__, error->message);
-		g_error_free (error);
-		error = NULL;
-		goto cleanup;
-	}
+		{
+			g_warning ("%s()[%u]: %s",
+			           __func__, __LINE__, error->message);
+			g_error_free (error);
+			error = NULL;
+			goto cleanup;
+		}
 	if (ok) {
 		ksettings = kolab_mail_access_get_settings_handler (priv->cal_koma);
-		kolab_util_calendar_toggle_pfb_trigger (ksettings, sourcename);
+		kolab_util_calendar_toggle_pfb_trigger (ksettings,
+		                                        sourcename);
 		g_object_unref (ksettings);
 	}
-cleanup:
+ cleanup:
 	g_free (sourcename);
 } /* e_cal_backend_kolab_set_mode () */
 
@@ -1489,7 +1828,7 @@ cleanup:
  *
  * This method has to be called before any other method which accesses
  * Kolab infrastructure. In this case it should be called from
- * e-cal-backend-kolab-factory during creation of a new ECalBackendKolab 
+ * e-cal-backend-kolab-factory during creation of a new ECalBackendKolab
  * instance.
  */
 void
@@ -1502,128 +1841,4 @@ e_cal_backend_kolab_set_koma_table (ECalBackendKolab *kolab,
 	priv->koma_table = koma_objects;
 }
 
-
-/* init and teardown **********************************************************/
-
-static void
-e_cal_backend_kolab_init (ECalBackendKolab *kolab)
-{
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (kolab);
-
-	priv->koma_table = NULL;
-	priv->cal_mode = CAL_MODE_LOCAL; /* Set mode to local at initialization. */
-	priv->user_email = NULL;
-	priv->default_zone = NULL;
-	priv->cal_koma = NULL;
-	priv->cal_cache = NULL;
-	priv->already_opened = FALSE;
-	priv->cal_uri = NULL;
-
-} /* e_cal_backend_kolab_init () */
-
-static void
-e_cal_backend_kolab_dispose (GObject *object)
-{
-	ECalBackendKolabPrivate *priv = E_CAL_BACKEND_KOLAB_PRIVATE (object);
-	
-	if (priv->already_opened != FALSE) {
-		priv->already_opened = FALSE;
-		g_object_unref (priv->cal_koma);
-		priv->cal_koma = NULL;
-	}
-	if (priv->user_email != NULL) {
-		g_free (priv->user_email);
-		priv->user_email = NULL;
-	}
-	if (priv->default_zone != NULL) {
-		g_object_unref (priv->default_zone);
-		priv->default_zone = NULL;
-	}
-	if (priv->cal_cache != NULL) {
-		g_object_unref (priv->cal_cache);
-		priv->cal_cache = NULL;
-	}
-	if (priv->cal_uri != NULL) {
-		g_free (priv->cal_uri);
-		priv->cal_uri = NULL;
-	}
-	/* chain up dispose */
-	if (G_OBJECT_CLASS (e_cal_backend_kolab_parent_class)->dispose)
-		(* G_OBJECT_CLASS (e_cal_backend_kolab_parent_class)->dispose) (object);
-} /* e_cal_backend_kolab_dispose () */
-
-static void
-e_cal_backend_kolab_finalize (GObject *object)
-{
-	/* TODO: Add deinitalization code here */
-
-	G_OBJECT_CLASS (e_cal_backend_kolab_parent_class)->finalize (object);
-}
-
-/**
- * e_cal_backend_kolab_class_init:
- * @klass: An ECalBackendKolabClass type.
- *
- * Class initialisation function for the Kolab backend.
- */
-static void
-e_cal_backend_kolab_class_init (ECalBackendKolabClass *klass)
-{
-	GObjectClass* object_class = G_OBJECT_CLASS (klass);
-	ECalBackendClass *backend_class = E_CAL_BACKEND_CLASS (klass);
-	ECalBackendSyncClass* sync_class = E_CAL_BACKEND_SYNC_CLASS (klass);
-
-	g_type_class_add_private (klass, sizeof (ECalBackendKolabPrivate));
-
-	object_class->dispose = e_cal_backend_kolab_dispose;
-	object_class->finalize = e_cal_backend_kolab_finalize;
-	
-	klass->set_koma_table = e_cal_backend_kolab_set_koma_table;
-
-	/* Assignment of virtual methods - see e-cal-backend.h for reference */
-	sync_class->is_read_only_sync = e_cal_backend_kolab_is_read_only;
-	sync_class->get_cal_address_sync = e_cal_backend_kolab_get_cal_address;
-	sync_class->get_alarm_email_address_sync = e_cal_backend_kolab_get_alarm_email_address;
-	sync_class->get_ldap_attribute_sync = e_cal_backend_kolab_get_ldap_attribute;
-	sync_class->get_static_capabilities_sync = e_cal_backend_kolab_get_static_capabilities;
-
-	sync_class->open_sync = e_cal_backend_kolab_open;
-	sync_class->refresh_sync = e_cal_backend_kolab_refresh;
-	sync_class->remove_sync = e_cal_backend_kolab_remove;
-
-	/* Assignment of object related virtual methods - see e-cal-backend.h for reference */
-	sync_class->create_object_sync = e_cal_backend_kolab_create_object;
-	sync_class->modify_object_sync = e_cal_backend_kolab_modify_object;
-	sync_class->remove_object_sync = e_cal_backend_kolab_remove_object;
-
-	sync_class->discard_alarm_sync = e_cal_backend_kolab_discard_alarm;
-
-	sync_class->receive_objects_sync = e_cal_backend_kolab_receive_objects;
-	sync_class->send_objects_sync = e_cal_backend_kolab_send_objects;
-
-	sync_class->get_default_object_sync = e_cal_backend_kolab_get_default_object;
-	sync_class->get_object_sync = e_cal_backend_kolab_get_object;
-	sync_class->get_object_list_sync = e_cal_backend_kolab_get_object_list;
-
-	sync_class->get_attachment_list_sync = e_cal_backend_kolab_get_attachment_list;
-
-	/* Assignment of timezone related virtual methods - see e-cal-backend.h for reference */
-	/* optional: any object deriving from ECalBackendSync can implement only internal_get_timezone 
-	 * sync_class->get_timezone_sync = e_cal_backend_kolab_get_timezone; */
-
-	sync_class->add_timezone_sync = e_cal_backend_kolab_add_timezone;
-	sync_class->set_default_zone_sync = e_cal_backend_kolab_set_default_zone;
-	/* deprecated: do not use: sync_class->set_default_timezone_sync = e_cal_backend_kolab_set_default_timezone; */
-
-	backend_class->start_query = e_cal_backend_kolab_start_query;
-	backend_class->internal_get_default_timezone = e_cal_backend_kolab_internal_get_default_timezone;
-
-	/* Assignment of mode relate virtual methods - see e-cal-backend.h for reference */
-	backend_class->get_mode = e_cal_backend_kolab_get_mode;
-	backend_class->set_mode = e_cal_backend_kolab_set_mode;
-
-	sync_class->get_freebusy_sync = e_cal_backend_kolab_get_free_busy;
-	sync_class->get_changes_sync = e_cal_backend_kolab_get_changes;
-
-} /* e_cal_backend_kolab_class_init () */
-
+#endif
diff --git a/src/calendar/e-cal-backend-kolab.h b/src/calendar/e-cal-backend-kolab.h
index 0a94b33..c6cfd0e 100644
--- a/src/calendar/e-cal-backend-kolab.h
+++ b/src/calendar/e-cal-backend-kolab.h
@@ -12,12 +12,12 @@
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
@@ -35,7 +35,7 @@
 
 G_BEGIN_DECLS
 
-/** 
+/**
  * SECTION:e-cal-backend-kolab
  * @short_description: Evolution calendar backend API implementation for Evolution-Kolab plugin.
  * @title: ECalBackendKolab
@@ -51,21 +51,19 @@ G_BEGIN_DECLS
 typedef struct _ECalBackendKolabClass ECalBackendKolabClass;
 typedef struct _ECalBackendKolab ECalBackendKolab;
 
-struct _ECalBackendKolabClass
+struct _ECalBackendKolab
 {
-	ECalBackendSyncClass parent_class;
-	/* it's not really an API function, but needed to supply KolabMailAccess-Table */
-	void (*set_koma_table) (ECalBackendKolab *kolab, GHashTable *koma_objects);
+	ECalBackendSync parent;
 };
 
-struct _ECalBackendKolab
+struct _ECalBackendKolabClass
 {
-	ECalBackendSync parent_instance;
+	ECalBackendSyncClass parent_class;
 };
 
 GType e_cal_backend_kolab_get_type (void) G_GNUC_CONST;
 
-void e_cal_backend_kolab_set_koma_table (ECalBackendKolab *kolab, GHashTable *koma_objects);
+/* void e_cal_backend_kolab_set_koma_table (ECalBackendKolab *kolab, GHashTable *koma_objects); */
 
 G_END_DECLS
 
diff --git a/src/calendar/kolab-util-calendar.h b/src/calendar/kolab-util-calendar.h
index 6a9301b..d98d035 100644
--- a/src/calendar/kolab-util-calendar.h
+++ b/src/calendar/kolab-util-calendar.h
@@ -2,17 +2,17 @@
 /*
  * evolution-kolab
  * Copyright (C) Silvan Marco Fin 2011 <silvan kernelconcepts de>
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
@@ -38,7 +38,7 @@ G_BEGIN_DECLS
  * SECTION:kolab-util-calendar
  * @title: KolabUtilCalendar
  * @short_description: Utility methods for Evolution-Kolab calendar backend implementation.
- * 
+ *
  * The methods in this library don't use the ECalBackendCache.
  */
 
@@ -67,12 +67,18 @@ GType kolab_util_calendar_get_type (void) G_GNUC_CONST;
 
 /* library functions */
 
+#if 0
 ECalBackendSyncStatus kolab_util_calendar_extract (icalcomponent *icalcomp, ECalSourceType source_type, ECalComponent **ecalcomp, ECalComponent **tzcomp);
+#endif
+
 gchar *kolab_util_calendar_get_tzid (ECalComponent *comp, ECalComponentField from);
 gboolean kolab_util_calendar_toggle_pfb_trigger (KolabSettingsHandler *ksettings, const gchar *sourcename);
 KolabHttpJob *kolab_util_calendar_retrieve_xfb (KolabSettingsHandler *ksettings, gchar *query);
 void kolab_util_calendar_store (ECalComponent *ecalcomp, ECalComponent *ecaltz, ECalComponent *default_tz, KolabMailAccess *koma, const gchar *uri, GError **error);
+
+#if 0
 ECalBackendSyncStatus kolab_util_calendar_map_error (GError *error);
+#endif
 
 /* object methods */
 



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