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>
31 typedef enum {stopped = -1, paused, playing, rewinding, forwarding} PlayerState;
33 /*! @protocol ITMTRemote
34 * @abstract Declares what a MenuTunes Remote must be able to do.
35 * @discussion A MenuTunes Remote must be able to return and change state information.
41 * @abstract Returns an autoreleased instance of the remote.
42 * @discussion Should be very quick and compact.
46 * return [[[MyRemote alloc] init] autorelease];
48 * @result The instance.
53 * @abstract Returns an autoreleased instance of the remote.
54 * @result An NSString containing the title.
58 /*! @method description:
59 * @abstract Returns a description of the remote.
60 * @result An NSString containing the description.
62 - (NSString *)information;
65 * @abstract Returns a icon for the remote.
66 * @result An NSImage containing the icon.
71 * @abstract Sent when the plugin should begin operation.
72 * @result A result code signifying success.
77 * @abstract Sent when the plugin should cease operation.
78 * @result A result code signifying success.
82 - (PlayerState)playerState;
84 - (NSArray *)playlists;
85 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
86 - (NSString *)classOfPlaylistAtIndex:(int)index;
87 - (int)currentPlaylistIndex;
89 - (NSString *)songTitleAtIndex:(int)index;
90 - (int)currentSongIndex;
92 - (NSString *)currentSongTitle;
93 - (NSString *)currentSongArtist;
94 - (NSString *)currentSongAlbum;
95 - (NSString *)currentSongGenre;
96 - (NSString *)currentSongLength;
97 - (NSString *)currentSongRemaining;
99 - (NSArray *)eqPresets;
100 - (int)currentEQPresetIndex;
104 - (BOOL)goToNextSong;
105 - (BOOL)goToPreviousSong;
109 - (BOOL)switchToPlaylistAtIndex:(int)index;
110 - (BOOL)switchToSongAtIndex:(int)index;
111 - (BOOL)switchToEQAtIndex:(int)index;
116 @interface ITMTRemote : NSObject <ITMTRemote>