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 - (id)copyWithZone:(NSZone *)_zone {
42 new = [super copyWithZone:_zone];
44 ASSIGNCOPY(new->entries, self->entries);
45 ASSIGNCOPY(new->organizer, self->organizer);
46 ASSIGNCOPY(new->startDate, self->startDate);
47 ASSIGNCOPY(new->endDate, self->endDate);
48 ASSIGNCOPY(new->url, self->url);
55 - (void)setUrl:(NSString *)_url {
56 ASSIGN(self->url, _url);
62 - (void)setStartDate:(NSCalendarDate *)_date {
63 ASSIGN(self->startDate, _date);
65 - (NSCalendarDate *)startDate {
66 return self->startDate;
69 - (void)setEndDate:(NSCalendarDate *)_date {
70 ASSIGN(self->endDate, _date);
72 - (NSCalendarDate *)endDate {
76 - (void)setOrganizer:(iCalPerson *)_organizer {
77 ASSIGN(self->organizer, _organizer);
79 - (iCalPerson *)organizer {
80 return self->organizer;
83 - (void)addToEntries:(id)_obj {
84 if (_obj == nil) return;
85 if (self->entries == nil)
86 self->entries = [[NSMutableArray alloc] initWithCapacity:1];
87 [self->entries addObject:_obj];
92 - (NSString *)entityName {
98 - (NSString *)description {
101 ms = [NSMutableString stringWithCapacity:128];
102 [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
104 if (self->startDate) [ms appendFormat:@" from=%@", self->startDate];
105 if (self->endDate) [ms appendFormat:@" to=%@", self->endDate];
108 [ms appendFormat:@" organizer=%@", self->organizer];
110 if ([self->entries count] > 0)
111 [ms appendFormat:@" %@", self->entries];
113 [ms appendString:@">"];
117 @end /* iCalFreeBusy */