[evolution-ews] Set attendees properties like role and type. Exchange server didn't provide information about recour
- From: Pavel Ocheretny <pocheretny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Set attendees properties like role and type. Exchange server didn't provide information about recour
- Date: Sun, 7 Aug 2011 07:27:44 +0000 (UTC)
commit 6357001c98587e0a4d8c51b7e9e16f78d960fcf4
Author: Pavel Ocheretny <pocheretny src gnome org>
Date: Sun Aug 7 10:26:12 2011 +0300
Set attendees properties like role and type.
Exchange server didn't provide information about recourse type. We cannot differ between room, resource or group
src/calendar/e-cal-backend-ews.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 5864cf7..cc43f86 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -2775,7 +2775,7 @@ add_item_to_cache (ECalBackendEws *cbews, EEwsItem *item)
/* Attendees */
for (l = e_ews_item_get_attendees (item); l != NULL; l = g_slist_next (l)) {
- icalparameter *param;
+ icalparameter *param, *cu_type;
char *mailtoname;
EwsAttendee *attendee = (EwsAttendee *)l->data;
/*remove orginizer for attendeees list*/
@@ -2789,11 +2789,20 @@ add_item_to_cache (ECalBackendEws *cbews, EEwsItem *item)
param = icalparameter_new_cn(attendee->mailbox->name);
icalproperty_add_parameter(icalprop, param);
- if (g_ascii_strcasecmp(attendee->attendeetype, "Required") == 0)
- param = icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT);
- else
- param = icalparameter_new_role(ICAL_ROLE_OPTPARTICIPANT);
- icalproperty_add_parameter(icalprop, param);
+ if (g_ascii_strcasecmp(attendee->attendeetype, "Required") == 0) {
+ param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
+ cu_type = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL);
+ }
+ else if (g_ascii_strcasecmp(attendee->attendeetype, "Resource") == 0) {
+ param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT);
+ cu_type = icalparameter_new_cutype (ICAL_CUTYPE_RESOURCE);
+ }
+ else {
+ param = icalparameter_new_role ( ICAL_ROLE_OPTPARTICIPANT);
+ cu_type = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL);
+ }
+ icalproperty_add_parameter (icalprop, cu_type);
+ icalproperty_add_parameter (icalprop, param);
if (g_ascii_strcasecmp (attendee->responsetype, "Organizer") == 0)
param = icalparameter_new_partstat (ICAL_PARTSTAT_ACCEPTED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]