openfirePrefPane.h 1.23 KB
Newer Older
1
//
David Smith's avatar
David Smith committed
2
//  openfirePrefPane.h
3
//  Preference panel for Openfire
4 5 6 7 8 9 10 11
//
//  Created by Daniel Henninger on 7/7/06.
//  Copyright (c) 2006 Jive Software. All rights reserved.
//
//  Concept taken from MySQL preference panel, as well as some borrowed code.
//

#import <PreferencePanes/PreferencePanes.h>
12 13
#import <Security/Security.h>
#import <SecurityInterface/SFAuthorizationView.h>
14 15
#include <unistd.h>

16
// 'ps' command to use to check for running openfire daemon
David Smith's avatar
David Smith committed
17
char *pscmd = "/bin/ps auxww | fgrep -v 'fgrep' | fgrep openfire/lib/startup.jar";
18 19

// The path to the plist file
David Smith's avatar
David Smith committed
20
NSString *plistPath = @"/Library/LaunchDaemons/org.jivesoftware.openfire.plist";
21 22


David Smith's avatar
David Smith committed
23
@interface openfirePrefPane : NSPreferencePane 
24 25 26 27 28 29 30
{
	IBOutlet NSButton *startButton;
	IBOutlet NSButton *autoStartCheckbox;
	IBOutlet NSButton *viewAdminButton;
	IBOutlet NSTextField *statusMessage;
	IBOutlet NSTextField *statusDescription;
	IBOutlet NSProgressIndicator *statusProgress;
31
	IBOutlet SFAuthorizationView *authView;
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
	
	NSTimer *statusTimer;
}

- (IBAction)toggleServer:(id)sender;
- (IBAction)toggleAutoStart:(id)sender;
- (IBAction)openAdminInterface:(id)sender;
- (void)mainViewDidLoad;
- (void)updateStatus;
- (void)startServer;
- (void)stopServer;
- (void)checkStatus;
- (BOOL)isRunning;

@end