OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/platform/DARWIN/AFSPreference/AFSPropertyManager.h
00001 //
00002 //  AFSPropertyManager.h
00003 //  AFSCommander
00004 //
00005 //  Created by Claudio Bisegni on 21/05/07.
00006 //  Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved.
00007 //
00008 
00009 #import <Cocoa/Cocoa.h>
00010 #import "DBCellElement.h"
00011 #import "FileUtil.h"
00012 
00013 
00014 #define AFS_DAEMON_STARTUPSCRIPT        "/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.rc"
00015 #define AFS_DAEMON_PATH                         "/Library/LaunchDaemons/org.openafs.filesystems.afs.plist"
00016 #define AFS_FS_MOUNT                "AFS"
00017 #define AFS_LAUNCHCTL_GREP_STR          "org.openafs.filesystems.afs"
00018 
00024 @interface AFSPropertyManager : NSObject {
00025         NSString *installationPath;
00026         NSString *cellName;
00027         NSMutableArray *cellList;
00028         NSArray *userDefaultCellArray;
00029         NSString *afsRootMountPoint;
00030         int statCacheEntry;
00031         int dCacheDim;
00032         int cacheDimension;
00033         int daemonNumber;
00034         int nVolEntry;
00035         bool dynRoot;
00036         bool afsDB;
00037         bool verbose;
00038         
00039         //-------------------
00040         FileUtil *futil;
00041         BOOL useAfsdConfVersion;
00042 }
00043 
00049 -(id) init;
00050 
00058 - (id)initWithAfsPath:(NSString*)path;
00059 
00065 -(void) dealloc;
00071 -(NSMutableArray*) getCellList;
00072 
00073 
00079 -(NSArray*) getAllCellsName;
00085 -(NSArray*) getUserDefaultForTokenCells;
00091 -(NSArray*) getDefaultForTokenCellsName;
00097 -(NSString*) getDefaultCellName;
00098 
00104 -(void) setDefaultCellByName:(NSString*)name;
00105 - (void) setCellName:(NSString*)cell;
00111 
00117 -(void) setPath:(NSString*)path;
00118 
00124 -(NSString*) path;
00125 
00132 -(int) statCacheEntry;
00133 
00134 
00141 -(void) setStatCacheEntry:(int)statEntry;
00142 
00148 -(int) dCacheDim;
00149 
00156 -(void) setDCacheDim:(int)dcacheDim;
00157 
00163 -(int) cacheDimension;
00164 
00171 -(void) setCacheDimension:(int)cacheDim;
00172 
00178 -(int) daemonNumber;
00179 
00185 -(void) setDaemonNumber:(int)dNumber;
00186 
00192 -(NSString*) afsRootMountPoint;
00193 
00199 -(void) setAfsRootMountPoint:(NSString*)mountPoint;
00200 
00206 -(int) nVolEntry;
00207 
00213 -(void) setNVolEntry:(int)entry;
00214 
00220 -(bool) dynRoot;
00221 
00227 -(void) setDynRoot:(bool)flag;
00233 -(bool) afsDB;
00234 
00240 -(void) setAfsDB:(bool)flag;
00244 -(bool) verbose;
00245 
00249 -(void) setVerbose:(bool)flag;
00256 -(int) readCacheInfo:(NSString*)filePath;
00257 
00264 -(int) writeCacheInfo:(NSString*)filePath;
00265 
00272 -(void) readAfsdOption:(NSString*)filePath;
00273 
00281 -(int) readOldAfsdOption:(NSString*)filePath;
00287 -(int) readAFSDParamLineContent:(NSString*)paramLine;
00294 -(int) readNewAfsdOption:(NSString*)filePath;
00302 -(int) writeAfsdOption:(NSString*)filePath;
00310 -(int) writeOldAfsdOption:(NSString*)filePath;
00316 -(int) writeNewAfsdOption:(NSString*)filePath;
00322 -(NSString*) getAfsVersion;
00328 -(int) getAfsMajorVersionVersion;
00334 -(int) getAfsMinorVersionVersion;
00335 
00341 -(int) getAfsPatchVersionVersion;
00342 
00348 -(void) clearConfiguration;
00349 
00355 -(void) exceptionOnInvalidPath;
00356 
00361 -(void) loadConfiguration;
00362 
00367 -(void) readCellInfo:(NSString*) configFile;
00373 -(void) readCellDB:(NSString*) configFile;
00381 -(NSArray*) readTheseCell:(NSString*) configFile;
00386 -(void) shutdown;
00387 -(void) startup;
00388 -(void) scanIpForCell:(DBCellElement*) cellElement allIP:(NSString*)allIP;
00389 -(void) backupConfigurationFiles;
00390 -(void) backupFile:(NSString*)localAfsFilePath;
00391 -(void) saveConfigurationFiles:(BOOL) makeBackup;
00392 -(void) saveCacheConfigurationFiles:(BOOL) makeBackup;
00393 -(void) installConfigurationFile:(NSString*)srcConfFile destPath:(NSString*) destPath;
00394 -(NSArray*) getTokenList;
00395 -(BOOL) checkAfsStatus;
00396 -(BOOL) checkAfsStatusForStartup;
00397 -(void) klog:(NSString*)uName uPwd:(NSString*)uPwd  cell:(NSString*)theCell;
00398 -(void) aklog:(NSString*)theCell noKerberosCall:(BOOL)krb5CallEnable;
00399 -(void) getTokens:(BOOL)klogAklogFlag usr:(NSString*)usr pwd:(NSString*)pwd;
00400 -(void) unlog:(NSString*)cell;
00401 -(NSString*) makeChaceParamString;
00402 -(BOOL) useAfsdConfConfigFile;
00403 @end
 All Data Structures Files Functions Variables