From fd0d5ab723f2e9a9512516ad5f0656c0115f6cda Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 9 Mar 2007 23:10:43 +0000 Subject: [PATCH] Monotone-Parent: e2612f65bcad1f3bf690e9591362c3fcf8825a80 Monotone-Revision: 55b46093b748e72cd037f89dc45b4785c5466dc6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-09T23:10:43 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 +++++++ .../Appointments/SOGoAppointmentFolder.m | 22 +++++++++++++++++- SoObjects/SOGo/SOGoUserFolder.m | 23 +++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 331f0414f..ed7e606cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-02-09 Helge Hess + + * SoObjects/Appointments/SOGoAppointmentFolder.m: added CalDAV + resourcetype + + * SoObjects/SOGo/SOGoUserFolder.m: added davCalendarHomeSet CalDAV + property to point at the user folder + 2007-03-07 Wolfgang Sourdeau * SoObjects/SOGo/SOGoAuthenticator.m ([SOGoAuthenticator diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index dc901a3a0..c511e3fcd 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -20,12 +20,13 @@ */ #import -#import #import #import #import #import #import +#import +#import // #import #import @@ -107,6 +108,8 @@ static NSNumber *sharedYes = nil; NSString *s; s = [[self container] nameInContainer]; +#warning HH DEBUG + [self logWithFormat:@"CAL UID: %@", s]; return [s isNotNull] ? [NSArray arrayWithObjects:&s count:1] : nil; } @@ -406,6 +409,23 @@ static NSNumber *sharedYes = nil; return @"vevent-collection"; } +- (NSArray *) davResourceType +{ + static NSArray *colType = nil; + NSArray *gdCol, *cdCol; + + if (!colType) + { + cdCol = [NSArray arrayWithObjects: @"calendar", XMLNS_CALDAV, nil]; + gdCol = [NSArray arrayWithObjects: [self groupDavResourceType], + XMLNS_GROUPDAV, nil]; + colType = [NSArray arrayWithObjects: @"collection", cdCol, gdCol, nil]; + [colType retain]; + } + + return colType; +} + /* vevent UID handling */ - (NSString *) resourceNameForEventUID: (NSString *)_u diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index 5f4cb3a37..d0d6a34eb 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -231,4 +231,27 @@ return YES; } +/* CalDAV support */ +- (NSArray *) davCalendarHomeSet +{ + /* + + http://cal.example.com/home/bernard/calendars/ + + + Note: this is the *container* for calendar collections, not the + collections itself. So for use its the home folder, the + public folder and the groups folder. + */ + WOContext *context; + NSArray *tag; + + context = [[WOApplication application] context]; + tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D", + [self baseURLInContext: context], nil]; + + return [NSArray arrayWithObject: tag]; +} + @end /* SOGoUserFolder */