Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / platform / DARWIN / AFSPreference / AFSBackgrounder / AFSMenuExtra.h
1 //
2 // AFSMenuExtra.h
3 // AFSCommander
4 //
5 // Created by Claudio on 10/07/07.
6 // Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved.
7 //
8
9
10 #import <Cocoa/Cocoa.h>
11 #import "SystemUIPlugin.h"
12 #import "global.h"
13 #import "AFSMenuCredentialContoller.h"
14 @class AFSMenuExtraView;
15 @interface AFSMenuExtra : NSMenuExtra {
16 @public
17 BOOL afsState; //0-off 1-on
18 BOOL gotToken; //0-no 1-one o more token
19
20 @protected
21 NSString *afsSysPath;
22 NSNumber *useAklogPrefValue;
23 //menu extra
24 NSMenu *theMenu;
25
26 //Menu extra view
27 AFSMenuExtraView *theView;
28 // menu reference
29 NSMenuItem *startStopMenu;
30 NSMenuItem *loginMenu;
31 NSMenuItem *unlogMenu;
32
33 //Icon for state visualization
34 NSImage *hasTokenImage;
35 NSImage *noTokenImage;
36
37 //credential windows mainWindow
38 AFSMenuCredentialContoller *credentialMenuController;
39
40 //NSTimer for tokens refresh
41 NSTimer *timerForCheckTokensList;
42 NSLock *tokensLock;
43 }
44 - (void)startTimer;
45 - (void)stopTimer;
46 - (BOOL)useAklogPrefValue;
47 - (void)readPreferenceFile:(NSNotification *)notification;
48 - (void)getToken:(id)sender;
49 - (void)releaseToken:(id)sender;
50 - (void)updateAfsStatus:(NSTimer*)timer;
51 - (void)klogUserEven:(NSNotification *)notification;
52 - (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext;
53 - (NSImage*)imageToRender;
54 - (void)updateMenu;
55 - (void) afsVolumeMountChange:(NSNotification *)notification;
56 @end