Develop Kerberos renew system for ticket
[openafs.git] / src / platform / DARWIN / AFSPreference / PListManager.h
1 //
2 //  PListManager.h
3 //  OpenAFS
4 //
5 //  Created by Claudio Bisegni LNF - INFN on 25/04/08.
6 //  Copyright 2008 Infn. All rights reserved.
7 //
8
9 #import <Cocoa/Cocoa.h>
10
11 #define DELETE_IN_10_4  @"authinternal"
12 #define DELETE_IN_10_5  @"builtin:authenticate,privileged"
13 #define ADD_IN_PLIST    @"builtin:krb5authnoverify,privileged"
14
15 #define AUTH_FILE_DIR   @"/etc"
16 #define AUTH_FILE               @"/etc/authorization"
17 #define AUTH_FILE_BK    @"/etc/authorization_bk"
18 #define TMP_FILE                @"/tmp/authorization"
19
20 #define BACKGROUNDER_P_FILE                                             @"it.infn.lnf.network.AFSBackgrounder"
21 #define HOME_LAUNCHD_AGENT_FOLDER                               @"~/Library/LaunchAgents"
22 #define BACKGROUNDER_LAUNCHD_CONTROL_FILE               @"~/Library/LaunchAgents/it.infn.lnf.network.AFSBackgrounder.plist"
23 #define BACKGROUNDER_LAUNCHD_TMP_CONTROL_FILE   @"/tmp/it.infn.lnf.network.AFSBackgrounder.plist"
24
25 #define LAUNCHD_DAEMON_FOLDER                   @"/Library/LaunchDaemons"
26 #define AFS_STARTUP_TMP_CONTROL_FILE    @"/tmp/it.infn.lnf.network.afsstartup.plist"
27 #define AFS_STARTUP_CONTROL_FILE                @"/Library/LaunchDaemons/it.infn.lnf.network.afsstartup.plist"
28
29 /*!
30     @class               PListManager
31     @abstract    Utility class for modify the plist used by sistem for make login
32     @discussion  <#(comprehensive description)#>
33 */
34
35 @interface PListManager : NSObject {
36
37 }
38 /*!
39  @method     krb5TiketAtLoginTime
40  @abstract   Enable or disable the system to get kerberos ticket at login time
41  @discussion <#(comprehensive description)#>
42  */
43 +(void) krb5TiketAtLoginTime:(BOOL)enable;
44
45 /*!
46  @method     checkKrb5AtLoginTimeLaunchdEnable
47  @abstract   check if the system is configured to ket krb5 ticket at login
48  @discussion <#(comprehensive description)#>
49  */
50 +(BOOL) checkKrb5AtLoginTimeLaunchdEnable;
51
52 /*!
53  @method     installLaunchdFile
54  @abstract   Install the afs agent launchd config file
55  @discussion <#(comprehensive description)#>
56  */
57 +(void) installBackgrounderLaunchdFile:(BOOL)install resourcePath:(NSString*) rsrcPath;
58 /*!
59  @method     checkAklogAtLoginTimeLaunchdEnable
60  @abstract   check if the user has installed  or enabled the afs agent
61  @discussion <#(comprehensive description)#>
62  */
63 +(BOOL) checkLoginTimeLaunchdBackgrounder;
64
65 /*!
66  @method     installAfsStartupLaunchdFile
67  @abstract   Install the afs daemon launchd config file for startup afs at boot
68  @discussion <#(comprehensive description)#>
69  */
70 +(void) manageAfsStartupLaunchdFile:(BOOL)enable afsStartupScript:(NSString*)afsStartupScript afsBasePath:(NSString*)afsBasePath  afsdPath:(NSString*)afsdPath;
71
72 /*!
73  @method     launchctlCommand
74  @abstract   exec the launchctl command on a particular plist job
75  @discussion <#(comprehensive description)#>
76 */ 
77 +(void) launchctlCommand:(BOOL)enable userDomain:(BOOL)userDomain option:(NSArray*)option plistName:(NSString*)plistName;
78 /*!
79  @method     launchctlCommand
80  @abstract   exec the launchctl command on a particular plist job
81  @discussion <#(comprehensive description)#>
82  */
83 +(void) launchctlStringCommand:(NSString*)operation
84                                                 option:(NSArray*)option
85                                          plistName:(NSString*)plistName;
86 /*!
87  @method     launchdJobState
88  @abstract   check is a job has been submitted to launchd
89  @discussion <#(comprehensive description)#>
90  */ 
91 +(BOOL) launchdJobState:(NSString*)jobName;
92 @end