From cbf3f32b3b87fe925b1da78f4d04b29e63942655 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 28 Sep 2006 17:19:55 +0000 Subject: [PATCH] Monotone-Parent: d4ec4c64b7bfb4975be1924516e870493eb766a2 Monotone-Revision: 64bb41288f025d8a85a54ff9d3fa322dc9a6f5bd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-28T17:19:55 Monotone-Branch: ca.inverse.sogo --- Protocols/iCalHTTP/SOGoICalFileFetch.m | 20 ++++++++++---------- Protocols/iCalHTTP/SOGoICalFilePublish.m | 5 +---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Protocols/iCalHTTP/SOGoICalFileFetch.m b/Protocols/iCalHTTP/SOGoICalFileFetch.m index 2750764ed..3307e5c13 100644 --- a/Protocols/iCalHTTP/SOGoICalFileFetch.m +++ b/Protocols/iCalHTTP/SOGoICalFileFetch.m @@ -19,7 +19,13 @@ 02111-1307, USA. */ -#include +#import +#import "SOGoICalHTTPHandler.h" +#import + +#import + +#import "common.h" @interface SOGoICalFileFetch : WODirectAction { @@ -27,11 +33,6 @@ @end -#include "SOGoICalHTTPHandler.h" -#include -#include -#include "common.h" - @implementation SOGoICalFileFetch /* clientObject */ @@ -45,7 +46,7 @@ - (id)defaultAction { NSAutoreleasePool *pool; WOResponse *response; - SOGoAppointment *event; + iCalEvent *event; NSEnumerator *e; NSArray *events; @@ -65,9 +66,8 @@ events = [[self clientObject] fetchAllSOGoAppointments]; [self debugWithFormat:@"generate %d appointments ...", [events count]]; e = [events objectEnumerator]; - while ((event = [e nextObject]) != nil) { - [response appendContentString:[event vEventString]]; - } + while ((event = [e nextObject]) != nil) + [response appendContentString: [event versitString]]; /* vcal postamble */ [response appendContentString:@"END:VCALENDAR\r\n"]; diff --git a/Protocols/iCalHTTP/SOGoICalFilePublish.m b/Protocols/iCalHTTP/SOGoICalFilePublish.m index 1dd9a3c5e..cf8b935ba 100644 --- a/Protocols/iCalHTTP/SOGoICalFilePublish.m +++ b/Protocols/iCalHTTP/SOGoICalFilePublish.m @@ -135,7 +135,6 @@ static SaxObjectDecoder *sax = nil; - (NSException *)writeNewVEvents:(NSArray *)_events { SOGoAppointmentFolder *folder; - iCalRenderer *renderer; NSException *error; unsigned i, count; @@ -144,15 +143,13 @@ static SaxObjectDecoder *sax = nil; reason:@"did not find clientObject?!"]; } - renderer = [iCalRenderer sharedICalendarRenderer]; - for (i = 0, count = [_events count]; i < count; i++) { SOGoAppointmentObject *object; iCalEvent *event; NSString *ical; event = [_events objectAtIndex:i]; - ical = [renderer iCalendarStringForEvent:event]; + ical = [event versitString]; if (![ical isNotNull] && ([ical length] == 0)) { [self logWithFormat:@"ERROR: got no ical representation of event: %@",