macos: update AFS prefs pane
[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         //krb5 renew
35         NSNumber *krb5CheckRenew;
36         NSNumber *krb5RenewTime;
37         NSNumber *krb5RenewCheckTimeInterval;
38         NSNumber *krb5SecToExpireTimeForRenew;
39
40         //credential windows mainWindow
41         AFSMenuCredentialContoller *credentialMenuController;
42
43         //NSTimer for tokens refresh
44         NSTimer *timerForCheckTokensList;
45         NSTimer *timerForCheckRenewTicket;
46         NSLock *tokensLock;
47         NSLock *renewTicketLock;
48         bool currentLinkActivationStatus;
49         NSMutableDictionary *linkConfiguration;
50         NSLock *linkCreationLock;
51 }
52 - (void)startTimer;
53 - (void)stopTimer;
54 - (void)startTimerRenewTicket;
55 - (void)stopTimerRenewTicket;
56 - (BOOL)useAklogPrefValue;
57 - (void)readPreferenceFile:(NSNotification *)notification;
58 - (void)getToken:(id)sender;
59 - (void)releaseToken:(id)sender;
60 - (void)updateAfsStatus:(NSTimer*)timer;
61 - (void)krb5RenewAction:(NSTimer*)timer;
62 - (void)klogUserEven:(NSNotification *)notification;
63 - (void)switchHandler:(NSNotification*) notification;
64 - (void)chageMenuVisibility:(NSNotification *)notification;
65 - (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext;
66 - (NSImage*)imageToRender;
67 - (void)menuNeedsUpdate:(NSMenu *)menu;
68 - (void) afsVolumeMountChange:(NSNotification *)notification;
69 - (void) updateLinkModeStatusWithpreferenceStatus:(BOOL)status;
70 -(NSStatusItem*)statusItem;
71 -(void) setStatusItem:(BOOL)show;
72 -(NSImage*)imageToRender;
73 -(IBAction) startStopEvent:(id)sender;
74 -(IBAction) getReleaseTokenEvent:(id)sender;
75 @end