Quick Changes
[MenuTunes.git] / ITMTRemote.h
index b2e2d5e..0caca6d 100755 (executable)
  *
  */
 
  *
  */
 
+/*! @header ITMTRemote
+ *  @abstract Declares the necessary protocol and class to implement a MenuTunes Remote.
+ */
+
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
+typedef enum {
+    ITMTRemotePlayerNotRunning = -1,
+    ITMTRemotePlayerLaunching,
+    ITMTRemotePlayerRunning
+} ITMTRemotePlayerRunningStatus;
+
+typedef enum {
+    ITMTRemotePlayerStopped = -1,
+    ITMTRemotePlayerPaused,
+    ITMTRemotePlayerPlaying,
+    ITMTRemotePlayerRewinding,
+    ITMTRemotePlayerForwarding
+} ITMTRemotePlayerState;
+
+/*! @protocol ITMTRemote
+ *  @abstract Declares what a MenuTunes Remote must be able to do.
+ *  @discussion A MenuTunes Remote must be able to return and change state information.
+ */
 @protocol ITMTRemote
 
 @protocol ITMTRemote
 
+
+/*! @method remote
+ *  @abstract Returns an autoreleased instance of the remote.
+ *  @discussion Should be very quick and compact.
+ *  EXAMPLE:
+ *    + (id)remote
+ *    {
+ *        return [[[MyRemote alloc] init] autorelease];
+ *    }
+ *  @result The instance.
+ */
 + (id)remote;
 + (id)remote;
-// Return an autoreleased instance of the remote.
-// Should be very quick and compact.
-// EXAMPLE:
-//   + (id)remote
-//   {
-//       return [[[MyRemote alloc] init] autorelease];
-//   }
 
 
-- (NSString *)title;
-// Return the title of the remote.
+/*! @method pluginTitle:
+ *  @abstract Returns the title of the plugin, which should be player name.
+ *  @result An NSString containing the title.
+ */
+- (NSString *)pluginTitle;
 
 
-- (NSString *)description;
-// Return a short description of the remote.
+/*! @method pluginInformation:
+ *  @abstract Returns a description of the remote.
+ *  @result An NSString containing the description.
+ */
+- (NSString *)pluginInformation;
 
 
-- (NSImage *)icon;
-// Return a 16x16 icon representation for the remote.
+/*! @method pluginIcon:
+ *  @abstract Returns a icon for the remote.
+ *  @result An NSImage containing the icon.
+ */
+- (NSImage *)pluginIcon;
 
 
+/*! @method begin:
+ *  @abstract Sent when the plugin should begin operation.
+ *  @result A result code signifying success.
+ */
 - (BOOL)begin;
 - (BOOL)begin;
-// Sent to the plugin when it should begin operation.
 
 
+/*! @method halt:
+ *  @abstract Sent when the plugin should cease operation.
+ *  @result A result code signifying success.
+ */
 - (BOOL)halt;
 - (BOOL)halt;
-// Sent to the plugin when it should cease operation.
 
 
-- (NSArray *)sources;
-- (int)currentSourceIndex;
+- (NSString *)playerFullName;
+
+- (NSString *)playerSimpleName;
 
 
-- (NSArray *)playlistsForCurrentSource;
+/*! @method playerRunningStatus:
+ *  @abstract Returns controlled application's running status (is or isn't running).
+ *  @result BOOL of the controlled application's running status.
+ */
+- (ITMTRemotePlayerRunningStatus)playerRunningStatus;
+
+/*! @method playerState:
+ *  @abstract Returns controlled application's playing state.
+ *  @result ITMTRemotePlayerState of the controlled application's playing state.
+ */
+- (ITMTRemotePlayerState)playerState;
+
+- (NSArray *)playlists;
+- (int)numberOfSongsInPlaylistAtIndex:(int)index;
+- (NSString *)classOfPlaylistAtIndex:(int)index;
 - (int)currentPlaylistIndex;
 
 - (int)currentPlaylistIndex;
 
-- (NSString *)songTitleAtIndex;
+- (NSString *)songTitleAtIndex:(int)index;
 - (int)currentSongIndex;
 
 - (NSString *)currentSongTitle;
 - (int)currentSongIndex;
 
 - (NSString *)currentSongTitle;
 - (NSString *)currentSongLength;
 - (NSString *)currentSongRemaining;
 
 - (NSString *)currentSongLength;
 - (NSString *)currentSongRemaining;
 
+- (float)currentSongRating;
+- (BOOL)setCurrentSongRating:(float)rating;
+
+- (BOOL)equalizerEnabled;
+- (BOOL)setEqualizerEnabled:(BOOL)enabled;
+
 - (NSArray *)eqPresets;
 - (NSArray *)eqPresets;
+- (int)currentEQPresetIndex;
+
+- (float)volume;
+- (BOOL)setVolume:(float)volume;
 
 - (BOOL)play;
 - (BOOL)pause;
 - (BOOL)goToNextSong;
 - (BOOL)goToPreviousSong;
 
 - (BOOL)play;
 - (BOOL)pause;
 - (BOOL)goToNextSong;
 - (BOOL)goToPreviousSong;
-- (BOOL)goToNextPlaylist;
-- (BOOL)goToPreviousPlaylist;
+- (BOOL)forward;
+- (BOOL)rewind;
 
 
-- (BOOL)switchToSourceAtIndex:(int)index;
 - (BOOL)switchToPlaylistAtIndex:(int)index;
 - (BOOL)switchToSongAtIndex:(int)index;
 - (BOOL)switchToEQAtIndex:(int)index;
 - (BOOL)switchToPlaylistAtIndex:(int)index;
 - (BOOL)switchToSongAtIndex:(int)index;
 - (BOOL)switchToEQAtIndex:(int)index;