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 #import "iCalAttachment.h"
23 #import "iCalRecurrenceRule.h"
24 #import "iCalTrigger.h"
29 @implementation iCalAlarm
31 - (Class) classForTag: (NSString *) classTag
35 if ([classTag isEqualToString: @"TRIGGER"])
36 tagClass = [iCalTrigger class];
37 else if ([classTag isEqualToString: @"ATTACH"])
38 tagClass = [iCalAttachment class];
39 else if ([classTag isEqualToString: @"RRULE"])
40 tagClass = [iCalRecurrenceRule class];
41 else if ([classTag isEqualToString: @"ACTION"]
42 || [classTag isEqualToString: @"COMMENT"])
43 tagClass = [CardElement class];
45 tagClass = [super classForTag: classTag];
52 - (void) setTrigger: (iCalTrigger *) _value
54 [self setUniqueChild: _value];
57 - (iCalTrigger *) trigger
59 return (iCalTrigger *) [self uniqueChildWithTag: @"trigger"];
62 - (void) setAttach: (iCalAttachment *) _value
64 [self setUniqueChild: _value];
67 - (iCalAttachment *) attach
69 return (iCalAttachment *) [self uniqueChildWithTag: @"attach"];
72 - (void) setComment: (NSString *) _value
74 [[self uniqueChildWithTag: @"comment"] setValue: 0
78 - (NSString *) comment
80 return [[self uniqueChildWithTag: @"comment"] value: 0];
83 - (void) setAction: (NSString *) _value
85 [[self uniqueChildWithTag: @"action"] setValue: 0
91 return [[self uniqueChildWithTag: @"action"] value: 0];
94 - (void) setRecurrenceRule: (NSString *) _recurrenceRule
96 [[self uniqueChildWithTag: @"rrule"] setValue: 0
100 - (NSString *) recurrenceRule
102 return [[self uniqueChildWithTag: @"rrule"] value: 0];