[evolution-ews] Infrastructure for modifying tasks
- From: Or Goshen <ogosh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Infrastructure for modifying tasks
- Date: Sun, 3 Jul 2011 10:01:35 +0000 (UTC)
commit 0148bce613d048606b390d470a81a3419ed3ae6e
Author: Or Goshen <orx goshen intel com>
Date: Sun Jul 3 13:08:45 2011 +0300
Infrastructure for modifying tasks
src/calendar/e-cal-backend-ews.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 74bdf03..69c895b 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1558,7 +1558,7 @@ convert_property_to_updatexml (ESoapMessage *msg, const gchar *name, const gchar
}
static void
-convert_component_to_updatexml(ESoapMessage *msg, gpointer user_data)
+convert_vevent_component_to_updatexml(ESoapMessage *msg, gpointer user_data)
{
EwsModifyData *modify_data = user_data;
icalcomponent *icalcomp = e_cal_component_get_icalcomponent (modify_data->comp);
@@ -1641,6 +1641,38 @@ convert_component_to_updatexml(ESoapMessage *msg, gpointer user_data)
}
static void
+convert_vtodo_component_to_updatexml (ESoapMessage *msg, gpointer user_data)
+{
+ EwsModifyData *modify_data = user_data;
+ icalcomponent *icalcomp = e_cal_component_get_icalcomponent (modify_data->comp);
+
+ e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
+ modify_data->itemid, modify_data->changekey, 0);
+
+ convert_property_to_updatexml (msg, "Subject", icalcomponent_get_summary(icalcomp), "item", NULL, NULL);
+
+ e_ews_message_end_item_change (msg);
+}
+
+static void
+convert_component_to_updatexml (ESoapMessage *msg, gpointer user_data)
+{
+ EwsModifyData *modify_data = user_data;
+ icalcomponent *icalcomp = e_cal_component_get_icalcomponent (modify_data->comp);
+
+ switch (icalcomponent_isa (icalcomp)) {
+ case ICAL_VEVENT_COMPONENT:
+ convert_vevent_component_to_updatexml (msg, user_data);
+ break;
+ case ICAL_VTODO_COMPONENT:
+ convert_vtodo_component_to_updatexml (msg, user_data);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
e_cal_backend_ews_modify_object (ECalBackend *backend, EDataCal *cal, EServerMethodContext context,
const gchar *calobj, CalObjModType mod)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]