From cd7d211b60c8d42f088311b32b4e50a1792acd57 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 30 Nov 2011 14:49:07 +0000 Subject: [PATCH] Monotone-Parent: eef38dc2fbafb16d2c16acc4dc79d0412e927b3b Monotone-Revision: f93961e90221976ffc8c660ae642c8bbe0c84f61 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-11-30T14:49:07 --- ChangeLog | 8 ++++++++ Main/SOGo+DAV.m | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index edbea570a..6cf7896f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-11-30 Wolfgang Sourdeau + * Main/SOGo+DAV.m (-davPrincipalURL): new DAV getter. + (-davPrincipalSearchPropertySet): added "calendar-user-type", even + though it's a lie. + (-davComplianceClassesInContext:): declare + "calendar-query-extended", "extended-mkcol", + "calendarserver-principal-property-search" as additional classes, + even though it's a lie. + * SoObjects/Appointments/SOGoUserFolder+Appointments.m (-davCalendarUserAddressSet): make sure each email address is reported only once, we also return the user principal in the list diff --git a/Main/SOGo+DAV.m b/Main/SOGo+DAV.m index 41d4b64b5..66f7f0461 100644 --- a/Main/SOGo+DAV.m +++ b/Main/SOGo+DAV.m @@ -48,6 +48,26 @@ @implementation SOGo (SOGoWebDAVExtensions) +- (NSArray *) davPrincipalURL +{ + NSArray *principalURL; + NSString *classes; + WOContext *context; + + context = [self context]; + if ([[context request] isICal4]) + { + classes = [[self davComplianceClassesInContext: context] + componentsJoinedByString: @", "]; + [[context response] setHeader: classes forKey: @"DAV"]; + } + + principalURL = [NSArray arrayWithObjects: @"href", @"DAV:", @"D", + [self davURLAsString], nil]; + + return [NSArray arrayWithObject: principalURL]; +} + - (WOResponse *) davPrincipalSearchPropertySet: (WOContext *) localContext { static NSDictionary *davResponse = nil; @@ -62,6 +82,7 @@ properties = [NSArray arrayWithObjects: @"calendar-user-type", @"calendar-user-address-set", + @"calendar-user-type", @"displayname", @"first-name", @"last-name", @@ -72,6 +93,7 @@ namespaces = [NSArray arrayWithObjects: XMLNS_CALDAV, XMLNS_CALDAV, + XMLNS_CALDAV, XMLNS_WEBDAV, XMLNS_CalendarServerOrg, XMLNS_CalendarServerOrg, @@ -549,9 +571,15 @@ { newClasses = [[super davComplianceClassesInContext: localContext] mutableCopy]; - selfClasses = [NSArray arrayWithObjects: @"access-control", @"addressbook", - @"calendar-access", @"calendar-auto-schedule", - @"calendar-schedule", @"calendar-proxy", nil]; + selfClasses = [NSArray arrayWithObjects: @"access-control", + @"addressbook", @"calendar-access", + @"calendar-schedule", @"calendar-auto-schedule", + @"calendar-proxy", + + @"calendar-query-extended", + @"extended-mkcol", + @"calendarserver-principal-property-search", + nil]; [newClasses addObjectsFromArray: selfClasses]; }