2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2004-2005 SKYRIX Software AG
|
2014-09-12 14:34:15 +02:00
|
|
|
Copyright (C) 2007-2014 Inverse inc.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2012-07-10 02:29:13 +02:00
|
|
|
This file is part of SOGo.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2012-07-10 02:29:13 +02:00
|
|
|
SOGo is free software; you can redistribute it and/or modify it under
|
2006-06-15 21:34:10 +02:00
|
|
|
the terms of the GNU Lesser General Public License as published by the
|
|
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
later version.
|
|
|
|
|
2012-07-10 02:29:13 +02:00
|
|
|
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
2006-06-15 21:34:10 +02:00
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with OGo; see the file COPYING. If not, write to the
|
|
|
|
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __Appointments_SOGoAppointmentFolder_H__
|
|
|
|
#define __Appointments_SOGoAppointmentFolder_H__
|
|
|
|
|
|
|
|
/*
|
|
|
|
SOGoAppointmentFolder
|
|
|
|
Parent object: the SOGoUserFolder
|
|
|
|
Child objects: SOGoAppointmentObject
|
|
|
|
|
|
|
|
The SOGoAppointmentFolder maps to an GCS folder of type 'appointment', that
|
|
|
|
is, a content folder containing iCalendar files (and a proper quicktable).
|
|
|
|
|
|
|
|
Important:
|
|
|
|
The folder assumes a 1:1 mapping between the vevent UID field and the
|
|
|
|
resource name in the content store. In other words, you are not allowed to
|
|
|
|
create two different vevent-files with the same uid in the store.
|
|
|
|
*/
|
|
|
|
|
2007-11-07 16:59:01 +01:00
|
|
|
#import "SOGo/SOGoGCSFolder.h"
|
2006-12-19 18:02:15 +01:00
|
|
|
|
2007-11-26 18:40:44 +01:00
|
|
|
#import <NGCards/iCalEntityObject.h>
|
|
|
|
|
2007-04-11 21:08:58 +02:00
|
|
|
@class NSArray;
|
|
|
|
@class NSCalendarDate;
|
|
|
|
@class NSException;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
|
|
|
@class NSTimeZone;
|
2006-06-15 21:34:10 +02:00
|
|
|
@class GCSFolder;
|
2009-09-10 19:26:57 +02:00
|
|
|
@class iCalCalendar;
|
2012-04-19 16:24:37 +02:00
|
|
|
@class iCalTimeZone;
|
2014-09-12 14:34:15 +02:00
|
|
|
@class NGCalendarDateRange;
|
2012-04-13 01:40:05 +02:00
|
|
|
@class SOGoWebDAVValue;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-01-19 13:28:10 +01:00
|
|
|
typedef enum {
|
|
|
|
SOGoAppointmentProxyPermissionNone = 0,
|
|
|
|
SOGoAppointmentProxyPermissionRead = 1,
|
|
|
|
SOGoAppointmentProxyPermissionWrite = 2,
|
|
|
|
} SOGoAppointmentProxyPermission;
|
|
|
|
|
2007-11-07 16:59:01 +01:00
|
|
|
@interface SOGoAppointmentFolder : SOGoGCSFolder
|
2006-06-15 21:34:10 +02:00
|
|
|
{
|
2007-04-11 21:08:58 +02:00
|
|
|
NSTimeZone *timeZone;
|
2006-06-15 21:34:10 +02:00
|
|
|
NSMutableDictionary *uidToFilename;
|
2007-11-26 18:40:44 +01:00
|
|
|
NSMutableDictionary *aclMatrix;
|
|
|
|
NSMutableArray *stripFields;
|
2009-11-29 05:19:32 +01:00
|
|
|
int davCalendarStartTimeLimit;
|
|
|
|
int davTimeLimitSeconds;
|
|
|
|
int davTimeHalfLimitSeconds;
|
2009-06-04 02:40:21 +02:00
|
|
|
BOOL userCanAccessObjectsClassifiedAs[iCalAccessClassCount];
|
2012-04-13 01:40:05 +02:00
|
|
|
SOGoWebDAVValue *componentSet;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2007-09-15 00:01:02 +02:00
|
|
|
- (BOOL) isActive;
|
|
|
|
|
2008-04-22 01:03:48 +02:00
|
|
|
- (NSString *) calendarColor;
|
|
|
|
- (void) setCalendarColor: (NSString *) newColor;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* selection */
|
|
|
|
|
2006-10-11 20:48:25 +02:00
|
|
|
- (NSArray *) calendarUIDs;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2014-06-11 16:24:04 +02:00
|
|
|
- (NSNumber *) activeTasks;
|
2014-06-10 22:18:12 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* vevent UID handling */
|
|
|
|
|
2006-10-11 20:48:25 +02:00
|
|
|
- (NSString *) resourceNameForEventUID: (NSString *) _uid;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* fetching */
|
2010-01-22 17:33:35 +01:00
|
|
|
- (NSArray *) bareFetchFields: (NSArray *) fields
|
|
|
|
from: (NSCalendarDate *) startDate
|
|
|
|
to: (NSCalendarDate *) endDate
|
|
|
|
title: (NSString *) title
|
|
|
|
component: (NSString *) component
|
|
|
|
additionalFilters: (NSString *) filters;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2008-12-23 19:43:37 +01:00
|
|
|
- (NSArray *) fetchFields: (NSArray *) _fields
|
|
|
|
from: (NSCalendarDate *) _startDate
|
|
|
|
to: (NSCalendarDate *) _endDate
|
|
|
|
title: (NSString *) title
|
|
|
|
component: (id) _component
|
|
|
|
additionalFilters: (NSString *) filters
|
|
|
|
includeProtectedInformation: (BOOL) _includeProtectedInformation;
|
|
|
|
|
2006-10-11 20:48:25 +02:00
|
|
|
- (NSArray *) fetchCoreInfosFrom: (NSCalendarDate *) _startDate
|
|
|
|
to: (NSCalendarDate *) _endDate
|
2007-11-21 18:23:51 +01:00
|
|
|
title: (NSString *) title
|
2006-10-11 20:48:25 +02:00
|
|
|
component: (id) _component;
|
2008-05-16 17:52:19 +02:00
|
|
|
- (NSArray *) fetchCoreInfosFrom: (NSCalendarDate *) _startDate
|
|
|
|
to: (NSCalendarDate *) _endDate
|
|
|
|
title: (NSString *) title
|
|
|
|
component: (id) _component
|
|
|
|
additionalFilters: (NSString *) filters;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-12-14 22:20:13 +01:00
|
|
|
- (NSArray *) fetchFreeBusyInfosFrom: (NSCalendarDate *) _startDate
|
2006-10-11 20:48:25 +02:00
|
|
|
to: (NSCalendarDate *) _endDate;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2009-04-22 23:02:11 +02:00
|
|
|
- (NSArray *) fetchAlarmInfosFrom: (NSNumber *) _startUTCDate
|
|
|
|
to: (NSNumber *) _endUTCDate;
|
|
|
|
|
2014-09-12 14:34:15 +02:00
|
|
|
- (void) flattenCycleRecord: (NSDictionary *) theRecord
|
|
|
|
forRange: (NGCalendarDateRange *) theRange
|
|
|
|
intoArray: (NSMutableArray *) theRecords
|
|
|
|
withCalendar: (iCalCalendar *) calendar;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* URL generation */
|
|
|
|
|
2006-10-11 20:48:25 +02:00
|
|
|
- (NSString *) baseURLForAptWithUID: (NSString *) _uid
|
|
|
|
inContext: (id) _ctx;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* folder management */
|
|
|
|
|
2006-10-11 20:48:25 +02:00
|
|
|
- (id) lookupHomeFolderForUID: (NSString *) _uid
|
|
|
|
inContext: (id) _ctx;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2009-03-23 22:19:55 +01:00
|
|
|
- (NSArray *) lookupCalendarFoldersForUID: (NSString *) theUID;
|
2006-10-11 20:48:25 +02:00
|
|
|
- (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids
|
|
|
|
inContext: (id) _ctx;
|
|
|
|
- (NSArray *) lookupFreeBusyObjectsForUIDs: (NSArray *) _uids
|
|
|
|
inContext: (id) _ctx;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-10-11 20:48:25 +02:00
|
|
|
- (NSArray *) uidsFromICalPersons: (NSArray *) _persons;
|
|
|
|
- (NSArray *) lookupCalendarFoldersForICalPerson: (NSArray *) _persons
|
|
|
|
inContext: (id) _ctx;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* bulk fetches */
|
|
|
|
|
2011-12-01 22:23:09 +01:00
|
|
|
- (NSString *) aclSQLListingFilter;
|
|
|
|
|
2007-04-26 03:16:19 +02:00
|
|
|
- (NSString *) roleForComponentsWithAccessClass: (iCalAccessClass) accessClass
|
|
|
|
forUser: (NSString *) uid;
|
|
|
|
|
2009-07-21 20:06:55 +02:00
|
|
|
- (BOOL) showCalendarAlarms;
|
|
|
|
- (void) setShowCalendarAlarms: (BOOL) new;
|
|
|
|
|
|
|
|
- (BOOL) showCalendarTasks;
|
|
|
|
- (void) setShowCalendarTasks: (BOOL) new;
|
|
|
|
|
2010-01-15 00:19:19 +01:00
|
|
|
- (NSString *) syncTag;
|
|
|
|
- (void) setSyncTag: (NSString *) newSyncTag;
|
|
|
|
|
|
|
|
- (BOOL) synchronizeCalendar;
|
|
|
|
- (void) setSynchronizeCalendar: (BOOL) new;
|
2009-08-27 23:14:54 +02:00
|
|
|
|
2010-05-06 21:30:14 +02:00
|
|
|
- (BOOL) includeInFreeBusy;
|
|
|
|
- (void) setIncludeInFreeBusy: (BOOL) newInclude;
|
|
|
|
|
2012-07-10 02:29:13 +02:00
|
|
|
- (BOOL) notifyOnPersonalModifications;
|
|
|
|
- (void) setNotifyOnPersonalModifications: (BOOL) b;
|
|
|
|
- (BOOL) notifyOnExternalModifications;
|
|
|
|
- (void) setNotifyOnExternalModifications: (BOOL) b;
|
|
|
|
- (BOOL) notifyUserOnPersonalModifications;
|
|
|
|
- (void) setNotifyUserOnPersonalModifications: (BOOL) b;
|
|
|
|
- (NSString *) notifiedUserOnPersonalModifications;
|
|
|
|
- (void) setNotifiedUserOnPersonalModifications: (NSString *) theUser;
|
|
|
|
|
2012-04-19 16:24:37 +02:00
|
|
|
- (NSString *) importComponent: (iCalEntityObject *) event
|
|
|
|
timezone: (iCalTimeZone *) timezone;
|
2011-03-04 15:14:12 +01:00
|
|
|
|
2009-09-10 19:26:57 +02:00
|
|
|
- (int) importCalendar: (iCalCalendar *) calendar;
|
2009-09-02 21:14:15 +02:00
|
|
|
|
2010-01-15 00:19:19 +01:00
|
|
|
/* caldav proxy */
|
|
|
|
|
2010-01-19 13:28:10 +01:00
|
|
|
- (SOGoAppointmentProxyPermission)
|
|
|
|
proxyPermissionForUserWithLogin: (NSString *) login;
|
|
|
|
|
|
|
|
- (NSArray *) aclUsersWithProxyWriteAccess: (BOOL) write;
|
2010-01-15 00:19:19 +01:00
|
|
|
|
2014-09-12 14:34:15 +02:00
|
|
|
- (void) findEntityForClosestAlarm: (id *) theEntity
|
|
|
|
timezone: (NSTimeZone *) theTimeZone
|
|
|
|
startDate: (NSCalendarDate **) theStartDate
|
|
|
|
endDate: (NSCalendarDate **) theEndDate;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* __Appointments_SOGoAppointmentFolder_H__ */
|