4 * Plugin definition for audio player control via MenuTunes
6 * Original Author : Matt Judy <mjudy@ithinksw.com>
7 * Responsibility : Matt Judy <mjudy@ithinksw.com>
9 * Copyright (c) 2002 - 2003 iThink Software.
12 * This header defines the Objective-C protocol which all MenuTunes Remote
13 * plugins must implement. To build a remote, create a subclass of this
14 * object, and implement each method in the @protocol below.
21 * - Capability methods
25 /*! @header ITMTRemote
26 * @abstract Declares the necessary protocol and class to implement a MenuTunes Remote.
29 #import <Cocoa/Cocoa.h>
32 ITMTRemotePlayerNotRunning = -1,
33 ITMTRemotePlayerLaunching,
34 ITMTRemotePlayerRunning
35 } ITMTRemotePlayerRunningStatus;
38 ITMTRemotePlayerStopped = -1,
39 ITMTRemotePlayerPaused,
40 ITMTRemotePlayerPlaying,
41 ITMTRemotePlayerRewinding,
42 ITMTRemotePlayerForwarding
43 } ITMTRemotePlayerState;
45 /*! @protocol ITMTRemote
46 * @abstract Declares what a MenuTunes Remote must be able to do.
47 * @discussion A MenuTunes Remote must be able to return and change state information.
53 * @abstract Returns an autoreleased instance of the remote.
54 * @discussion Should be very quick and compact.
58 * return [[[MyRemote alloc] init] autorelease];
60 * @result The instance.
64 /*! @method pluginTitle:
65 * @abstract Returns the title of the plugin, which should be player name.
66 * @result An NSString containing the title.
68 - (NSString *)pluginTitle;
70 /*! @method pluginInformation:
71 * @abstract Returns a description of the remote.
72 * @result An NSString containing the description.
74 - (NSString *)pluginInformation;
76 /*! @method pluginIcon:
77 * @abstract Returns a icon for the remote.
78 * @result An NSImage containing the icon.
80 - (NSImage *)pluginIcon;
83 * @abstract Sent when the plugin should begin operation.
84 * @result A result code signifying success.
89 * @abstract Sent when the plugin should cease operation.
90 * @result A result code signifying success.
94 - (NSString *)playerFullName;
96 - (NSString *)playerSimpleName;
98 /*! @method playerRunningStatus:
99 * @abstract Returns controlled application's running status (is or isn't running).
100 * @result BOOL of the controlled application's running status.
102 - (ITMTRemotePlayerRunningStatus)playerRunningStatus;
104 /*! @method playerState:
105 * @abstract Returns controlled application's playing state.
106 * @result ITMTRemotePlayerState of the controlled application's playing state.
108 - (ITMTRemotePlayerState)playerState;
110 - (NSArray *)playlists;
111 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
112 - (NSString *)classOfPlaylistAtIndex:(int)index;
113 - (int)currentPlaylistIndex;
115 - (NSString *)songTitleAtIndex:(int)index;
116 - (int)currentSongIndex;
118 - (NSString *)currentSongTitle;
119 - (NSString *)currentSongArtist;
120 - (NSString *)currentSongAlbum;
121 - (NSString *)currentSongGenre;
122 - (NSString *)currentSongLength;
123 - (NSString *)currentSongRemaining;
125 - (float)currentSongRating;
126 - (BOOL)setCurrentSongRating:(float)rating;
128 - (NSArray *)eqPresets;
129 - (int)currentEQPresetIndex;
132 - (BOOL)setVolume:(float)volume;
136 - (BOOL)goToNextSong;
137 - (BOOL)goToPreviousSong;
141 - (BOOL)switchToPlaylistAtIndex:(int)index;
142 - (BOOL)switchToSongAtIndex:(int)index;
143 - (BOOL)switchToEQAtIndex:(int)index;
148 @interface ITMTRemote : NSObject <ITMTRemote>