ef5707e209b94c0b023eb2bd695a18d70ff25787
[openafs.git] / src / platform / DARWIN / AFSPreference / AFSBackgrounder / AFSBackgrounderDelegate.h
1 //
2 //  AFSBackgrounder.h
3 //  OpenAFS
4 //
5 //  Created by Claudio Bisegni on 29/07/09.
6 //  Copyright 2009 Infn. All rights reserved.
7 //
8
9 #import <Cocoa/Cocoa.h>
10 #import "AFSMenuCredentialContoller.h"
11
12 @interface AFSBackgrounderDelegate : NSObject {
13 @public
14         IBOutlet NSMenu *backgrounderMenu;
15         IBOutlet NSMenuItem *startStopMenuItem;
16         IBOutlet NSMenuItem *getReleaseTokenMenuItem;
17         NSStatusItem    *statusItem;
18         
19
20         BOOL afsState; //0-off 1-on
21         BOOL gotToken; //0-no 1-one o more token
22         NSSize menuSize;
23         
24 @protected
25         AFSPropertyManager *afsMngr;
26         NSString *afsSysPath;
27         NSNumber *useAklogPrefValue;
28         NSNumber *showStatusMenu;
29         NSNumber *aklogTokenAtLogin;
30         //Icon for state visualization
31         NSImage *hasTokenImage;
32         NSImage *noTokenImage;
33         
34         //credential windows mainWindow
35         AFSMenuCredentialContoller *credentialMenuController;
36
37         //NSTimer for tokens refresh
38         NSTimer *timerForCheckTokensList;
39         NSLock *tokensLock;
40         
41 }
42 - (void)startTimer;
43 - (void)stopTimer;
44 - (BOOL)useAklogPrefValue;
45 - (void)readPreferenceFile:(NSNotification *)notification;
46 - (void)getToken:(id)sender;
47 - (void)releaseToken:(id)sender;
48 - (void)updateAfsStatus:(NSTimer*)timer;
49 - (void)klogUserEven:(NSNotification *)notification;
50 - (void)switchHandler:(NSNotification*) notification;
51 - (void)chageMenuVisibility:(NSNotification *)notification;
52 - (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext;
53 - (NSImage*)imageToRender;
54 - (void)menuNeedsUpdate:(NSMenu *)menu;
55 - (void)repairHelperTool;
56 - (void) afsVolumeMountChange:(NSNotification *)notification;
57
58 -(NSStatusItem*)statusItem;
59 -(void) setStatusItem:(BOOL)show;
60 -(NSImage*)imageToRender;
61 -(IBAction) startStopEvent:(id)sender;
62 -(IBAction) getReleaseTokenEvent:(id)sender;
63 @end