2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo 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 OGo 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 OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "iCalFreeBusy.h"
24 #include "iCalPerson.h"
27 @implementation iCalFreeBusy
30 [self->entries release];
31 [self->organizer release];
32 [self->startDate release];
33 [self->endDate release];
40 - (void)setUrl:(NSString *)_url {
41 ASSIGN(self->url, _url);
47 - (void)setStartDate:(NSCalendarDate *)_date {
48 ASSIGN(self->startDate, _date);
50 - (NSCalendarDate *)startDate {
51 return self->startDate;
54 - (void)setEndDate:(NSCalendarDate *)_date {
55 ASSIGN(self->endDate, _date);
57 - (NSCalendarDate *)endDate {
61 - (void)setOrganizer:(iCalPerson *)_organizer {
62 ASSIGN(self->organizer, _organizer);
64 - (iCalPerson *)organizer {
65 return self->organizer;
68 - (void)addToEntries:(id)_obj {
69 if (_obj == nil) return;
70 if (self->entries == nil)
71 self->entries = [[NSMutableArray alloc] initWithCapacity:1];
72 [self->entries addObject:_obj];
77 - (NSString *)entityName {
83 - (NSString *)description {
86 ms = [NSMutableString stringWithCapacity:128];
87 [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
89 if (self->startDate) [ms appendFormat:@" from=%@", self->startDate];
90 if (self->endDate) [ms appendFormat:@" to=%@", self->endDate];
93 [ms appendFormat:@" organizer=%@", self->organizer];
95 if ([self->entries count] > 0)
96 [ms appendFormat:@" %@", self->entries];
98 [ms appendString:@">"];
102 @end /* iCalFreeBusy */