[evolution-kolab] Avoid deprecated Evolution-Data-Server APIs.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] Avoid deprecated Evolution-Data-Server APIs.
- Date: Thu, 21 Mar 2013 16:25:12 +0000 (UTC)
commit 8cfdf06b7830449c675aee0e7f00540f5a336c5c
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Mar 21 11:47:16 2013 -0400
Avoid deprecated Evolution-Data-Server APIs.
Was mostly just using old enum types. The deprecated backend APIs are
going away soon, so this was just meant to ensure the build won't break.
src/addressbook/e-book-backend-kolab.c | 2 --
src/calendar/e-cal-backend-kolab.c | 28 +++++++++++++---------------
src/calendar/kolab-util-calendar-cache.c | 2 +-
src/calendar/kolab-util-calendar-cache.h | 2 +-
src/calendar/kolab-util-calendar.c | 8 ++++----
src/calendar/kolab-util-calendar.h | 2 +-
6 files changed, 20 insertions(+), 24 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index a791140..42c264e 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -744,8 +744,6 @@ book_backend_kolab_get_backend_property (EBookBackendSync *backend,
GSList *fields = kolab_utils_contact_get_supported_fields ();
*prop_value = e_data_book_string_slist_to_comma_string (fields);
g_slist_free (fields);
- } else if (g_str_equal (prop_name, BOOK_BACKEND_PROPERTY_SUPPORTED_AUTH_METHODS)) {
- *prop_value = g_strdup ("plain/password");
} else {
processed = FALSE;
}
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index dfc43af..afcdf66 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -90,12 +90,11 @@ G_DEFINE_TYPE (ECalBackendKolab, e_cal_backend_kolab, E_TYPE_CAL_BACKEND_SYNC)
/* Private part of the ECalBackendKolab structure */
typedef struct _ECalBackendKolabPrivate ECalBackendKolabPrivate;
struct _ECalBackendKolabPrivate {
- CalMode cal_mode;
KolabMailAccess *cal_koma;
ECalBackendCache *cal_cache;
gchar *user_email;
ECalComponent *default_zone;
- ECalSourceType source_type;
+ ECalClientSourceType source_type;
GError *mode_switch_err;
};
@@ -283,13 +282,13 @@ cal_backend_kolab_open (ECalBackendSync *backend,
/* TODO: this has to be set according to the get_kind() method */
switch (icalkind) {
case ICAL_VEVENT_COMPONENT:
- priv->source_type = E_CAL_SOURCE_TYPE_EVENT;
+ priv->source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS;
break;
case ICAL_VTODO_COMPONENT:
- priv->source_type = E_CAL_SOURCE_TYPE_TODO;
+ priv->source_type = E_CAL_CLIENT_SOURCE_TYPE_TASKS;
break;
case ICAL_VJOURNAL_COMPONENT:
- priv->source_type = E_CAL_SOURCE_TYPE_JOURNAL;
+ priv->source_type = E_CAL_CLIENT_SOURCE_TYPE_MEMOS;
break;
default:
g_set_error (&tmp_err,
@@ -903,7 +902,7 @@ cal_backend_kolab_modify_objects (ECalBackendSync *backend,
EDataCal *cal,
GCancellable *cancellable,
const GSList *calobjs,
- CalObjModType mod,
+ ECalObjModType mod,
GSList **old_components,
GSList **new_components,
GError **error)
@@ -997,7 +996,7 @@ cal_backend_kolab_modify_objects (ECalBackendSync *backend,
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,
+ E_CAL_OBJ_MOD_THIS,
oldcomp,
uid,
rid);
@@ -1097,7 +1096,7 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
EDataCal *cal,
GCancellable *cancellable,
const GSList *ids,
- CalObjModType mod,
+ ECalObjModType mod,
GSList **old_components,
GSList **new_components,
GError **error)
@@ -1140,7 +1139,7 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
priv = E_CAL_BACKEND_KOLAB_PRIVATE (self);
if (rid == NULL)
- mod = CALOBJ_MOD_ALL;
+ mod = E_CAL_OBJ_MOD_ALL;
foldername = kolab_util_backend_get_foldername (E_BACKEND (backend));
@@ -1178,11 +1177,11 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
id = e_cal_component_get_id (oldcomp);
switch (mod) {
- case CALOBJ_MOD_THIS:
+ case E_CAL_OBJ_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,
+ E_CAL_OBJ_MOD_THIS,
oldcomp,
uid,
rid);
@@ -1208,15 +1207,15 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
}
*new_components = g_slist_append (NULL, newcomp);
break;
- case CALOBJ_MOD_THISANDPRIOR: /* not supported by backend, should not be reached */
+ case E_CAL_OBJ_MOD_THIS_AND_PRIOR: /* not supported by backend, should not be reached */
g_warning ("%s()[%u]: removing this and prior not supported.",
__func__, __LINE__);
break;
- case CALOBJ_MOD_THISANDFUTURE: /* not supported by backend, should not be reached */
+ case E_CAL_OBJ_MOD_THIS_AND_FUTURE: /* not supported by backend, should not be reached */
g_warning ("%s()[%u]: removing this and future not supported.",
__func__, __LINE__);
break;
- case CALOBJ_MOD_ALL:
+ case E_CAL_OBJ_MOD_ALL:
default:
ok = kolab_mail_access_delete_by_uid (priv->cal_koma,
uid,
@@ -1835,7 +1834,6 @@ e_cal_backend_kolab_init (ECalBackendKolab *backend)
g_debug ("%s()[%u] called.", __func__, __LINE__);
- priv->cal_mode = 0;
priv->cal_koma = NULL;
priv->cal_cache = NULL;
priv->user_email = NULL;
diff --git a/src/calendar/kolab-util-calendar-cache.c b/src/calendar/kolab-util-calendar-cache.c
index d2c3aec..0523747 100644
--- a/src/calendar/kolab-util-calendar-cache.c
+++ b/src/calendar/kolab-util-calendar-cache.c
@@ -270,7 +270,7 @@ kolab_util_calendar_cache_update_object (ECalBackendSync *backend,
**/
ECalComponent*
kolab_util_calendar_cache_remove_instance (ECalBackendCache *cal_cache,
- CalObjModType mod,
+ ECalObjModType mod,
ECalComponent *oldcomp,
const gchar *uid,
const gchar *rid)
diff --git a/src/calendar/kolab-util-calendar-cache.h b/src/calendar/kolab-util-calendar-cache.h
index 25593b0..199953d 100644
--- a/src/calendar/kolab-util-calendar-cache.h
+++ b/src/calendar/kolab-util-calendar-cache.h
@@ -94,7 +94,7 @@ kolab_util_calendar_cache_get_object (ECalBackendSync *backend,
ECalComponent*
kolab_util_calendar_cache_remove_instance (ECalBackendCache *cal_cache,
- CalObjModType mod,
+ ECalObjModType mod,
ECalComponent *ecalcomp,
const gchar *uid,
const gchar *rid);
diff --git a/src/calendar/kolab-util-calendar.c b/src/calendar/kolab-util-calendar.c
index 811509a..acac980 100644
--- a/src/calendar/kolab-util-calendar.c
+++ b/src/calendar/kolab-util-calendar.c
@@ -525,7 +525,7 @@ kolab_util_calendar_store (ECalComponent *ecalcomp,
*/
gboolean
kolab_util_calendar_extract (icalcomponent *icalcomp,
- ECalSourceType source_type,
+ ECalClientSourceType source_type,
ECalComponent **ecalcomp,
ECalComponent **tzcomp,
GError **error)
@@ -547,13 +547,13 @@ kolab_util_calendar_extract (icalcomponent *icalcomp,
/* TODO Function argument assertions */
switch (source_type) {
- case E_CAL_SOURCE_TYPE_EVENT:
+ case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
icalkind = ICAL_VEVENT_COMPONENT;
break;
- case E_CAL_SOURCE_TYPE_TODO:
+ case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
icalkind = ICAL_VTODO_COMPONENT;
break;
- case E_CAL_SOURCE_TYPE_JOURNAL:
+ case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
icalkind = ICAL_VJOURNAL_COMPONENT;
break;
default:
diff --git a/src/calendar/kolab-util-calendar.h b/src/calendar/kolab-util-calendar.h
index 99dd3d7..62b2a9c 100644
--- a/src/calendar/kolab-util-calendar.h
+++ b/src/calendar/kolab-util-calendar.h
@@ -80,7 +80,7 @@ kolab_util_calendar_store (ECalComponent *ecalcomp,
gboolean
kolab_util_calendar_extract (icalcomponent *icalcomp,
- ECalSourceType source_type,
+ ECalClientSourceType source_type,
ECalComponent **ecalcomp,
ECalComponent **tzcomp,
GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]