[evolution-ews] Featch user response type directly in e_cal_backend_ews_receive_objects and pass it to callback
- From: Pavel Ocheretny <pocheretny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Featch user response type directly in e_cal_backend_ews_receive_objects and pass it to callback
- Date: Sun, 29 May 2011 18:52:42 +0000 (UTC)
commit 481f50cae9c0b59f2564c9ad480f8f7123490f17
Author: Pavel Ocheretny <pocheretny src gnome org>
Date: Sun May 29 21:16:30 2011 +0300
Featch user response type directly in e_cal_backend_ews_receive_objects and pass it to callback
src/calendar/e-cal-backend-ews.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index e51d234..27a1f76 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1431,7 +1431,7 @@ exit:
}
typedef struct {
- const char *current_user_mail;
+ const char *response_type;
ECalComponent *comp;
} EwsAcceptData;
@@ -1457,13 +1457,11 @@ prepare_accept_item_request (ESoapMessage *msg, gpointer user_data)
EwsAcceptData *data = user_data;
ECalComponent *comp = data->comp;
gchar *uid = NULL, *change_key = NULL;
- const char *response_type = NULL;
+ const char *response_type = data->response_type;
/* gather needed data from icalcomponent */
ews_cal_component_get_item_id (comp, &uid, &change_key);
- response_type = e_ews_get_current_user_meeting_reponse (e_cal_component_get_icalcomponent (comp),data->current_user_mail);
-
/* FORMAT OF A SAMPLE SOAP MESSAGE: http://msdn.microsoft.com/en-us/library/aa566464%28v=exchg.140%29.aspx
* Accept and Decline meeting have same method code (10032)
* The real status is reflected at Attendee property PARTSTAT
@@ -1532,14 +1530,16 @@ e_cal_backend_ews_receive_objects (ECalBackend *backend, EDataCal *cal, EServerM
while (subcomp) {
ECalComponent *comp = e_cal_component_new ();
-
+ const char *response_type;
/* duplicate the ical component */
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone(subcomp));
+ response_type = e_ews_get_current_user_meeting_reponse (e_cal_component_get_icalcomponent (comp),priv->user_email);
+
switch (method) {
case ICAL_METHOD_REQUEST:
accept_data = g_new0 (EwsAcceptData, 1);
- accept_data->current_user_mail = priv->user_email;
+ accept_data->response_type = response_type;
accept_data->comp = comp;
e_ews_connection_create_items (priv->cnc, EWS_PRIORITY_MEDIUM,
"SendAndSaveCopy", NULL, NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]