2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2004-2005 SKYRIX Software AG
|
|
|
|
|
|
|
|
This file is part of OpenGroupware.org.
|
|
|
|
|
|
|
|
OGo is free software; you can redistribute it and/or modify it under
|
|
|
|
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.
|
|
|
|
|
|
|
|
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
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 __SOGo_SOGoFolder_H__
|
|
|
|
#define __SOGo_SOGoFolder_H__
|
|
|
|
|
2006-12-14 22:20:13 +01:00
|
|
|
#import "SOGoObject.h"
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-05-09 21:23:45 +02:00
|
|
|
@class NSArray;
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@class GCSFolder;
|
|
|
|
|
|
|
|
/*
|
|
|
|
SOGoFolder
|
|
|
|
|
|
|
|
A common superclass for folders stored in GCS. Already deals with all GCS
|
|
|
|
folder specific things.
|
|
|
|
|
|
|
|
Important: folders should NOT retain the context! Otherwise you might get
|
|
|
|
cyclic references.
|
|
|
|
*/
|
|
|
|
|
|
|
|
@interface SOGoFolder : SOGoObject
|
|
|
|
{
|
|
|
|
NSString *ocsPath;
|
|
|
|
GCSFolder *ocsFolder;
|
2007-04-27 21:45:12 +02:00
|
|
|
NSMutableDictionary *aclCache;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
+ (NSString *) globallyUniqueObjectId;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* accessors */
|
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (void) setOCSPath: (NSString *)_Path;
|
|
|
|
- (NSString *) ocsPath;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (GCSFolder *) ocsFolderForPath: (NSString *)_path;
|
|
|
|
- (GCSFolder *) ocsFolder;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* lower level fetches */
|
2007-02-21 22:11:40 +01:00
|
|
|
- (BOOL) nameExistsInFolder: (NSString *) objectName;
|
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (NSArray *) fetchContentObjectNames;
|
|
|
|
- (NSDictionary *) fetchContentStringsAndNamesOfAllObjects;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* folder type */
|
|
|
|
|
2007-03-28 20:37:10 +02:00
|
|
|
- (NSString *) outlookFolderClass;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-06-29 23:58:31 +02:00
|
|
|
- (BOOL) folderIsMandatory;
|
|
|
|
|
2007-02-09 22:22:01 +01:00
|
|
|
- (BOOL) create;
|
2007-03-21 15:27:04 +01:00
|
|
|
- (NSException *) delete;
|
2007-02-09 22:22:01 +01:00
|
|
|
|
2007-04-17 16:30:12 +02:00
|
|
|
/* acls as a container */
|
2007-05-19 02:49:05 +02:00
|
|
|
- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;
|
2007-04-17 16:30:12 +02:00
|
|
|
- (NSArray *) aclsForUser: (NSString *) uid
|
|
|
|
forObjectAtPath: (NSArray *) objectPathArray;
|
2007-04-25 00:50:09 +02:00
|
|
|
- (void) setRoles: (NSArray *) roles
|
2007-04-17 16:30:12 +02:00
|
|
|
forUser: (NSString *) uid
|
|
|
|
forObjectAtPath: (NSArray *) objectPathArray;
|
|
|
|
- (void) removeAclsForUsers: (NSArray *) users
|
|
|
|
forObjectAtPath: (NSArray *) objectPathArray;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
2006-12-14 22:20:13 +01:00
|
|
|
@interface SOGoFolder (GroupDAVExtensions)
|
|
|
|
|
|
|
|
- (NSString *) groupDavResourceType;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
#endif /* __SOGo_SOGoFolder_H__ */
|