]> err.no Git - sope/blob - sope-ical/NGiCal/iCalAlarm.m
bugfixes for cycle calculation, modified implementations with future extensions in...
[sope] / sope-ical / NGiCal / iCalAlarm.m
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #include "iCalAlarm.h"
23 #include "common.h"
24
25 @implementation iCalAlarm
26
27 - (void)dealloc {
28   [self->trigger        release];
29   [self->comment        release];
30   [self->action         release];
31   [self->attach         release];
32   [self->recurrenceRule release];
33   [super dealloc];
34 }
35
36 /* accessors */
37
38 - (void)setTrigger:(id)_value {
39   ASSIGN(self->trigger, _value);
40 }
41 - (id)trigger {
42   return self->trigger;
43 }
44
45 - (void)setAttach:(id)_value {
46   ASSIGN(self->attach, _value);
47 }
48 - (id)attach {
49   return self->attach;
50 }
51
52 - (void)setComment:(NSString *)_value {
53   ASSIGNCOPY(self->comment, _value);
54 }
55 - (NSString *)comment {
56   return self->comment;
57 }
58
59 - (void)setAction:(NSString *)_value {
60   ASSIGNCOPY(self->action, _value);
61 }
62 - (NSString *)action {
63   return self->action;
64 }
65
66 - (void)setRecurrenceRule:(NSString *)_recurrenceRule {
67   ASSIGN(self->recurrenceRule, _recurrenceRule);
68 }
69 - (NSString *)recurrenceRule {
70   return self->recurrenceRule;
71 }
72
73 /* descriptions */
74
75 - (NSString *)description {
76   NSMutableString *ms;
77
78   ms = [NSMutableString stringWithCapacity:128];
79   [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
80
81   if (self->action)
82     [ms appendFormat:@" action=%@", self->action];
83   if (self->comment)
84     [ms appendFormat:@" comment=%@", self->comment];
85   if (self->trigger)
86     [ms appendFormat:@" trigger=%@", self->trigger];
87   if (self->recurrenceRule)
88     [ms appendFormat:@" recurrenceRule=%@", self->recurrenceRule];
89   
90   [ms appendString:@">"];
91   return ms;
92 }
93
94 @end /* iCalAlarm */