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>
37 } ITMTRemotePlayerState;
39 /*! @protocol ITMTRemote
40 * @abstract Declares what a MenuTunes Remote must be able to do.
41 * @discussion A MenuTunes Remote must be able to return and change state information.
47 * @abstract Returns an autoreleased instance of the remote.
48 * @discussion Should be very quick and compact.
52 * return [[[MyRemote alloc] init] autorelease];
54 * @result The instance.
59 * @abstract Returns the title of the plugin, which should be player name.
60 * @result An NSString containing the title.
64 /*! @method description:
65 * @abstract Returns a description of the remote.
66 * @result An NSString containing the description.
68 - (NSString *)information;
71 * @abstract Returns a icon for the remote.
72 * @result An NSImage containing the icon.
77 * @abstract Sent when the plugin should begin operation.
78 * @result A result code signifying success.
83 * @abstract Sent when the plugin should cease operation.
84 * @result A result code signifying success.
88 /*! @method isAppRunning:
89 * @abstract Returns controlled application's running status (is or isn't running).
90 * @result BOOL of the controlled application's running status.
94 /*! @method playerState:
95 * @abstract Returns controlled application's playing state.
96 * @result ITMTRemotePlayerState of the controlled application's playing state.
98 - (ITMTRemotePlayerState)playerState;
100 - (NSArray *)playlists;
101 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
102 - (NSString *)classOfPlaylistAtIndex:(int)index;
103 - (int)currentPlaylistIndex;
105 - (NSString *)songTitleAtIndex:(int)index;
106 - (int)currentSongIndex;
108 - (NSString *)currentSongTitle;
109 - (NSString *)currentSongArtist;
110 - (NSString *)currentSongAlbum;
111 - (NSString *)currentSongGenre;
112 - (NSString *)currentSongLength;
113 - (NSString *)currentSongRemaining;
115 - (float)currentSongRating;
116 - (BOOL)setCurrentSongRating:(float)rating;
118 - (NSArray *)eqPresets;
119 - (int)currentEQPresetIndex;
122 - (BOOL)setVolume:(float)volume;
126 - (BOOL)goToNextSong;
127 - (BOOL)goToPreviousSong;
131 - (BOOL)switchToPlaylistAtIndex:(int)index;
132 - (BOOL)switchToSongAtIndex:(int)index;
133 - (BOOL)switchToEQAtIndex:(int)index;
138 @interface ITMTRemote : NSObject <ITMTRemote>