-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathController.h
109 lines (90 loc) · 3.28 KB
/
Controller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
This file is part of the TVShows source code.
http://github.com/mattprice/TVShows
TVShows is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
*/
#import <Cocoa/Cocoa.h>
#import "Helper.h"
@interface Controller : NSObject {
// Experimental
NSArray *tableItems;
IBOutlet NSView *mainView;
IBOutlet NSView *preferencesView;
IBOutlet NSTableColumn *mainColumn;
NSArray *qualities;
NSDictionary *shows;
Helper *h;
NSArray *details;
// Main window
IBOutlet NSWindow *mainWindow;
NSToolbar *mainToolbar;
IBOutlet NSView *searchToolbarItemView;
IBOutlet NSSearchField *searchToolbarItemTextField;
IBOutlet NSArrayController *showsController;
IBOutlet NSUserDefaultsController *defaultsController;
IBOutlet NSTableView *showsTable;
// Preferences window
IBOutlet NSWindow *preferencesWindow;
IBOutlet NSButton *enableDisableButton;
IBOutlet NSTextField *enableDisableLabel;
// Progress panel
IBOutlet NSWindow *progressPanel;
IBOutlet NSProgressIndicator *progressPanelIndicator;
// Details sheet
IBOutlet NSWindow *detailsSheet;
IBOutlet NSProgressIndicator *detailsProgressIndicator;
IBOutlet NSScrollView *detailsTable;
IBOutlet NSButton *detailsOKButton;
IBOutlet NSArrayController *detailsController;
IBOutlet NSTextField *detailsErrorText;
int retries;
// Download show
NSPipe *downloadShowListPipe;
NSTask *downloadShowListTask;
NSTask *getShowDetailsTask;
NSPipe *getShowDetailsPipe;
int currentShowIndex;
NSDictionary *currentShow;
}
// Toolbar
- (NSToolbarItem *)toolbar: (NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag;
- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar;
- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar;
// Download Show List
- (IBAction)downloadShowList;
- (void)downloadShowListDidFinish: (NSNotification *)notification;
// Setters/getters
- (NSDictionary *)shows;
- (void)setShows: (NSDictionary *)someShows;
- (NSArray *)details;
- (void)setDetails: (NSArray *)someDetails;
// Preferences
- (IBAction)openPreferences: (id)sender;
- (IBAction)closePreferences: (id)sender;
- (IBAction)enableDisable: (id)sender;
- (IBAction)changeSaveFolder: (id)sender;
// Show list
- (IBAction)subscribe: (id)sender;
- (IBAction)cancelSubscription: (id)sender;
- (IBAction)okSubscription: (id)sender;
- (IBAction)okSubscriptionToNextAiredEpisode: (id)sender;
- (void)getShowDetailsDidFinish: (NSNotification *)notification;
- (void) tableView:(NSTableView*)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn*)tableColumn row:(int)row;
- (IBAction)filterShows: (id)sender;
// Launchd
- (void)saveLaunchdPlist;
- (void)unloadFromLaunchd;
- (void)loadIntoLaunchd;
// Menu handlers
- (IBAction)find: (id)sender;
- (IBAction)help: (id)sender;
- (IBAction)sendFeedback: (id)sender;
// Misc
- (void)applicationWillTerminate: (NSNotification *)aNotification;
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
- (void)checkForBittorrentClient;
- (void)checkForBittorrentClientAlertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
@end