OpenAFS
OpenAFS distributed network file system
|
00001 // 00002 // AFSCommanderPref.h 00003 // AFSCommander 00004 // 00005 // Created by Claudio Bisegni on 10/05/07. 00006 // Copyright (c) 2007 INFN - National Institute of Nuclear Physics. All rights reserved. 00007 // 00008 00009 #import <PreferencePanes/PreferencePanes.h> 00010 #import <SecurityInterface/SFAuthorizationView.h> 00011 #import "AFSPropertyManager.h" 00012 #import "global.h" 00013 #import "ViewUtility.h" 00014 #import "LynkCreationController.h" 00015 00016 // the way to load and unload the menuextra was inspired by MenuMeters developed by Alex Harper 00017 // Routines to handle adding and remove menu extras in HIServices (from ASM source) 00018 int CoreMenuExtraGetMenuExtra(CFStringRef identifier, void *menuExtra); 00019 int CoreMenuExtraAddMenuExtra(CFURLRef path, int position, int whoCares, int whoCares2, int whoCares3, int whoCares4); 00020 int CoreMenuExtraRemoveMenuExtra(void *menuExtra, int whoCares); 00021 00022 00023 00024 @interface AFSCommanderPref : NSPreferencePane <NSTableViewDataSource, NSTableViewDelegate> 00025 { 00026 //for check system version 00027 int prefStartUp; 00028 // Main View 00029 BOOL startAFSAtLogin; 00030 IBOutlet SFAuthorizationView *authView; 00031 IBOutlet NSView *afsCommanderView; 00032 IBOutlet NSSearchField *textSearchField; 00033 IBOutlet NSTextField *afsDefaultCellLabel; 00034 IBOutlet NSButton *tokensButton; 00035 IBOutlet NSButton *unlogButton; 00036 IBOutlet NSButton *aklogCredentialAtLoginTime; 00037 IBOutlet NSButton *installKRB5AuthAtLoginButton; 00038 IBOutlet NSButton *useAklogCheck; 00039 IBOutlet NSTextField *afsVersionLabel; 00040 IBOutlet NSButton *checkButtonAfsAtBootTime; 00041 IBOutlet NSTextField *textFieldDevInfoLabel; 00042 IBOutlet NSTextField *statCacheEntry; 00043 IBOutlet NSTextField *dCacheDim; 00044 IBOutlet NSTextField *cacheDimension; 00045 IBOutlet NSTextField *daemonNumber; 00046 IBOutlet NSTextField *afsRootMountPoint; 00047 IBOutlet NSTextField *nVolEntry; 00048 IBOutlet NSTextField *nsTextFieldKrb5RenewTimeD; 00049 IBOutlet NSTextField *nsTextFieldKrb5RenewTimeH; 00050 IBOutlet NSTextField *nsTextFieldKrb5RenewTimeM; 00051 IBOutlet NSTextField *nsTextFieldKrb5RenewTimeS; 00052 IBOutlet NSStepper *nsStepperKrb5RenewTimeD; 00053 IBOutlet NSStepper *nsStepperKrb5RenewTimeH; 00054 IBOutlet NSStepper *nsStepperKrb5RenewTimeM; 00055 IBOutlet NSStepper *nsStepperKrb5RenewTimeS; 00056 IBOutlet NSTextField *nsTextFieldKrb5SecToExpireDateForRenew; 00057 IBOutlet NSTextField *nsTextFieldKrb5RenewCheckIntervall; 00058 IBOutlet NSButton *nsButtonEnableDisableKrb5RenewCheck; 00059 IBOutlet NSButton *dynRoot; 00060 IBOutlet NSButton *afsDB; 00061 IBOutlet NSButton *verbose; 00062 IBOutlet NSButton *backgrounderActivationCheck; 00063 IBOutlet NSBox *groupsBox; 00064 00065 //id installationPathTextField; 00066 IBOutlet NSButton *startStopButton; 00067 IBOutlet NSTableView *cellList; 00068 //id cellNameTextEdit; 00069 IBOutlet NSControl *cellIpButton; 00070 IBOutlet NSControl *addCellButton; 00071 IBOutlet NSControl *removeCellButton; 00072 //id refreshConfigurationButton; 00073 IBOutlet NSControl *saveConfigurationButton; 00074 id labelSaveResult; 00075 IBOutlet NSTableView *tokensTable; 00076 IBOutlet NSControl *afsMenucheckBox; 00077 00078 //Configuration sheet 00079 id ipConfigurationSheet; 00080 id ipConfControllerCommander; 00081 00082 //Token sheet 00083 id credentialSheet; 00084 id credentialCommander; 00085 00086 00087 //Info Sheet 00088 id infoSheet; 00089 id infoController; 00090 00091 //lynk creation 00092 id lyncCreationSheet; 00093 IBOutlet LynkCreationController *lynkCreationController; 00094 00095 //manage link 00096 IBOutlet NSButton *checkEnableLink; 00097 IBOutlet NSButton *buttonAddLink; 00098 IBOutlet NSButton *buttonRemoveLink; 00099 IBOutlet NSTableView *tableViewLink; 00100 NSMutableDictionary *linkConfiguration; 00101 00102 AFSPropertyManager *afsProperty; //AFS Property managment class 00103 NSMutableArray *filteredCellDB; //Filtered CellServDB 00104 NSArray *tokenList; 00105 NSTimer *timerForCheckTokensList; 00106 NSLock *tokensLock; 00107 } 00108 00109 - (BOOL)isUnlocked; 00110 - (void) mainViewDidLoad; 00111 - (void) willUnselect; 00112 - (void) didSelect; 00113 - (id) initWithBundle:(NSBundle *)bundle; 00114 - (void)startTimer; 00115 - (void)stopTimer; 00116 //View Action 00117 - (IBAction) refreshConfiguration:(id) sender; 00118 - (void) fillCacheParamView; 00119 - (void) updateCacheParamFromView; 00120 - (IBAction) showCellIP:(id) sender; 00121 - (IBAction) addRemoveCell:(id) sender; 00122 - (IBAction) addLink:(id) sender; 00123 - (IBAction) removeLink:(id) sender; 00124 - (IBAction) enableLink:(id) sender; 00125 - (IBAction) saveConfiguration:(id) sender; 00126 - (IBAction) saveCacheManagerParam:(id) sender; 00127 - (IBAction) startStopAfs:(id) sender; 00128 - (IBAction) info:(id) sender; 00129 - (IBAction) tableDoubleAction:(id) sender; 00130 - (IBAction) getNewToken:(id) sender; 00131 - (IBAction) unlog:(id) sender; 00132 - (IBAction) afsMenuActivationEvent:(id) sender; 00133 - (IBAction) aklogSwitchEvent:(id) sender; 00134 - (IBAction) credentialAtLoginTimeEvent:(id) sender; 00135 - (IBAction) afsStartupSwitchEvent:(id) sender; 00136 - (IBAction) krb5KredentialAtLoginTimeEvent:(id) sender; 00137 - (IBAction) searchCellTextEvent:(id) sender; 00138 - (IBAction) manageBackgrounderActivation:(id)sender; 00139 - (IBAction) tableViewLinkPerformClick:(id) sender; 00140 - (IBAction) enableDisableKrb5RenewCheck:(id) sender; 00141 - (IBAction) krb5RenewParamChange:(id) sender; 00142 - (void) credentialAtLoginTimeEventCreationLaunchAgentDir:(NSWindow*)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo; 00143 - (void) clearCellServDBFiltering; 00144 - (void) filterCellServDB:(NSString*)textToFilter; 00145 - (DBCellElement*) getCurrentCellInDB; 00146 - (DBCellElement*) getCellByIDX:(int) idx; 00147 - (void) modifyCell:(DBCellElement*) cellElement; 00148 - (void) modifyCellByIDX:(int) idx; 00149 - (void) showMessage:(NSString*) message; 00150 - (void) setAfsStatus; 00151 - (void) refreshTokens:(NSTimer*)theTimer; 00152 - (void) writePreferenceFile; 00153 - (void) readPreferenceFile; 00154 - (void) refreshGui:(NSNotification *)notification; 00155 - (void) refreshTokensNotify:(NSNotification*)notification; 00156 - (void) afsVolumeMountChange:(NSNotification *)notification; 00157 - (void)tabView:(NSTabView *)tabView willSelectTabViewItem: (NSTabViewItem *)tabViewItem; 00158 @end 00159 00160 @interface AFSCommanderPref (TableDelegate) 00161 - (void) tableViewCellmanageButtonState:(int) rowSelected; 00162 - (void) tableViewLinkmanageButtonState:(NSIndexSet *) rowsSelectedIndex; 00163 @end; 00164 00165 @interface AFSCommanderPref (NSTableDataSource) 00166 - (id) getTableTokensListValue:(int) colId row:(int)row; 00167 - (id) getTableCelListValue:(int) colId row:(int)row; 00168 - (id) getTableLinkValue:(int) colId row:(int)row; 00169 @end;