]> err.no Git - scalable-opengroupware.org/blob - SoObjects/Appointments/SOGoAppointmentFolder.h
c359f65e01ec6af0a39bd488bb2c071006308a4e
[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/SOGoGCSFolder.h"
40
41 #import <NGCards/iCalEntityObject.h>
42
43 @class NSArray;
44 @class NSCalendarDate;
45 @class NSException;
46 @class NSMutableDictionary;
47 @class NSString;
48 @class NSTimeZone;
49 @class GCSFolder;
50
51 @interface SOGoAppointmentFolder : SOGoGCSFolder
52 {
53   NSTimeZone *timeZone;
54   NSMutableDictionary *uidToFilename;
55   NSMutableDictionary *aclMatrix;
56   NSMutableArray *stripFields;
57 }
58
59 - (BOOL) isActive;
60
61 /* selection */
62
63 - (NSArray *) calendarUIDs;
64
65 /* vevent UID handling */
66
67 - (NSString *) resourceNameForEventUID: (NSString *) _uid;
68 - (Class) objectClassForResourceNamed: (NSString *) c_name;
69
70 /* fetching */
71
72 - (NSArray *) fetchFields: (NSArray *) _fields
73                fromFolder: (GCSFolder *) _folder
74                      from: (NSCalendarDate *) _startDate
75                        to: (NSCalendarDate *) _endDate
76                     title: (NSString *) title
77                 component: (id) _component;
78
79 - (NSArray * ) fetchFields: (NSArray *) _fields
80                       from: (NSCalendarDate *) _startDate
81                         to: (NSCalendarDate *) _endDate
82                      title: (NSString *) title
83                  component: (id) _component;
84
85 - (NSArray *) fetchCoreInfosFrom: (NSCalendarDate *) _startDate
86                               to: (NSCalendarDate *) _endDate
87                            title: (NSString *) title
88                        component: (id) _component;
89
90 - (NSArray *) fetchFreeBusyInfosFrom: (NSCalendarDate *) _startDate
91                                   to: (NSCalendarDate *) _endDate;
92
93 /* URL generation */
94
95 - (NSString *) baseURLForAptWithUID: (NSString *) _uid
96                           inContext: (id) _ctx;
97
98 /* folder management */
99
100 - (id) lookupHomeFolderForUID: (NSString *) _uid
101                     inContext: (id) _ctx;
102
103 - (SOGoAppointmentFolder *) lookupCalendarFolderForUID: (NSString *) uid;
104 - (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids
105                                  inContext: (id) _ctx;
106 - (NSArray *) lookupFreeBusyObjectsForUIDs: (NSArray *) _uids
107                                  inContext: (id) _ctx;
108
109 - (NSArray *) uidsFromICalPersons: (NSArray *) _persons;
110 - (NSArray *) lookupCalendarFoldersForICalPerson: (NSArray *) _persons
111                                        inContext: (id) _ctx;
112
113 - (id) lookupGroupFolderForUIDs: (NSArray *) _uids
114                       inContext: (id) _ctx;
115 - (id) lookupGroupCalendarFolderForUIDs: (NSArray *) _uids
116                               inContext: (id) _ctx;
117
118 /* bulk fetches */
119
120 - (NSArray *) fetchAllSOGoAppointments;
121
122 - (NSString *) roleForComponentsWithAccessClass: (iCalAccessClass) accessClass
123                                         forUser: (NSString *) uid;
124
125 @end
126
127 #endif /* __Appointments_SOGoAppointmentFolder_H__ */