This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
AppController.h
122 lines (97 loc) · 3.71 KB
/
AppController.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
117
118
119
120
121
122
/* AppController */
#import <Cocoa/Cocoa.h>
#import "PreferencesController.h"
#import "BGRoundedInfoView.h"
#import "BGLastFmSong.h"
#import "BGPointWindow.h"
#import "iTunesWatcher.h"
#import "FileWatcher.h"
#import "BGLastFmAuthenticationManager.h"
#import "BGLastFmWebServiceParameterList.h"
#import <Sparkle/SUUpdater.h>
@interface AppController : NSObject <TunesWatcherDelegate> {
NSStatusItem *statusItem;
IBOutlet NSMenu *statusMenu;
IBOutlet NSMenuItem *statusMenuItem;
IBOutlet NSMenuItem *currentSongMenuItem;
IBOutlet NSView *tagEntryView;
IBOutlet NSView *recommendationEntryView;
IBOutlet NSView *containerView;
IBOutlet BGRoundedInfoView *infoView;
IBOutlet BGPointWindow *arrowWindow;
IBOutlet NSTokenField *tagEntryField;
IBOutlet NSTokenField *commonTagsField;
IBOutlet NSTokenField *friendsEntryField;
IBOutlet NSTextField *recommendMessageField;
IBOutlet NSTextField *tagLabel;
IBOutlet NSSegmentedControl *tagTypeChooser;
IBOutlet NSSegmentedControl *recommendTypeChooser;
IBOutlet NSView *commonTagsLoadingView;
IBOutlet NSProgressIndicator *commonTagsLoadingIndicator;
IBOutlet SUUpdater *updater;
BGLastFmAuthenticationManager *authManager;
BOOL isLoadingCommonTags;
BOOL isScrobbling;
BOOL isPostingNP;
NSSound *scrobbleSound;
PreferencesController *prefController;
NSArray *tagAutocompleteList;
NSArray *friendsAutocompleteList;
IBOutlet NSWindow *welcomeWindow;
FileWatcher *xmlWatcher;
NSMutableArray *apiQueue;
}
-(NSString *)pathForCachedDatabase;
-(BOOL)cacheFileExists;
-(void)primeSongPlayCache;
@property (retain) NSArray *tagAutocompleteList;
@property (retain) NSArray *friendsAutocompleteList;
-(IBAction)openAuthPage:(id)sender;
-(IBAction)updateTagLabel:(id)sender;
-(void)populateCommonTags;
#pragma mark Required Methods
-(IBAction)showAboutPanel:(id)sender;
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
- (void)applicationWillTerminate:(NSNotification *)aNotification;
-(void)doFirstRun;
#pragma mark ScrobblePod Status
-(void)setAppropriateRoundedString;
-(void)setIsScrobbling:(BOOL)aBool;
-(void)setIsPostingNP:(BOOL)aBool;
#pragma mark Managing iTunes
- (void)workspaceDidLaunchApplication:(NSNotification *)notification;
- (void)workspaceDidTerminateApplication:(NSNotification *)notification;
#pragma mark XML Notifications
-(NSString *)fullXmlPath;
-(IBAction)quit:(id)sender;
#pragma mark Main Scrobbling Methods
-(IBAction)manualScrobble:(id)sender;
-(void)detachScrobbleThreadWithoutConsideration:(BOOL)passThrough;
-(void)postScrobble;
-(void)postNowPlayingNotificationForSong:(BGLastFmSong *)nowPlayingSong;
-(void)detachNowPlayingThread;
-(void)playScrobblingSound;
-(void)xmlFileChanged:(NSNotification *)notification;
-(void)amdsSyncCompleted:(NSNotification *)notification;
#pragma mark Secondary Last.fm Methods
-(void)queueApiCall:(BGLastFmWebServiceParameterList *)theCall popQueueToo:(BOOL)shouldPopQueue;
-(void)popApiQueue;
-(BOOL)dataIsAvailableForAPICallUsingArtist:(BOOL)useArtist andAlbum:(BOOL)useAlbum andTrack:(BOOL)useTrack;
-(IBAction)goToUserProfilePage:(id)sender;
-(IBAction)loveSong:(id)sender;
-(IBAction)banSong:(id)sender;
-(IBAction)tagSong:(id)sender;
-(IBAction)recommendSong:(id)sender;
-(void)startTasteCommand:(NSString *)tasteCommand;
-(IBAction)performTagSong:(id)sender;
-(NSArray *)popularTagsForCurrentSong;
-(void)showArrowWindowForView:(NSView *)theView;
-(void)updateFriendsList;
-(NSArray *)friendsForUser;
-(IBAction)performRecommendSong:(id)sender;
#pragma mark Preference Integration
-(IBAction)raiseLoginPanel:(id)sender;//show pref window
#pragma mark Sparkle
- (NSString*)installationId;
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
@end