AFS Backgrounder implementation & warirng clean
[openafs.git] / src / platform / DARWIN / AFSPreference / global.h
1 /*
2  *  global.h
3  *  AFSCommander
4  *
5  *  Created by Claudio on 13/07/07.
6  *  Copyright 2007 INFN. All rights reserved.
7  *
8  */
9
10 #define kMenuBarHeight                          22
11 #define TOKENS_REFRESH_TIME_IN_SEC      60
12
13 // Localized string
14 #define kDevelopInfo                                    NSLocalizedStringFromTableInBundle(@"DevelopInfo",nil,[NSBundle bundleForClass:[self class]],@"DevelopInfo")
15 #define kConfigurationSaved                             NSLocalizedStringFromTableInBundle(@"ConfigurationSaved",nil,[NSBundle bundleForClass:[self class]],@"ConfigurationSaved")
16 #define kSavedCacheConfiguration                NSLocalizedStringFromTableInBundle(@"SavedCacheConfiguration",nil,[NSBundle bundleForClass:[self class]],@"SavedCacheConfiguration")
17 #define kAfsOn                                                  NSLocalizedStringFromTableInBundle(@"AfsOn",nil,[NSBundle bundleForClass:[self class]],@"AfsOn")
18 #define kAfsOff                                                 NSLocalizedStringFromTableInBundle(@"AfsOff",nil,[NSBundle bundleForClass:[self class]],@"AfsOff")
19 #define kAfsButtonShutdown                              NSLocalizedStringFromTableInBundle(@"AfsButtonShutdown",nil,[NSBundle bundleForClass:[self class]],@"AfsButtonShutdown")
20 #define kAfsButtonStartup                               NSLocalizedStringFromTableInBundle(@"AfsButtonStartup",nil,[NSBundle bundleForClass:[self class]],@"AfsButtonStartup")
21 #define kNewCellName                                    NSLocalizedStringFromTableInBundle(@"NewCellName",nil,[NSBundle bundleForClass:[self class]],@"NewCellName")
22 #define kNewCellComment                                 NSLocalizedStringFromTableInBundle(@"NewCellComment",nil,[NSBundle bundleForClass:[self class]],@"NewCellComment")
23 #define kMenuLogin                                              NSLocalizedStringFromTableInBundle(@"MenuLogin",nil,[NSBundle bundleForClass:[self class]],@"MenuLogin")
24 #define kMenuUnlog                                              NSLocalizedStringFromTableInBundle(@"MenuUnlog",nil,[NSBundle bundleForClass:[self class]],@"MenuUnlog")
25 #define kBadAfsRootMountPoint                   NSLocalizedStringFromTableInBundle(@"BadAfsRootMountPoint",nil,[NSBundle bundleForClass:[self class]],@"BadAfsRootMountPoint")
26 #define kDoYouWantCreateTheDirectory    NSLocalizedStringFromTableInBundle(@"DoYouWantCreateTheDirectory",nil,[NSBundle bundleForClass:[self class]],@"DoYouWantCreateTheDirectory")
27 #define kDirectoryCreated                               NSLocalizedStringFromTableInBundle(@"DirectoryCreated",nil,[NSBundle bundleForClass:[self class]],@"DirectoryCreated")
28 #define kErrorCreatingDirectory                 NSLocalizedStringFromTableInBundle(@"ErrorCreatingDirectory",nil,[NSBundle bundleForClass:[self class]],@"ErrorCreatingDirectory")
29 #define kErrorGettongSystemVersion              NSLocalizedString(@"ErrorGettongSystemVersion",@"ErrorGettongSystemVersion");
30
31
32 // PREFERENCE KEY
33 #define PREFERENCE_AFS_SYS_PAT                          @"PREFERENCE_AFS_SYS_PAT"
34 #define PREFERENCE_AFS_SYS_PAT_STATIC           @"/var/db/openafs"
35 #define PREFERENCE_USE_AKLOG                            @"PREFERENCE_USE_AKLOG"
36 #define PREFERENCE_START_AFS_AT_STARTUP         @"PREFERENCE_START_AFS_AT_STARTUP"
37 #define PREFERENCE_SHOW_STATUS_MENU                     @"PREFERENCE_SHOW_STATUS_MENU"
38 #define PREFERENCE_AKLOG_TOKEN_AT_LOGIN         @"PREFERENCE_AKLOG_TOKEN_AT_LOGIN"
39
40 // AFSMENUEXTRA INFO
41 #define kAFSMenuExtra                   [NSURL fileURLWithPath:[[self bundle] pathForResource:@"AFSBackgrounder" ofType:@"app" inDirectory:@""]]
42 #define kMenuCrakerMenuExtra    [NSURL fileURLWithPath:[[self bundle] pathForResource:@"MenuCracker" ofType:@"menu" inDirectory:@""]]
43
44 //notification id
45
46 #define kMenuCrakerMenuExtraID  @"net.sourceforge.menucracker2"
47
48
49 //Application id
50 #define kAFSMenuExtraID                 @"it.infn.lnf.network.AFSBackgrounder"
51 #define kAfsCommanderID                 @"it.infn.lnf.network.openafs"
52 // Changed preference notification key
53 #define kPrefChangeNotification @"preference_changed"
54 //KLog menuextra window close
55 #define kLogWindowClosed @"klog_window_closed"
56 //Fired when some work as appened in AFSMenuExtra
57 #define kMenuExtraEventOccured @"menu_extra_event_occured"
58 // Changed preference notification key
59 #define kMExtraClosedNotification @"preference_changed"
60 // Update MenuExtra AfsState notification key
61 #define kMExtraAFSStateChange @"menu_extra_afs_state_change"
62 // Update MenuExtra for show menu notification key
63 #define kMExtraAFSMenuChangeState @"kMExtraAFSMenuChangeState"