]> err.no Git - scalable-opengroupware.org/blob - SoObjects/Appointments/SOGoAppointmentFolder.h
f3e71cd8d1f1a7f01f94a5a2c741d8564a6a31ce
[scalable-opengroupware.org] / SoObjects / Appointments / SOGoAppointmentFolder.h
1 /*
2   Copyright (C) 2004-2005 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
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
22 #ifndef __Appointments_SOGoAppointmentFolder_H__
23 #define __Appointments_SOGoAppointmentFolder_H__
24
25 /*
26   SOGoAppointmentFolder
27     Parent object: the SOGoUserFolder
28     Child objects: SOGoAppointmentObject
29     
30   The SOGoAppointmentFolder maps to an GCS folder of type 'appointment', that
31   is, a content folder containing iCalendar files (and a proper quicktable).
32   
33   Important:
34   The folder assumes a 1:1 mapping between the vevent UID field and the
35   resource name in the content store. In other words, you are not allowed to
36   create two different vevent-files with the same uid in the store.
37 */
38
39 #import "SOGo/SOGoFolder.h"
40
41 @class NSArray;
42 @class NSCalendarDate;
43 @class NSException;
44 @class NSMutableDictionary;
45 @class NSString;
46 @class NSTimeZone;
47 @class GCSFolder;
48
49 #import <NGCards/iCalEntityObject.h>
50 @interface SOGoAppointmentFolder : SOGoFolder
51 {
52   NSTimeZone *timeZone;
53   NSMutableDictionary *uidToFilename;
54 }
55
56 /* selection */
57
58 - (NSArray *) calendarUIDs;
59
60 /* vevent UID handling */
61
62 - (NSString *) resourceNameForEventUID: (NSString *) _uid;
63 - (Class) objectClassForResourceNamed: (NSString *) c_name;
64
65 /* fetching */
66
67 - (NSArray *) fetchFields: (NSArray *) _fields
68                fromFolder: (GCSFolder *) _folder
69                      from: (NSCalendarDate *) _startDate
70                        to: (NSCalendarDate *) _endDate
71                 component: (id) _component;
72
73 - (NSArray * ) fetchFields: (NSArray *) _fields
74                       from: (NSCalendarDate *) _startDate
75                         to: (NSCalendarDate *) _endDate
76                  component: (id) _component;
77
78 - (NSArray *) fetchCoreInfosFrom: (NSCalendarDate *) _startDate
79                               to: (NSCalendarDate *) _endDate
80                        component: (id) _component;
81
82 - (NSArray *) fetchFreeBusyInfosFrom: (NSCalendarDate *) _startDate
83                                   to: (NSCalendarDate *) _endDate;
84
85 - (void) deleteEntriesWithIds: (NSArray *) ids;
86
87 /* URL generation */
88
89 - (NSString *) baseURLForAptWithUID: (NSString *) _uid
90                           inContext: (id) _ctx;
91
92 /* folder management */
93
94 - (id) lookupHomeFolderForUID: (NSString *) _uid
95                     inContext: (id) _ctx;
96
97 - (SOGoAppointmentFolder *) lookupCalendarFolderForUID: (NSString *) uid;
98 - (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids
99                                  inContext: (id) _ctx;
100 - (NSArray *) lookupFreeBusyObjectsForUIDs: (NSArray *) _uids
101                                  inContext: (id) _ctx;
102
103 - (NSArray *) uidsFromICalPersons: (NSArray *) _persons;
104 - (NSArray *) lookupCalendarFoldersForICalPerson: (NSArray *) _persons
105                                        inContext: (id) _ctx;
106
107 - (id) lookupGroupFolderForUIDs: (NSArray *) _uids
108                       inContext: (id) _ctx;
109 - (id) lookupGroupCalendarFolderForUIDs: (NSArray *) _uids
110                               inContext: (id) _ctx;
111
112 /* bulk fetches */
113
114 - (NSArray *) fetchAllSOGoAppointments;
115
116 - (NSArray *) calendarFolders;
117
118 - (NSString *) roleForComponentsWithAccessClass: (iCalAccessClass) accessClass
119                                         forUser: (NSString *) uid;
120
121 @end
122
123 #endif /* __Appointments_SOGoAppointmentFolder_H__ */