OpenAFS
OpenAFS distributed network file system
|
00001 // 00002 // AFSBackgrounder.h 00003 // OpenAFS 00004 // 00005 // Created by Claudio Bisegni on 29/07/09. 00006 // Copyright 2009 Infn. All rights reserved. 00007 // 00008 00009 #import <Cocoa/Cocoa.h> 00010 #import "AFSMenuCredentialContoller.h" 00011 00012 @interface AFSBackgrounderDelegate : NSObject { 00013 @public 00014 IBOutlet NSMenu *backgrounderMenu; 00015 IBOutlet NSMenuItem *startStopMenuItem; 00016 IBOutlet NSMenuItem *getReleaseTokenMenuItem; 00017 NSStatusItem *statusItem; 00018 00019 00020 BOOL afsState; //0-off 1-on 00021 BOOL gotToken; //0-no 1-one o more token 00022 NSSize menuSize; 00023 00024 @protected 00025 AFSPropertyManager *afsMngr; 00026 NSString *afsSysPath; 00027 NSNumber *useAklogPrefValue; 00028 NSNumber *showStatusMenu; 00029 NSNumber *aklogTokenAtLogin; 00030 //Icon for state visualization 00031 NSImage *hasTokenImage; 00032 NSImage *noTokenImage; 00033 00034 //krb5 renew 00035 NSNumber *krb5CheckRenew; 00036 NSNumber *krb5RenewTime; 00037 NSNumber *krb5RenewCheckTimeInterval; 00038 NSNumber *krb5SecToExpireTimeForRenew; 00039 00040 //credential windows mainWindow 00041 AFSMenuCredentialContoller *credentialMenuController; 00042 00043 //NSTimer for tokens refresh 00044 NSTimer *timerForCheckTokensList; 00045 NSTimer *timerForCheckRenewTicket; 00046 NSLock *tokensLock; 00047 NSLock *renewTicketLock; 00048 bool currentLinkActivationStatus; 00049 NSMutableDictionary *linkConfiguration; 00050 NSLock *linkCreationLock; 00051 } 00052 - (void)startTimer; 00053 - (void)stopTimer; 00054 - (void)startTimerRenewTicket; 00055 - (void)stopTimerRenewTicket; 00056 - (BOOL)useAklogPrefValue; 00057 - (void)readPreferenceFile:(NSNotification *)notification; 00058 - (void)getToken:(id)sender; 00059 - (void)releaseToken:(id)sender; 00060 - (void)updateAfsStatus:(NSTimer*)timer; 00061 - (void)krb5RenewAction:(NSTimer*)timer; 00062 - (void)klogUserEven:(NSNotification *)notification; 00063 - (void)switchHandler:(NSNotification*) notification; 00064 - (void)chageMenuVisibility:(NSNotification *)notification; 00065 - (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext; 00066 - (NSImage*)imageToRender; 00067 - (void)menuNeedsUpdate:(NSMenu *)menu; 00068 - (void) afsVolumeMountChange:(NSNotification *)notification; 00069 - (void) updateLinkModeStatusWithpreferenceStatus:(BOOL)status; 00070 -(NSStatusItem*)statusItem; 00071 -(void) setStatusItem:(BOOL)show; 00072 -(NSImage*)imageToRender; 00073 -(IBAction) startStopEvent:(id)sender; 00074 -(IBAction) getReleaseTokenEvent:(id)sender; 00075 @end