[evolution-ews] Infrastructure for creating tasks



commit a18b59a0bad4fae8c3c3971b7af32b539ca75b40
Author: Or Goshen <orx goshen intel com>
Date:   Sun Jul 3 12:39:55 2011 +0300

    Infrastructure for creating tasks

 src/calendar/e-cal-backend-ews.c |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 8cb5c00..74bdf03 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1026,7 +1026,7 @@ static void add_attendees_list_to_message(ESoapMessage *msg, const gchar *listna
 }
 
 static void
-convert_calcomp_to_xml(ESoapMessage *msg, gpointer user_data)
+convert_vevent_calcomp_to_xml(ESoapMessage *msg, gpointer user_data)
 {
 	icalcomponent *icalcomp = (icalcomponent*)user_data;
 	GSList *required = NULL, *optional = NULL, *resource = NULL;
@@ -1094,6 +1094,35 @@ convert_calcomp_to_xml(ESoapMessage *msg, gpointer user_data)
 }
 
 static void
+convert_vtodo_calcomp_to_xml(ESoapMessage *msg, gpointer user_data)
+{
+	icalcomponent *icalcomp = (icalcomponent*)user_data;
+
+	e_soap_message_start_element(msg, "Task", NULL, NULL);
+
+	e_ews_message_write_string_parameter(msg, "Subject", NULL,  icalcomponent_get_summary(icalcomp));
+
+	e_soap_message_end_element(msg); // "Task"
+}
+
+static void
+convert_calcomp_to_xml(ESoapMessage *msg, gpointer user_data)
+{
+	icalcomponent *icalcomp = (icalcomponent*)user_data;
+
+	switch (icalcomponent_isa (icalcomp)) {
+	case ICAL_VEVENT_COMPONENT:
+		convert_vevent_calcomp_to_xml (msg, user_data);
+		break;
+	case ICAL_VTODO_COMPONENT:
+		convert_vtodo_calcomp_to_xml (msg, user_data);
+		break;
+	default:
+		break;
+	}
+}
+
+static void
 e_cal_backend_ews_remove_object (ECalBackend *backend, EDataCal *cal, EServerMethodContext context,
 				 const gchar *uid, const gchar *rid, CalObjModType mod);
 



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