[evolution-ews] Delete recurrence exceptions in reverse order
- From: Or Goshen <ogosh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Delete recurrence exceptions in reverse order
- Date: Mon, 5 Sep 2011 13:54:24 +0000 (UTC)
commit e6b2d7a45af754bb863abe78d2c726a1848926ad
Author: Or Goshen <orx goshen intel com>
Date: Mon Sep 5 16:52:20 2011 +0300
Delete recurrence exceptions in reverse order
src/calendar/e-cal-backend-ews.c | 3 ++-
src/server/e-ews-connection.c | 34 ++++++++++++++++++++++++++++++++++
src/server/e-ews-connection.h | 11 +++++++++++
3 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index f52bef3..6a9b87f 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1489,11 +1489,12 @@ ews_create_object_cb(GObject *object, GAsyncResult *res, gpointer user_data)
e_cal_backend_store_thaw_changes (priv->store);
/* Excluded occurrences */
+ g_clear_error (&error);
icalprop = icalcomponent_get_first_property(icalcomp, ICAL_RRULE_PROPERTY);
if (icalprop != NULL) {
icalprop = icalcomponent_get_first_property(icalcomp, ICAL_EXDATE_PROPERTY);
for (; icalprop; icalprop = icalcomponent_get_next_property(icalcomp, ICAL_EXDATE_PROPERTY)) {
- exceptions = g_slist_append (exceptions, g_strdup (icalproperty_get_value_as_string (icalprop)));
+ exceptions = g_slist_prepend (exceptions, g_strdup (icalproperty_get_value_as_string (icalprop)));
}
for (i = exceptions; i; i = i->next) {
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index c827b8c..f77c840 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -2413,6 +2413,40 @@ e_ews_connection_delete_items (EEwsConnection *cnc,
return result;
}
+gboolean
+e_ews_connection_delete_item (EEwsConnection *cnc,
+ gint pri,
+ EwsId *id,
+ guint index,
+ EwsDeleteType delete_type,
+ EwsSendMeetingCancellationsType send_cancels,
+ EwsAffectedTaskOccurrencesType affected_tasks,
+ GCancellable *cancellable,
+ GError **error)
+{
+ EwsSyncData *sync_data;
+ gboolean result;
+
+ sync_data = g_new0 (EwsSyncData, 1);
+ sync_data->eflag = e_flag_new ();
+
+ e_ews_connection_delete_item_start (cnc, pri, id, index, delete_type,
+ send_cancels, affected_tasks,
+ ews_sync_reply_cb, cancellable,
+ (gpointer) sync_data);
+
+ e_flag_wait (sync_data->eflag);
+
+ result = e_ews_connection_delete_items_finish (cnc, sync_data->res,
+ error);
+
+ e_flag_free (sync_data->eflag);
+ g_object_unref (sync_data->res);
+ g_free (sync_data);
+
+ return result;
+}
+
void
e_ews_connection_update_items_start (EEwsConnection *cnc,
gint pri,
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index ec3140d..03d4860 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -243,6 +243,17 @@ gboolean e_ews_connection_delete_items (EEwsConnection *cnc,
GCancellable *cancellable,
GError **error);
+gboolean
+e_ews_connection_delete_item (EEwsConnection *cnc,
+ gint pri,
+ EwsId *id,
+ guint index,
+ EwsDeleteType delete_type,
+ EwsSendMeetingCancellationsType send_cancels,
+ EwsAffectedTaskOccurrencesType affected_tasks,
+ GCancellable *cancellable,
+ GError **error);
+
/* Update folder items */
void e_ews_connection_update_items_start
(EEwsConnection *cnc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]