5 // Created by Claudio Bisegni on 29/07/09.
6 // Copyright 2009 Infn. All rights reserved.
9 #import <Cocoa/Cocoa.h>
10 #import "AFSMenuCredentialContoller.h"
12 @interface AFSBackgrounderDelegate : NSObject {
14 IBOutlet NSMenu *backgrounderMenu;
15 IBOutlet NSMenuItem *startStopMenuItem;
16 IBOutlet NSMenuItem *getReleaseTokenMenuItem;
17 NSStatusItem *statusItem;
20 BOOL afsState; //0-off 1-on
21 BOOL gotToken; //0-no 1-one o more token
25 NSNumber *useAklogPrefValue;
26 NSNumber *showStatusMenu;
27 //Icon for state visualization
28 NSImage *hasTokenImage;
29 NSImage *noTokenImage;
31 //credential windows mainWindow
32 AFSMenuCredentialContoller *credentialMenuController;
34 //NSTimer for tokens refresh
35 NSTimer *timerForCheckTokensList;
41 - (BOOL)useAklogPrefValue;
42 - (void)readPreferenceFile:(NSNotification *)notification;
43 - (void)getToken:(id)sender;
44 - (void)releaseToken:(id)sender;
45 - (void)updateAfsStatus:(NSTimer*)timer;
46 - (void)klogUserEven:(NSNotification *)notification;
47 - (void)chageMenuVisibility:(NSNotification *)notification;
48 - (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext;
49 - (NSImage*)imageToRender;
51 - (void)repairHelperTool;
52 - (void) afsVolumeMountChange:(NSNotification *)notification;
54 -(NSStatusItem*)statusItem;
55 -(void) setStatusItem:(BOOL)show;
56 -(NSImage*)imageToRender;
57 -(IBAction) startStopEvent:(id)sender;
58 -(IBAction) getReleaseTokenEvent:(id)sender;