]> err.no Git - sope/blob - sope-ical/NGiCal/iCalAlarm.m
sope is now a versioned binary
[sope] / sope-ical / NGiCal / iCalAlarm.m
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21 // $Id$
22
23 #include "iCalAlarm.h"
24 #include "common.h"
25
26 @implementation iCalAlarm
27
28 - (void)dealloc {
29   [self->trigger release];
30   [self->comment release];
31   [self->action  release];
32   [self->attach  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 /* descriptions */
67
68 - (NSString *)description {
69   NSMutableString *ms;
70
71   ms = [NSMutableString stringWithCapacity:128];
72   [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
73
74   if (self->action)
75     [ms appendFormat:@" action=%@", self->action];
76   if (self->comment)
77     [ms appendFormat:@" comment=%@", self->comment];
78   if (self->trigger)
79     [ms appendFormat:@" trigger=%@", self->trigger];
80   
81   [ms appendString:@">"];
82   return ms;
83 }
84
85 @end /* iCalAlarm */