]> err.no Git - sope/blob - sope-core/NGExtensions/NGExtensions/NGCustomFileManager.h
fixed -isAfternoon method
[sope] / sope-core / NGExtensions / NGExtensions / NGCustomFileManager.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
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 // $Id$
22
23 #ifndef __NGCustomFileManager_H__
24 #define __NGCustomFileManager_H__
25
26 #include <NGExtensions/NGFileManager.h>
27
28 /*
29   An abstract baseclass for developing custom filemanagers which are ideally
30   based on other filemanager classes.
31 */
32
33 @class NGCustomFileManagerInfo;
34
35 @interface NGCustomFileManager : NGFileManager
36 {
37 }
38
39 /* customization */
40
41 - (NSString *)makeAbsolutePath:(NSString *)_path;
42 - (NGCustomFileManagerInfo *)fileManagerInfoForPath:(NSString *)_path;
43
44 @end
45
46 @interface NGCustomFileManager(NGFileManagerVersioning)
47
48 /* versioning */
49
50 - (BOOL)checkoutFileAtPath:(NSString *)_path handler:(id)_handler;
51 - (BOOL)releaseFileAtPath:(NSString *)_path  handler:(id)_handler;
52 - (BOOL)rejectFileAtPath:(NSString *)_path   handler:(id)_handler;
53 - (BOOL)checkoutFileAtPath:(NSString *)_path version:(NSString *)_version
54   handler:(id)_handler;
55
56 /* versioning data */
57
58 - (NSString *)lastVersionAtPath:(NSString *)_path;
59 - (NSArray *)versionsAtPath:(NSString *)_path;
60 - (NSData *)contentsAtPath:(NSString *)_path version:(NSString *)_version;
61 - (NSDictionary *)fileAttributesAtPath:(NSString *)_path
62   traverseLink:(BOOL)_followLink
63   version:(NSString *)_version;
64
65 @end
66
67 @interface NGCustomFileManager(NGFileManagerDataSources)
68
69 /* datasources (work on folders) */
70
71 - (EODataSource *)dataSourceAtPath:(NSString *)_path;
72 - (EODataSource *)dataSource; // works on current-directory-path
73
74 @end
75
76 @interface NGCustomFileManager(NGFileManagerLocking)
77
78 - (BOOL)lockFileAtPath:(NSString *)_path handler:(id)_handler;
79 - (BOOL)unlockFileAtPath:(NSString *)_path handler:(id)_handler;
80 - (BOOL)isFileLockedAtPath:(NSString *)_path;
81
82 /* access rights */
83 - (BOOL)isLockableFileAtPath:(NSString *)_path;
84 - (BOOL)isUnlockableFileAtPath:(NSString *)_path;
85
86 @end
87
88 @interface NGCustomFileManagerInfo : NSObject
89 {
90 @private
91   NGCustomFileManager        *master;      /* non retained */
92   id<NGFileManager,NSObject> fileManager;
93 }
94
95 - (id)initWithCustomFileManager:(NGCustomFileManager *)_master
96   fileManager:(id<NGFileManager,NSObject>)_fm;
97
98 - (void)resetMaster;
99
100 /* accessors */
101
102 - (NGCustomFileManager *)master;
103 - (id<NGFileManager,NSObject>)fileManager;
104
105 /* operations */
106
107 - (NSString *)rewriteAbsolutePath:(NSString *)_path;
108
109 /* capabilities */
110
111 - (BOOL)supportsGlobalIDs;
112
113 @end
114
115 #endif /* __NGCustomFileManager_H__ */