-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMainController.h
116 lines (105 loc) · 3.88 KB
/
MainController.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
110
111
112
113
114
115
116
//
// MainController.h
// GoogleReader
//
// Created by Eli Dourado on 12/8/05.
// Modified by Troels Bay ([email protected])
//
//
#import <Cocoa/Cocoa.h>
#import <Growl/Growl.h>
#import <IOKit/IOKitLib.h>
@interface MainController : NSObject <GrowlApplicationBridgeDelegate> {
NSStatusItem *statusItem;
IBOutlet NSSecureTextField *passwordField;
IBOutlet NSTextField *usernameField;
IBOutlet NSTextField *addNewFeedUrlField;
IBOutlet NSTextField *torrentCastFolderPath;
IBOutlet NSMenu *GRMenu;
IBOutlet NSWindow *preferences; //preference window
IBOutlet NSWindow *addfeedwindow; //addfeed window
IBOutlet NSMenu *tempMenu;
IBOutlet NSMenu *tempMenuSec;
NSTimer *mainTimer;
NSTimer *lastCheckTimer;
NSUserDefaults *prefs;
NSMutableArray *titles;
NSMutableArray *sources;
NSMutableArray *user;
NSMutableArray *links;
NSMutableArray *ids;
NSMutableArray *feeds;
NSMutableArray *summaries;
NSMutableArray *torrentcastlinks;
NSMutableArray *results;
NSMutableArray *lastIds;
NSMutableArray *newItems;
NSError *xmlError;
NSString *storedSID;
// NSMutableString *storedUserNo;
NSSound *theSound;
NSImage *unreadItemsImage;
NSImage *highlightedImage;
NSImage *nounreadItemsImage;
NSImage *errorImage;
BOOL moreUnreadExistInGRInterface;
int totalUnreadItemsInGRInterface;
BOOL isLeopard;
BOOL currentlyFetchingAndUpdating;
int lastCheckMinute;
NSDictionary *normalAttrsDictionary;
NSDictionary *smallAttrsDictionary;
NSString *torrentCastFolderPathString;
}
- (void)downloadFile:(NSString *)url:(NSString *)filename;
- (void)removeNumberOfItemsFromMenubar:(int) number;
- (NSString *)sendConnectionRequest:(NSString *)urlToConnectTo:(BOOL)handleCookies:(NSString *)cookieValue:(NSString *)theHTTPMethod:(NSString *)theHTTPBody;
- (NSAttributedString *)makeAttributedStatusItemString:(NSString *)text;
- (NSAttributedString *)makeAttributedMenuString:(NSString *)bigtext:(NSString *)smalltext;
- (NSString *)flattenHTML:(NSString *)stringToFlatten;
- (void)addFeed:(NSString *)url;
- (void)displayAlert:(NSString *)headerText:(NSString *)bodyText;
- (void)displayMessage:(NSString *)message;
- (NSString *)searchAndReplace:(NSString *)searchString:(NSString *)replaceString:(NSString *)inString;
- (NSString *)grabUserNo;
- (NSString *)loginToGoogle;
- (void)removeAllItemsFromMenubar;
- (IBAction)launchSite:(id)sender;
- (NSString *)getTokenFromGoogle;
- (IBAction)markAllAsRead:(id)sender;
- (IBAction)launchLink:(id)sender;
- (void)removeOneItemFromMenu:(int)index;
- (IBAction)doOptionalActionFromMenu:(id)sender;
- (void)markOneAsStarred:(int)index;
- (void)markOneAsRead:(int)index;
- (IBAction)launchErrorHelp:(id)sender;
- (IBAction)checkGoogleAuth:(id)sender;
- (void)timer:(NSTimer *)timer;
- (int)getUnreadCount;
- (void)retrieveGoogleFeed;
- (NSMutableArray *)reverseArray:(NSMutableArray *)array;
- (void)updateMenu;
- (IBAction)openPrefs:(id)sender;
- (IBAction)checkNow:(id)sender;
- (void)setTimeDelay:(int)x;
- (NSString *)getLabel;
- (void)errorImageOn;
- (NSString *)getURLPrefix;
- (void)announce;
- (NSString *)getUserPasswordFromKeychain;
- (void)growlNotificationWasClicked:(id)clickContext;
- (NSDictionary *)registrationDictionaryForGrowl;
- (NSString *)trimDownString:(NSString *)stringToTrim:(int)maxLength;
// - (IBAction)setLoginItem:(id)sender;
- (void)setupEventHandlers;
- (void)handleOpenLocationAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)reply;
- (IBAction)openAddFeedWindow:(id)sender;
- (IBAction)addFeedFromUI:(id)sender;
- (void)createLastCheckTimer;
- (void)displayLastTimeMessage:(NSString *)message;
- (void)displayTopMessage:(NSString *)message;
- (void)lastTimeCheckedTimer:(NSTimer *)timer;
- (IBAction)selectTorrentCastFolder:(id)sender;
- (void)selectTorrentCastFolderEnded:(NSOpenPanel*)panel returnCode:(int)returnCode contextInfo:(void*)contextInfo;
- (void)checkNowWithDelayDetached:(NSNumber *)delay;
@end