6 * Original Author : Matthew Judy <mjudy@ithinksw.com>
7 * Responsibility : Matthew Judy <mjudy@ithinksw.com>
9 * Copyright (c) 2002-2003 iThink Software.
15 #import <Cocoa/Cocoa.h>
16 #import <Carbon/Carbon.h>
17 #import <ITKit/ITKit.h>
18 #import <ITFoundation/ITFoundation.h>
19 #import <ITMTRemote/ITMTRemote.h>
20 #import "MTBlingController.h"
22 #define MT_CURRENT_VERSION 1300
24 @class StatusWindowController, MenuController, NetworkController;
26 @interface MainController : NSObject
28 ITStatusItem *statusItem;
29 NSMutableArray *remoteArray;
30 ITMTRemote *currentRemote;
32 ITMTRemotePlayerRunningState playerRunningState;
33 ITMTRemotePlayerPlaylistClass latestPlaylistClass;
35 //Used in updating the menu automatically
36 NSTimer *refreshTimer;
37 NSString *_latestSongIdentifier, *_toolTip;
39 StatusWindowController *statusWindowController; //Shows status windows
40 MenuController *menuController;
41 NetworkController *networkController;
44 MTBlingController *bling;
45 NSTimer *registerTimer;
46 BOOL timerUpdating, _checkingForServer, _popped;
48 NSLock *_serverCheckLock;
50 + (MainController *)sharedController;
54 //Methods called from MenuController by menu items
55 - (NSDate*)getBlingTime;
67 - (void)selectPlaylistAtIndex:(int)index;
68 - (void)selectSongAtIndex:(int)index;
69 - (void)selectSongRating:(int)rating;
70 - (void)selectEQPresetAtIndex:(int)index;
71 - (void)makePlaylistWithTerm:(NSString *)term ofType:(int)type;
73 - (void)showPreferences;
74 - (void)showTestWindow;
75 - (void)quitMenuTunes;
79 - (void)setServerStatus:(BOOL)newStatus;
80 - (int)connectToServer;
81 - (BOOL)disconnectFromServer;
82 - (void)checkForRemoteServerAndConnectImmediately:(BOOL)connectImmediately;
83 - (void)networkError:(NSException *)exception;
87 - (ITMTRemote *)currentRemote;
90 - (void)closePreferences;
91 - (MenuController *)menuController;
93 - (void)showCurrentTrackInfo;
97 @interface NSImage (SmoothAdditions)
98 - (NSImage *)imageScaledSmoothlyToSize:(NSSize)scaledSize;