
#import <Cocoa/Cocoa.h>


@interface SyncingPrefs : NSObject {
	
	IBOutlet NSView* syncingView;
	
	IBOutlet NSPopUpButton* syncingMethod;
	IBOutlet NSTabView* detailsTabView;
	
	IBOutlet NSImageView *confirmationImageView;
	IBOutlet NSProgressIndicator *confirmationProgressIndicator;
	
	// Assignment Planner Online
	IBOutlet NSTextField* onlineUsername;
	IBOutlet NSSecureTextField* onlinePassword;
	IBOutlet NSButton* downloadButton;
    NSTimer *checkTimer;
	
	// FTP
	IBOutlet NSTextField* ftpServer;
	IBOutlet NSTextField* ftpName;
	IBOutlet NSSecureTextField* ftpPassword;
	IBOutlet NSTextField* ftpPath;
}

- (id)init;
+ (SyncingPrefs *)sharedController;

- (void)awakeFromNib;
- (void)preferencesPanelWillClose;

#pragma mark View Size
- (int)getViewSize;
- (NSView *)currentView;

#pragma mark Syncing
- (void)getSyncing;
- (IBAction)setSyncing:(id)sender;
- (IBAction)downloadDataFromServer:(id)sender;

#pragma mark Defaults
- (void)setSyncingDefaults;

#pragma mark Change Window Height
- (IBAction)changeMethod:(id)sender;
- (int)getWindowHeight;
- (void)resizeWindow;

#pragma mark Show Website
- (IBAction)openWebsite:(id)sender;

#pragma mark Text Field Delegate
- (void)controlTextDidChange:(NSNotification *)aNotification;
- (void)checkForValidOnlineUser;

@end
