2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #include "iCalFreeBusy.h"
23 #include "iCalPerson.h"
26 @implementation iCalFreeBusy
29 [self->entries release];
30 [self->organizer release];
31 [self->startDate release];
32 [self->endDate release];
39 - (void)setUrl:(NSString *)_url {
40 ASSIGN(self->url, _url);
46 - (void)setStartDate:(NSCalendarDate *)_date {
47 ASSIGN(self->startDate, _date);
49 - (NSCalendarDate *)startDate {
50 return self->startDate;
53 - (void)setEndDate:(NSCalendarDate *)_date {
54 ASSIGN(self->endDate, _date);
56 - (NSCalendarDate *)endDate {
60 - (void)setOrganizer:(iCalPerson *)_organizer {
61 ASSIGN(self->organizer, _organizer);
63 - (iCalPerson *)organizer {
64 return self->organizer;
67 - (void)addToEntries:(id)_obj {
68 if (_obj == nil) return;
69 if (self->entries == nil)
70 self->entries = [[NSMutableArray alloc] initWithCapacity:1];
71 [self->entries addObject:_obj];
76 - (NSString *)entityName {
82 - (NSString *)description {
85 ms = [NSMutableString stringWithCapacity:128];
86 [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
88 if (self->startDate) [ms appendFormat:@" from=%@", self->startDate];
89 if (self->endDate) [ms appendFormat:@" to=%@", self->endDate];
92 [ms appendFormat:@" organizer=%@", self->organizer];
94 if ([self->entries count] > 0)
95 [ms appendFormat:@" %@", self->entries];
97 [ms appendString:@">"];
101 @end /* iCalFreeBusy */