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>
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.
89 - (PlayerState)playerState;
91 - (NSArray *)playlists;
92 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
93 - (NSString *)classOfPlaylistAtIndex:(int)index;
94 - (int)currentPlaylistIndex;
96 - (NSString *)songTitleAtIndex:(int)index;
97 - (int)currentSongIndex;
99 - (NSString *)currentSongTitle;
100 - (NSString *)currentSongArtist;
101 - (NSString *)currentSongAlbum;
102 - (NSString *)currentSongGenre;
103 - (NSString *)currentSongLength;
104 - (NSString *)currentSongRemaining;
106 - (NSArray *)eqPresets;
107 - (int)currentEQPresetIndex;
111 - (BOOL)goToNextSong;
112 - (BOOL)goToPreviousSong;
116 - (BOOL)switchToPlaylistAtIndex:(int)index;
117 - (BOOL)switchToSongAtIndex:(int)index;
118 - (BOOL)switchToEQAtIndex:(int)index;
123 @interface ITMTRemote : NSObject <ITMTRemote>