[evolution-ews] I order to create meeting with attachments (according to MS blogs) we have to to it in 3 stages : 1.



commit 3df7eab8d609d8cfe8aa2aa4d2e035d609398e79
Author: Pavel Ocheretny <pocheretny src gnome org>
Date:   Thu Jul 21 09:16:07 2011 +0300

    I order to create meeting with attachments (according to MS blogs) we have to to it in 3 stages :
    1. create meeting, do not send invites
    2. create attachments
    3. update meeting and send invites
    
    this is a first step, for meetings with attachments

 src/calendar/e-cal-backend-ews.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index d688366..7ffeb9f 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1433,6 +1433,8 @@ e_cal_backend_ews_create_object(ECalBackend *backend, EDataCal *cal, EServerMeth
 		g_propagate_error(&error, EDC_ERROR(RepositoryOffline));
 		goto exit;
 	}
+
+	g_warning ("start create a movible instance\n%s\n",calobj);
 	/* parse ical data */
 	icalcomp = icalparser_parse_string(calobj);
 
@@ -1463,8 +1465,20 @@ e_cal_backend_ews_create_object(ECalBackend *backend, EDataCal *cal, EServerMeth
 	create_data->cal = g_object_ref(cal);
 	create_data->context = context;
 
-	/* pass new calendar component data to the exchange server and expect response in the callback */
-	e_ews_connection_create_items_start(priv->cnc,
+	if (e_cal_component_has_attachments (comp))
+		e_ews_connection_create_items_start(priv->cnc,
+					     EWS_PRIORITY_MEDIUM,
+					     "SaveOnly",
+					     "SendToNone",
+					     priv->folder_id,
+					     convert_calcomp_to_xml,
+					     icalcomp,
+					     ews_create_object_cb,
+					     cancellable,
+					     create_data);
+	else
+		/* pass new calendar component data to the exchange server and expect response in the callback */
+		e_ews_connection_create_items_start(priv->cnc,
 					     EWS_PRIORITY_MEDIUM,NULL,
 					     "SendToAllAndSaveCopy",
 					     priv->folder_id,



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