Fixed the state for the playlists menu item to show the currently playing playlist.
[MenuTunes.git] / ITMTRemote.h
index 57a3228..6f10b7b 100755 (executable)
 #import <Cocoa/Cocoa.h>
 
 /*!
-  @enum ITMTRemotePlayerRunningState
-  @abstract Possible running states for the remote's player.
-  @discussion Used in fuctions that report or take the running state of the remote's player application.
-  @constant ITMTRemotePlayerNotRunning The remote's player isn't running.
-  @constant ITMTRemotePlayerLaunching The remote's player is starting up, or is running, but not yet accepting remote commands.
-  @constant ITMTRemotePlayerRunning The remote's player is running, and as such, is accepting remote commands.
* @enum ITMTRemotePlayerRunningState
* @abstract Possible running states for the remote's player.
* @discussion Used in fuctions that report or take the running state of the remote's player application.
* @constant ITMTRemotePlayerNotRunning The remote's player isn't running.
* @constant ITMTRemotePlayerLaunching The remote's player is starting up, or is running, but not yet accepting remote commands.
* @constant ITMTRemotePlayerRunning The remote's player is running, and as such, is accepting remote commands.
  */
 typedef enum {
     ITMTRemotePlayerNotRunning = -1,
@@ -36,14 +36,14 @@ typedef enum {
 } ITMTRemotePlayerRunningState;
 
 /*!
-  @enum ITMTRemotePlayerPlayingState
-  @abstract Possible playing states for the remote's player.
-  @discussion Used in functions that report or take the playing state of the remote's player application.
-  @constant ITMTRemotePlayerStopped The remote's player is stopped.
-  @constant ITMTRemotePlayerPaused The remote's player is paused.
-  @constant ITMTRemotePlayerPlaying The remote's player is playing.
-  @constant ITMTRemotePlayerRewinding The remote's player is rewinding.
-  @constant ITMTRemotePlayerForwarding The remote's player is forwarding.
* @enum ITMTRemotePlayerPlayingState
* @abstract Possible playing states for the remote's player.
* @discussion Used in functions that report or take the playing state of the remote's player application.
* @constant ITMTRemotePlayerStopped The remote's player is stopped.
* @constant ITMTRemotePlayerPaused The remote's player is paused.
* @constant ITMTRemotePlayerPlaying The remote's player is playing.
* @constant ITMTRemotePlayerRewinding The remote's player is rewinding.
* @constant ITMTRemotePlayerForwarding The remote's player is forwarding.
  */
 typedef enum {
     ITMTRemotePlayerStopped = -1,
@@ -53,6 +53,47 @@ typedef enum {
     ITMTRemotePlayerForwarding
 } ITMTRemotePlayerPlayingState;
 
+/*!
+ * @enum ITMTRemotePlayerPlaylistClass
+ * @abstract Possible playlist classes used by a remote's player
+ * @discussion Used in functions that report the class of a playlist to MenuTunes. While we borrow the terms/descriptions from iTunes, these should work fine with any other player. If your player doesn't support a given type of playlist, then just return 
+
+ITMTRemotePlayerPlaylist.
+ * @constant ITMTRemotePlayerLibraryPlaylist For players that have one playlist that contains all of a user's music, or for players that don't have the concept of multiple playlists, this is the class for that "Master" list.
+ * @constant ITMTRemotePlayerPlaylist The generic playlist. Created and maintained by the user.
+ * @constant ITMTRemotePlayerSmartPlaylist A smart playlist is a playlist who's contents are dynamic, based on a set of criteria or updated by a script. These are usually not edited directly by the user, but instead maintained by the player.
+ * @constant ITMTRemotePlayerRadioPlaylist This is for when playing tracks off of (online) radio stations.
+ */
+typedef enum {
+    ITMTRemotePlayerLibraryPlaylist = -1,
+    ITMTRemotePlayerPlaylist,
+    ITMTRemotePlayerSmartPlaylist,
+    ITMTRemotePlayerRadioPlaylist
+} ITMTRemotePlayerPlaylistClass;
+
+typedef enum {
+    ITMTRemoteLibrarySource = -1,
+    ITMTRemoteCDSource,
+    ITMTRemoteRadioSource,
+    ITMTRemoteiPodSource,
+    ITMTRemoteGenericDeviceSource,
+    ITMTRemoteSharedLibrarySource
+} ITMTRemotePlayerSource;
+
+/*!
+ * @enum ITMTRemotePlayerRepeatMode
+ * @abstract Possible repeat modes for the remote's player.
+ * @discussion Used in functions that report or set the remote's player's repeat mode.
+ * @constant ITMTRemotePlayerRepeatOff The player plays all of the songs in a playlist through to the end, and then stops.
+ * @constant ITMTRemotePlayerRepeatAll The player plays all of the songs in a playlist through to the end, and then starts over again from the beginning.
+ * @constant ITMTRemotePlayerRepeatOne The player loops playing the selected song.
+ */
+typedef enum {
+    ITMTRemotePlayerRepeatOff = -1,
+    ITMTRemotePlayerRepeatAll,
+    ITMTRemotePlayerRepeatOne
+} ITMTRemotePlayerRepeatMode;
+
 /*!
  * @protocol ITMTRemote
  * @discussion The Objective-C protocol which all MenuTunes remotes must implement.
@@ -115,7 +156,9 @@ typedef enum {
 /*!
  * @method playerFullName
  * @abstract Returns the remote's player's application filename.
- * @discussion This string should be the name typically used by the remote's player's application bundle/file. For example, Panic's Audion audio player is known simply as "Audion", however, the application bundle is called "Audion 3" for version 3 of their application. This should return "Audion 3", not simply "Audion". See playerSimpleName.
+ * @discussion This string should be the name typically used by the remote's player's application bundle/file. For example, Panic's Audion audio player is known simply as "Audion", however, the application bundle is called "Audion 3" for version 3 of thei
+
+r application. This should return "Audion 3", not simply "Audion". See playerSimpleName.
  * @result An NSString containing the remote's player's application filename
  */
 - (NSString *)playerFullName;
@@ -136,10 +179,17 @@ typedef enum {
  */
 - (NSDictionary *)capabilities;
 
+/*!
+ * @method showPrimaryInterface
+ */
+- (BOOL)showPrimaryInterface;
+
 /*!
  * @method playerRunningState
  * @abstract Returns the running state of the remote's player.
- * @discussion While most remotes will use only ITMTRemotePlayerNotRunning or ITMTRemotePlayerRunning, we have included support for ITMTRemotePlayerLaunching (see ITMTRemotePlayerRunningState) for remotes that want the most precise control over their player's process managment.
+ * @discussion While most remotes will use only ITMTRemotePlayerNotRunning or ITMTRemotePlayerRunning, we have included support for ITMTRemotePlayerLaunching (see ITMTRemotePlayerRunningState) for remotes that want the most precise control over their play
+
+er's process managment.
  * @result An ITMTRemotePlayerRunningState defining the running state of the remote's player.
  */
 - (ITMTRemotePlayerRunningState)playerRunningState;
@@ -154,15 +204,35 @@ typedef enum {
  */
 - (NSArray *)playlists;
 
+/*!
+ * @method artists
+ */
+- (NSArray *)artists;
+
+/*!
+ * @method albums
+ */
+- (NSArray *)albums;
+
 /*!
  * @method numberOfSongsInPlaylistAtIndex:
  */
 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
 
 /*!
- * @method classOfPlaylistAtIndex:
+ * @method currentSource
+ */
+- (ITMTRemotePlayerSource)currentSource;
+
+/*!
+ * @method currentSourceIndex
  */
-- (NSString *)classOfPlaylistAtIndex:(int)index;
+- (int)currentSourceIndex;
+
+/*!
+ * @method currentPlaylistClass
+ */
+- (ITMTRemotePlayerPlaylistClass)currentPlaylistClass;
 
 /*!
  * @method currentPlaylistIndex
@@ -174,6 +244,21 @@ typedef enum {
  */
 - (NSString *)songTitleAtIndex:(int)index;
 
+/*!
+ * @method currentAlbumTrackCount:
+ */
+- (int)currentAlbumTrackCount;
+
+/*!
+ * @method currentSongTrack:
+ */
+- (int)currentSongTrack;
+
+/*!
+ * @method playerStateUniqueIdentifier:
+ */
+- (NSString *)playerStateUniqueIdentifier;
+
 /*!
  * @method currentSongIndex
  */
@@ -189,6 +274,11 @@ typedef enum {
  */
 - (NSString *)currentSongArtist;
 
+/*!
+ * @method currentSongComposer
+ */
+- (NSString *)currentSongComposer;
+
 /*!
  * @method currentSongAlbum
  */
@@ -209,6 +299,21 @@ typedef enum {
  */
 - (NSString *)currentSongRemaining;
 
+/*!
+ * @method currentSongElapsed
+ */
+- (NSString *)currentSongElapsed;
+
+/*!
+ * @method currentSongAlbumArt
+ */
+- (NSImage *)currentSongAlbumArt;
+
+/*!
+ * @method currentSongPlayCount
+ */
+- (int)currentSongPlayCount;
+
 /*!
  * @method currentSongRating
  */
@@ -219,6 +324,16 @@ typedef enum {
  */
 - (BOOL)setCurrentSongRating:(float)rating;
 
+/*!
+ * @method currentSongShuffable
+ */
+- (BOOL)currentSongShufflable;
+
+/*!
+ * @method setCurrentSongShuffable:
+ */
+- (BOOL)setCurrentSongShufflable:(BOOL)shufflable;
+
 /*!
  * @method equalizerEnabled
  */
@@ -249,6 +364,26 @@ typedef enum {
  */
 - (BOOL)setVolume:(float)volume;
 
+/*!
+ * @method shuffleEnabled
+ */
+- (BOOL)shuffleEnabled;
+
+/*!
+ * @method setShuffleEnabled:
+ */
+- (BOOL)setShuffleEnabled:(BOOL)enabled;
+
+/*!
+ * @method repeatMode
+ */
+- (ITMTRemotePlayerRepeatMode)repeatMode;
+
+/*!
+ * @method setRepeatMode:
+ */
+- (BOOL)setRepeatMode:(ITMTRemotePlayerRepeatMode)repeatMode;
+
 /*!
  * @method play
  */
@@ -284,6 +419,11 @@ typedef enum {
  */
 - (BOOL)switchToPlaylistAtIndex:(int)index;
 
+/*!
+ * @method switchToPlaylistAtIndex:
+ */
+- (BOOL)switchToPlaylistAtIndex:(int)index ofSourceAtIndex:(int)index2;
+
 /*!
  * @method switchToSongAtIndex:
  */
@@ -294,6 +434,11 @@ typedef enum {
  */
 - (BOOL)switchToEQAtIndex:(int)index;
 
+/*!
+ * @method makePlaylistWithTerm:ofType:
+ */
+- (BOOL)makePlaylistWithTerm:(NSString *)term ofType:(int)type;
+
 @end
 
 /*!