2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2004 SKYRIX Software AG
|
|
|
|
|
|
|
|
This file is part of OpenGroupware.org.
|
|
|
|
|
|
|
|
OGo is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU Lesser General Public License as published by the
|
|
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
later version.
|
|
|
|
|
|
|
|
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2007-06-12 17:33:08 +02:00
|
|
|
License along with SOGo; see the file COPYING. If not, write to the
|
2006-06-15 21:34:10 +02:00
|
|
|
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "OCSiCalFieldExtractor.h"
|
|
|
|
#include "common.h"
|
2006-09-13 23:20:57 +02:00
|
|
|
#include <NGCards/NGCards.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
#include "iCalEntityObject+OCS.h"
|
|
|
|
#include "iCalRepeatableEntityObject+OCS.h"
|
|
|
|
|
|
|
|
@implementation OCSiCalFieldExtractor
|
|
|
|
|
2007-06-12 17:33:08 +02:00
|
|
|
static NSCalendarDate *distantFuture = nil;
|
|
|
|
static NSNumber *distantFutureNumber = nil;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-09-28 19:19:19 +02:00
|
|
|
+ (void) initialize
|
|
|
|
{
|
2007-06-12 17:33:08 +02:00
|
|
|
if (!distantFuture)
|
|
|
|
{
|
|
|
|
distantFuture = [[NSCalendarDate distantFuture] retain];
|
|
|
|
/* INT_MAX due to Postgres constraint */
|
|
|
|
distantFutureNumber = [[NSNumber numberWithUnsignedInt: INT_MAX] retain];
|
|
|
|
}
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2006-09-28 19:19:19 +02:00
|
|
|
+ (id) sharedICalFieldExtractor
|
|
|
|
{
|
2007-06-12 17:33:08 +02:00
|
|
|
static OCSiCalFieldExtractor *extractor = nil;
|
|
|
|
|
|
|
|
if (!extractor)
|
2006-09-28 19:19:19 +02:00
|
|
|
extractor = [self new];
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-09-28 19:19:19 +02:00
|
|
|
return extractor;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* operations */
|
|
|
|
|
2006-09-28 19:19:19 +02:00
|
|
|
- (NSNumber *) numberForDate: (NSCalendarDate *) _date
|
|
|
|
{
|
2007-06-12 17:33:08 +02:00
|
|
|
return ((_date == distantFuture)
|
|
|
|
? distantFutureNumber
|
|
|
|
: [NSNumber numberWithUnsignedInt: [_date timeIntervalSince1970]]);
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2006-09-28 19:19:19 +02:00
|
|
|
- (NSMutableDictionary *) extractQuickFieldsFromEvent: (iCalEvent *) _event
|
|
|
|
{
|
2006-06-15 21:34:10 +02:00
|
|
|
NSMutableDictionary *row;
|
2007-06-12 17:33:08 +02:00
|
|
|
NSCalendarDate *startDate, *endDate;
|
|
|
|
NSArray *attendees;
|
|
|
|
NSString *uid, *title, *location, *status;
|
|
|
|
NSNumber *sequence, *dateNumber;
|
|
|
|
id organizer;
|
|
|
|
id participants, partmails;
|
|
|
|
NSMutableString *partstates;
|
|
|
|
unsigned int i, count;
|
|
|
|
BOOL isAllDay;
|
2007-03-07 22:10:21 +01:00
|
|
|
iCalAccessClass accessClass;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
if (_event == nil)
|
|
|
|
return nil;
|
|
|
|
|
|
|
|
/* extract values */
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
startDate = [_event startDate];
|
|
|
|
endDate = [_event endDate];
|
|
|
|
uid = [_event uid];
|
|
|
|
title = [_event summary];
|
|
|
|
location = [_event location];
|
|
|
|
sequence = [_event sequence];
|
|
|
|
accessClass = [_event symbolicAccessClass];
|
|
|
|
isAllDay = [_event isAllDay];
|
|
|
|
status = [[_event status] uppercaseString];
|
|
|
|
|
|
|
|
attendees = [_event attendees];
|
|
|
|
partmails = [attendees valueForKey: @"rfc822Email"];
|
|
|
|
partmails = [partmails componentsJoinedByString: @"\n"];
|
|
|
|
participants = [attendees valueForKey: @"cn"];
|
|
|
|
participants = [participants componentsJoinedByString: @"\n"];
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* build row */
|
|
|
|
|
|
|
|
row = [NSMutableDictionary dictionaryWithCapacity:8];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
[row setObject: @"vevent" forKey: @"component"];
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
if ([uid isNotNull])
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:uid forKey: @"uid"];
|
2006-06-15 21:34:10 +02:00
|
|
|
else
|
2007-06-12 17:33:08 +02:00
|
|
|
[self logWithFormat: @"WARNING: could not extract a uid from event!"];
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: [NSNumber numberWithBool: isAllDay]
|
2006-10-26 01:59:40 +02:00
|
|
|
forKey: @"isallday"];
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: [NSNumber numberWithBool: [_event isRecurrent]]
|
2006-10-26 01:59:40 +02:00
|
|
|
forKey: @"iscycle"];
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: [NSNumber numberWithBool: [_event isOpaque]]
|
2006-10-26 01:59:40 +02:00
|
|
|
forKey: @"isopaque"];
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: [NSNumber numberWithInt: [_event priorityNumber]]
|
2006-10-26 01:59:40 +02:00
|
|
|
forKey: @"priority"];
|
|
|
|
|
2007-06-12 17:33:08 +02:00
|
|
|
if ([title isNotNull]) [row setObject: title forKey: @"title"];
|
|
|
|
if ([location isNotNull]) [row setObject: location forKey: @"location"];
|
|
|
|
if ([sequence isNotNull]) [row setObject: sequence forKey: @"sequence"];
|
2006-10-26 01:59:40 +02:00
|
|
|
|
2007-03-05 23:32:47 +01:00
|
|
|
if ([startDate isNotNull])
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: [self numberForDate: startDate]
|
|
|
|
forKey: @"startdate"];
|
2007-03-05 23:32:47 +01:00
|
|
|
if ([endDate isNotNull])
|
2007-06-12 17:33:08 +02:00
|
|
|
{
|
|
|
|
if (endDate == distantFuture)
|
|
|
|
dateNumber = distantFutureNumber;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (isAllDay)
|
|
|
|
i = 1;
|
|
|
|
else
|
|
|
|
i = 0;
|
|
|
|
dateNumber
|
|
|
|
= [NSNumber numberWithUnsignedInt:
|
|
|
|
[endDate timeIntervalSince1970] - i];
|
|
|
|
}
|
|
|
|
[row setObject: dateNumber forKey: @"enddate"];
|
|
|
|
}
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
if ([_event isRecurrent]) {
|
|
|
|
NSCalendarDate *date;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
date = [_event lastPossibleRecurrenceStartDate];
|
|
|
|
if (!date) {
|
|
|
|
/* this could also be *nil*, but in the end it makes the fetchspecs
|
2007-06-12 17:33:08 +02:00
|
|
|
more complex - thus we set it to a "reasonable" distant future */
|
2006-06-15 21:34:10 +02:00
|
|
|
date = distantFuture;
|
|
|
|
}
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:[self numberForDate:date] forKey: @"cycleenddate"];
|
|
|
|
[row setObject:[_event cycleInfo] forKey: @"cycleinfo"];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
2006-10-11 20:21:49 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
if ([participants length] > 0)
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: participants forKey: @"participants"];
|
2006-06-15 21:34:10 +02:00
|
|
|
if ([partmails length] > 0)
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: partmails forKey: @"partmails"];
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
if ([status isNotNull]) {
|
|
|
|
int code = 1;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
if ([status isEqualToString: @"TENTATIVE"])
|
2006-06-15 21:34:10 +02:00
|
|
|
code = 2;
|
2007-06-12 17:33:08 +02:00
|
|
|
else if ([status isEqualToString: @"CANCELLED"])
|
2006-10-26 18:33:38 +02:00
|
|
|
code = 0;
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:[NSNumber numberWithInt:code] forKey: @"status"];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* confirmed by default */
|
2006-10-26 18:33:38 +02:00
|
|
|
[row setObject: [NSNumber numberWithInt:1] forKey: @"status"];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2007-03-07 22:10:21 +01:00
|
|
|
[row setObject: [NSNumber numberWithUnsignedInt: accessClass]
|
2007-03-05 23:32:47 +01:00
|
|
|
forKey: @"classification"];
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
organizer = [_event organizer];
|
|
|
|
if (organizer) {
|
|
|
|
NSString *email;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
email = [organizer valueForKey: @"rfc822Email"];
|
2006-06-15 21:34:10 +02:00
|
|
|
if (email)
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:email forKey: @"orgmail"];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* construct partstates */
|
2007-06-12 17:33:08 +02:00
|
|
|
count = [attendees count];
|
|
|
|
partstates = [[NSMutableString alloc] initWithCapacity:count * 2];
|
2006-06-15 21:34:10 +02:00
|
|
|
for ( i = 0; i < count; i++) {
|
2007-06-12 17:33:08 +02:00
|
|
|
iCalPerson *p;
|
2006-06-15 21:34:10 +02:00
|
|
|
iCalPersonPartStat stat;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
p = [attendees objectAtIndex:i];
|
2006-06-15 21:34:10 +02:00
|
|
|
stat = [p participationStatus];
|
|
|
|
if(i != 0)
|
2007-06-12 17:33:08 +02:00
|
|
|
[partstates appendString: @"\n"];
|
|
|
|
[partstates appendFormat: @"%d", stat];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:partstates forKey: @"partstates"];
|
2006-06-15 21:34:10 +02:00
|
|
|
[partstates release];
|
|
|
|
return row;
|
|
|
|
}
|
|
|
|
|
2006-10-11 20:21:49 +02:00
|
|
|
- (NSMutableDictionary *) extractQuickFieldsFromTodo: (iCalToDo *) _task
|
|
|
|
{
|
|
|
|
NSMutableDictionary *row;
|
2007-06-12 17:33:08 +02:00
|
|
|
NSCalendarDate *startDate, *dueDate;
|
|
|
|
NSArray *attendees;
|
|
|
|
NSString *uid, *title, *location, *status;
|
|
|
|
NSNumber *sequence;
|
|
|
|
id organizer, date;
|
|
|
|
id participants, partmails;
|
|
|
|
NSMutableString *partstates;
|
|
|
|
unsigned i, count, code;
|
2007-03-07 22:10:21 +01:00
|
|
|
iCalAccessClass accessClass;
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
if (_task == nil)
|
2006-06-15 21:34:10 +02:00
|
|
|
return nil;
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
/* extract values */
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
startDate = [_task startDate];
|
|
|
|
dueDate = [_task due];
|
|
|
|
uid = [_task uid];
|
|
|
|
title = [_task summary];
|
|
|
|
location = [_task location];
|
|
|
|
sequence = [_task sequence];
|
|
|
|
accessClass = [_task symbolicAccessClass];
|
|
|
|
status = [[_task status] uppercaseString];
|
|
|
|
|
|
|
|
attendees = [_task attendees];
|
|
|
|
partmails = [attendees valueForKey: @"rfc822Email"];
|
|
|
|
partmails = [partmails componentsJoinedByString: @"\n"];
|
|
|
|
participants = [attendees valueForKey: @"cn"];
|
|
|
|
participants = [participants componentsJoinedByString: @"\n"];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
/* build row */
|
|
|
|
|
|
|
|
row = [NSMutableDictionary dictionaryWithCapacity:8];
|
|
|
|
|
|
|
|
[row setObject: @"vtodo" forKey: @"component"];
|
|
|
|
|
|
|
|
if ([uid isNotNull])
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:uid forKey: @"uid"];
|
2006-10-11 20:21:49 +02:00
|
|
|
else
|
2007-06-12 17:33:08 +02:00
|
|
|
[self logWithFormat: @"WARNING: could not extract a uid from event!"];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
[row setObject:[NSNumber numberWithBool:[_task isRecurrent]]
|
2007-06-12 17:33:08 +02:00
|
|
|
forKey: @"iscycle"];
|
2006-10-11 20:21:49 +02:00
|
|
|
[row setObject:[NSNumber numberWithInt:[_task priorityNumber]]
|
2007-06-12 17:33:08 +02:00
|
|
|
forKey: @"priority"];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
2007-06-12 17:33:08 +02:00
|
|
|
if ([title isNotNull]) [row setObject: title forKey: @"title"];
|
|
|
|
if ([location isNotNull]) [row setObject: location forKey: @"location"];
|
|
|
|
if ([sequence isNotNull]) [row setObject: sequence forKey: @"sequence"];
|
|
|
|
|
2006-10-19 16:33:46 +02:00
|
|
|
if ([startDate isNotNull])
|
|
|
|
date = [self numberForDate: startDate];
|
|
|
|
else
|
2006-10-19 17:01:46 +02:00
|
|
|
date = [NSNull null];
|
2006-10-19 16:33:46 +02:00
|
|
|
[row setObject: date forKey: @"startdate"];
|
2006-10-19 17:01:46 +02:00
|
|
|
|
2006-10-11 20:21:49 +02:00
|
|
|
if ([dueDate isNotNull])
|
2006-10-19 16:33:46 +02:00
|
|
|
date = [self numberForDate: dueDate];
|
|
|
|
else
|
2006-10-19 17:01:46 +02:00
|
|
|
date = [NSNull null];
|
2006-10-19 16:33:46 +02:00
|
|
|
[row setObject: date forKey: @"enddate"];
|
|
|
|
|
2006-10-11 20:21:49 +02:00
|
|
|
if ([participants length] > 0)
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:participants forKey: @"participants"];
|
2006-10-11 20:21:49 +02:00
|
|
|
if ([partmails length] > 0)
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:partmails forKey: @"partmails"];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
if ([status isNotNull]) {
|
|
|
|
code = 0; /* NEEDS-ACTION */
|
2007-06-12 17:33:08 +02:00
|
|
|
if ([status isEqualToString: @"COMPLETED"])
|
2006-10-11 20:21:49 +02:00
|
|
|
code = 1;
|
2007-06-12 17:33:08 +02:00
|
|
|
else if ([status isEqualToString: @"IN-PROCESS"])
|
2006-10-11 20:21:49 +02:00
|
|
|
code = 2;
|
2007-06-12 17:33:08 +02:00
|
|
|
else if ([status isEqualToString: @"CANCELLED"])
|
2006-10-11 20:21:49 +02:00
|
|
|
code = 3;
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject: [NSNumber numberWithInt: code] forKey: @"status"];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
2006-10-11 20:21:49 +02:00
|
|
|
else {
|
|
|
|
/* confirmed by default */
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:[NSNumber numberWithInt:1] forKey: @"status"];
|
2006-10-11 20:21:49 +02:00
|
|
|
}
|
|
|
|
|
2007-03-07 22:10:21 +01:00
|
|
|
[row setObject: [NSNumber numberWithUnsignedInt: accessClass]
|
2007-03-05 23:32:47 +01:00
|
|
|
forKey: @"classification"];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
|
|
|
organizer = [_task organizer];
|
|
|
|
if (organizer) {
|
|
|
|
NSString *email;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
email = [organizer valueForKey: @"rfc822Email"];
|
2006-10-11 20:21:49 +02:00
|
|
|
if (email)
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:email forKey: @"orgmail"];
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-10-11 20:21:49 +02:00
|
|
|
/* construct partstates */
|
2007-06-12 17:33:08 +02:00
|
|
|
count = [attendees count];
|
|
|
|
partstates = [[NSMutableString alloc] initWithCapacity:count * 2];
|
2006-10-11 20:21:49 +02:00
|
|
|
for ( i = 0; i < count; i++) {
|
2007-06-12 17:33:08 +02:00
|
|
|
iCalPerson *p;
|
2006-10-11 20:21:49 +02:00
|
|
|
iCalPersonPartStat stat;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
|
|
|
p = [attendees objectAtIndex:i];
|
2006-10-11 20:21:49 +02:00
|
|
|
stat = [p participationStatus];
|
|
|
|
if(i != 0)
|
2007-06-12 17:33:08 +02:00
|
|
|
[partstates appendString: @"\n"];
|
|
|
|
[partstates appendFormat: @"%d", stat];
|
2006-10-11 20:21:49 +02:00
|
|
|
}
|
2007-06-12 17:33:08 +02:00
|
|
|
[row setObject:partstates forKey: @"partstates"];
|
2006-10-11 20:21:49 +02:00
|
|
|
[partstates release];
|
|
|
|
return row;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (CardGroup *) firstElementFromCalendar: (iCalCalendar *) ical
|
|
|
|
{
|
|
|
|
NSArray *elements;
|
|
|
|
CardGroup *element;
|
|
|
|
unsigned int count;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-10-11 20:21:49 +02:00
|
|
|
elements = [ical allObjects];
|
|
|
|
count = [elements count];
|
|
|
|
if (count)
|
|
|
|
{
|
|
|
|
if (count > 1)
|
2007-06-12 17:33:08 +02:00
|
|
|
[self logWithFormat:
|
|
|
|
@"WARNING: given calendar contains more than one event: %@",
|
|
|
|
ical];
|
2006-10-11 20:21:49 +02:00
|
|
|
element = [elements objectAtIndex: 0];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-06-12 17:33:08 +02:00
|
|
|
[self logWithFormat: @"ERROR: given calendar contains no elements: %@", ical];
|
2006-10-11 20:21:49 +02:00
|
|
|
element = nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
return element;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- (NSMutableDictionary *)extractQuickFieldsFromContent:(NSString *)_content {
|
|
|
|
NSAutoreleasePool *pool;
|
|
|
|
NSDictionary *fields;
|
|
|
|
id cal;
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
if ([_content length] == 0)
|
|
|
|
return nil;
|
|
|
|
|
|
|
|
pool = [[NSAutoreleasePool alloc] init];
|
2006-09-29 20:31:20 +02:00
|
|
|
cal = [iCalCalendar parseSingleFromSource: _content];
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-09-29 20:31:20 +02:00
|
|
|
fields = nil;
|
|
|
|
if (cal)
|
|
|
|
{
|
2006-10-11 20:21:49 +02:00
|
|
|
if ([cal isKindOfClass:[iCalCalendar class]])
|
2007-06-12 17:33:08 +02:00
|
|
|
cal = [self firstElementFromCalendar: cal];
|
2006-10-11 20:21:49 +02:00
|
|
|
|
2006-09-28 19:19:19 +02:00
|
|
|
if ([cal isKindOfClass:[iCalEvent class]])
|
2007-06-12 17:33:08 +02:00
|
|
|
fields = [[self extractQuickFieldsFromEvent:cal] retain];
|
2006-10-11 20:21:49 +02:00
|
|
|
else if ([cal isKindOfClass:[iCalToDo class]])
|
2007-06-12 17:33:08 +02:00
|
|
|
fields = [[self extractQuickFieldsFromTodo:cal] retain];
|
2006-09-28 19:19:19 +02:00
|
|
|
else if ([cal isNotNull]) {
|
2007-06-12 17:33:08 +02:00
|
|
|
[self logWithFormat: @"ERROR: unexpected iCalendar parse result: %@",
|
|
|
|
cal];
|
2006-09-28 19:19:19 +02:00
|
|
|
}
|
|
|
|
}
|
2006-09-29 20:31:20 +02:00
|
|
|
else
|
2007-06-12 17:33:08 +02:00
|
|
|
[self logWithFormat: @"ERROR: parsing source didn't return anything"];
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
[pool release];
|
2007-06-12 17:33:08 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
return [fields autorelease];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end /* OCSiCalFieldExtractor */
|