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 #ifndef __NGCards_iCalEntityObject_H__ 23 #define __NGCards_iCalEntityObject_H__ 24 25 #import "CardGroup.h" 26 27 /* 28 iCalEntityObject 29 30 This is a common base class for tasks and appointments which share a lot of 31 attributes. 32 */ 33 34 @class NSCalendarDate, NSMutableArray, NSString, NSArray, NSNumber; 35 @class iCalPerson; 36 @class NSURL; 37 38 typedef enum 39 { 40 iCalAccessPublic = 0, 41 iCalAccessPrivate = 1, 42 iCalAccessConfidential = 2, 43 iCalAccessClassCount = 3 44 } iCalAccessClass; 45 46 @interface iCalEntityObject : CardGroup 47 48 /* accessors */ 49 50 - (void) setUid: (NSString *) _value; 51 - (NSString *) uid; 52 53 - (void) setSummary: (NSString *) _value; 54 - (NSString *) summary; 55 56 - (void) setLocation: (NSString *) _value; 57 - (NSString *) location; 58 59 - (void) setComment: (NSString *) _value; 60 - (NSString *) comment; 61 62 - (void) setAccessClass:(NSString *) _value; 63 - (NSString *) accessClass; 64 - (iCalAccessClass) symbolicAccessClass; 65 - (BOOL) isPublic; 66 67 - (void) setPriority: (NSString *) _value; 68 - (NSString *) priority; 69 70 - (void) setCategories: (NSArray *) _value; 71 - (NSArray *) categories; 72 73 - (void) setUserComment: (NSString *) _userComment; 74 - (NSString *) userComment; 75 76 - (void) setTimeStampAsDate: (NSCalendarDate *)_date; 77 - (NSCalendarDate *) timeStampAsDate; 78 79 - (void) setStartDate: (NSCalendarDate *) newStartDate; 80 - (NSCalendarDate *) startDate; 81 - (BOOL) hasStartDate; 82 83 - (void) setRecurrenceId: (NSCalendarDate *) newRecId; 84 - (NSCalendarDate *) recurrenceId; 85 86 - (void) setLastModified: (NSCalendarDate *) _value; 87 - (NSCalendarDate *) lastModified; 88 89 - (void) setCreated: (NSCalendarDate *) _value; 90 - (NSCalendarDate *) created; 91 92 - (void) setSequence: (NSNumber *) _value; /* this is an int */ 93 - (NSNumber *) sequence; 94 - (void) increaseSequence; 95 96 /* url can either be set as NSString or NSURL */ 97 - (void) setAttach: (id) _value; 98 - (NSURL *) attach; 99 - (void) setUrl: (id) _value; 100 - (NSURL *) url; 101 102 - (void) setOrganizer: (iCalPerson *) _organizer; 103 - (iCalPerson *) organizer; 104 - (BOOL)isOrganizer:(id)_email; 105 106 - (void) setStatus: (NSString *) _value; 107 - (NSString *) status; 108 109 - (void) addToAttendees: (iCalPerson *) _person; 110 - (NSArray *) attendees; 111 - (void) setAttendees: (NSArray *) attendees; 112 - (BOOL) isAttendee: (id) _email; 113 114 - (void) removeFromAttendees: (iCalPerson *) oldAttendee; 115 - (void) removeAllAttendees; 116 117 /* categorize attendees into participants and non-participants */ 118 - (NSArray *) participants; 119 - (NSArray *) nonParticipants; 120 - (BOOL) isParticipant: (id) _email; 121 - (iCalPerson *) findAttendeeWithEmail: (id) email; 122 123 - (void) removeAllAlarms; 124 - (void) addToAlarms: (id) _alarm; 125 - (NSArray *) alarms; 126 - (BOOL) hasAlarms; 127 128 /* comparisons */ 129 - (NSComparisonResult) compare: (iCalEntityObject *) otherObject; 130 131 @end 132 133 #endif /* __NGCards_iCalEntityObject_H__ */ 134