From 99144929aeb7237fccd2d97a7753cadf4ab2b99f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Sun, 22 Jul 2007 20:42:00 +0000 Subject: [PATCH] Monotone-Parent: a7a7371747e1185b197e3a0ea0c6d585bf7e0a46 Monotone-Revision: 873e19c6a1402fe9683b74b247566e9aced6d354 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-22T20:42:00 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 ++++ .../Appointments/SOGoAppointmentFolder.m | 27 +++++-------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a69d879a..389a0f4f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-07-22 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([-lookupActionForCalDAVMethod:]): removed method. + ([SOGoAppointmentFolder -davNamespaces]): added new overriden + method that declares the DAV namespace related to CalDAV. + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -davNamespaces]): new optional method for subclasses which handle specific extensions to the DAV protocol: CardDAV or CalDAV. diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 4e7257c30..8cc9c45d2 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -21,7 +21,6 @@ #import #import -#import #import #import #import @@ -32,7 +31,6 @@ #import #import #import -#import #import #import "common.h" @@ -135,21 +133,6 @@ static NSNumber *sharedYes = nil; return ([_key length] != 0); } -- (id) lookupActionForCalDAVMethod: (NSString *)_key -{ - SoSelectorInvocation *invocation; - NSString *name; - - name = [NSString stringWithFormat: @"%@:", [_key davMethodToObjC]]; - - invocation = [[SoSelectorInvocation alloc] - initWithSelectorNamed: name - addContextParameter: YES]; - [invocation autorelease]; - - return invocation; -} - - (void) appendObject: (NSDictionary *) object withBaseURL: (NSString *) baseURL toREPORTResponse: (WOResponse *) r @@ -280,6 +263,11 @@ static NSNumber *sharedYes = nil; } } +- (NSArray *) davNamespaces +{ + return [NSArray arrayWithObject: @"urn:ietf:params:xml:ns:caldav"]; +} + - (id) davCalendarQuery: (id) queryContext { WOResponse *r; @@ -376,10 +364,7 @@ static NSNumber *sharedYes = nil; obj = [super lookupName:_key inContext:_ctx acquire:NO]; if (!obj) { - if ([_key hasPrefix: @"{urn:ietf:params:xml:ns:caldav}"]) - obj - = [self lookupActionForCalDAVMethod: [_key substringFromIndex: 31]]; - else if ([self isValidAppointmentName:_key]) + if ([self isValidAppointmentName:_key]) { url = [[[_ctx request] uri] urlWithoutParameters]; if ([url hasSuffix: @"AsTask"])