From 726a54d7dca57eb95c7b52765e28d9a98757e558 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 9 Jul 2008 15:54:39 +0000 Subject: [PATCH] Monotone-Parent: 3cad3ace0562bec9fda3d3fbacaeea2559bdda1b Monotone-Revision: 135e7483e9580e1a8e72447e05a5d342c957b54a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-09T15:54:39 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 10 +++++++ .../Appointments/SOGoAppointmentFolder.m | 30 ++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0d7a27879..faec68d32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2008-07-09 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder -davCalendarFreeBusySet]): new method that + returns the HREF to the calendars involved in the user's freebusy. + ([SOGoAppointmentFolder + -setDavCalendarFreeBusySet:newFreeBusySet]): new method that + PRETENDS to modify the list of calendars mentionned above. + ([SOGoAppointmentFolder + -caldavEventRequest:eventwithContent:iCalStringfrom:originatorto:recipients]): + add support for the "CANCEL" method. + * SoObjects/Appointments/SOGoAppointmentObject.m ([SOGoAppointmentObject -postCalDAVEventCancelTo:recipients]): new method that implements support for the CalDAV "CANCEL" method for diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 658cd6a52..f0fffbcba 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1304,6 +1304,32 @@ _selectorForProperty (NSString *property) return error; } +- (SOGoWebDAVValue *) davCalendarFreeBusySet +{ + NSEnumerator *subFolders; + SOGoAppointmentFolder *currentFolder; + NSMutableArray *response; + SOGoWebDAVValue *responseValue; + + response = [NSMutableArray new]; + subFolders = [[container subFolders] objectEnumerator]; + while ((currentFolder = [subFolders nextObject])) + [response addObject: davElementWithContent (@"href", XMLNS_WEBDAV, + [currentFolder davURL])]; + responseValue = [davElementWithContent (@"calendar-free-busy-set", XMLNS_CALDAV, response) + asWebDAVValue]; + [response release]; + + return responseValue; +} + +/* This method is ignored but we must return a success value. */ +- (NSException *) setDavCalendarFreeBusySet: (NSString *) newFreeBusySet +{ + return nil; +} + + - (void) _appendComponentProperties: (NSString **) properties matchingFilters: (NSArray *) filters toResponse: (WOResponse *) response @@ -1751,7 +1777,9 @@ _selectorForProperty (NSString *property) if ([method isEqualToString: @"REQUEST"]) elements = [apt postCalDAVEventRequestTo: recipients]; else if ([method isEqualToString: @"REPLY"]) - elements = [apt postCalDAVEventReplyTo: recipients]; + elements = [apt postCalDAVEventReplyTo: recipients]; + else if ([method isEqualToString: @"CANCEL"]) + elements = [apt postCalDAVEventCancelTo: recipients]; else elements = nil;