]> err.no Git - scalable-opengroupware.org/blob - SoObjects/SOGo/SOGoFolder.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1117 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / SoObjects / SOGo / SOGoFolder.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 __SOGo_SOGoFolder_H__
23 #define __SOGo_SOGoFolder_H__
24
25 #import "SOGoObject.h"
26
27 @class NSArray;
28 @class NSDictionary;
29 @class NSMutableDictionary;
30 @class NSString;
31
32 @class GCSFolder;
33
34 /*
35   SOGoFolder
36   
37   A common superclass for folders stored in GCS. Already deals with all GCS
38   folder specific things.
39   
40   Important: folders should NOT retain the context! Otherwise you might get
41              cyclic references.
42 */
43
44 @interface SOGoFolder : SOGoObject
45 {
46   NSString  *ocsPath;
47   GCSFolder *ocsFolder;
48   NSMutableDictionary *aclCache;
49 }
50
51 + (NSString *) globallyUniqueObjectId;
52
53 /* accessors */
54
55 - (void) setOCSPath: (NSString *)_Path;
56 - (NSString *) ocsPath;
57
58 - (GCSFolder *) ocsFolderForPath: (NSString *)_path;
59 - (GCSFolder *) ocsFolder;
60
61 /* lower level fetches */
62 - (BOOL) nameExistsInFolder: (NSString *) objectName;
63
64 - (NSArray *) fetchContentObjectNames;
65 - (NSDictionary *) fetchContentStringsAndNamesOfAllObjects;
66
67 /* folder type */
68
69 - (NSString *) outlookFolderClass;
70
71 - (BOOL) folderIsMandatory;
72
73 - (BOOL) create;
74 - (NSException *) delete;
75
76 /* dav */
77 - (NSArray *) davNamespaces;
78
79 /* acls as a container */
80 - (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;
81 - (NSArray *) aclsForUser: (NSString *) uid
82           forObjectAtPath: (NSArray *) objectPathArray;
83 - (void) setRoles: (NSArray *) roles
84           forUser: (NSString *) uid
85   forObjectAtPath: (NSArray *) objectPathArray;
86 - (void) removeAclsForUsers: (NSArray *) users
87             forObjectAtPath: (NSArray *) objectPathArray;
88
89 @end
90
91 @interface SOGoFolder (GroupDAVExtensions)
92
93 - (NSString *) groupDavResourceType;
94
95 @end
96
97 #endif /* __SOGo_SOGoFolder_H__ */