X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/cd6e87dff75957b5863cc2388b6732e840db898e..2c89adb3537752472b5c23817e9b010dd104b6a2:/ITMTRemote.h diff --git a/ITMTRemote.h b/ITMTRemote.h index 3e8c9bd..0caca6d 100755 --- a/ITMTRemote.h +++ b/ITMTRemote.h @@ -28,12 +28,27 @@ #import +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 + + /*! @method remote * @abstract Returns an autoreleased instance of the remote. * @discussion Should be very quick and compact. @@ -46,23 +61,23 @@ */ + (id)remote; -/*! @method title: - * @abstract Returns an autoreleased instance of the remote. +/*! @method pluginTitle: + * @abstract Returns the title of the plugin, which should be player name. * @result An NSString containing the title. */ -- (NSString *)title; +- (NSString *)pluginTitle; -/*! @method description: +/*! @method pluginInformation: * @abstract Returns a description of the remote. * @result An NSString containing the description. */ -- (NSString *)description; +- (NSString *)pluginInformation; -/*! @method icon: +/*! @method pluginIcon: * @abstract Returns a icon for the remote. * @result An NSImage containing the icon. */ -- (NSImage *)icon; +- (NSImage *)pluginIcon; /*! @method begin: * @abstract Sent when the plugin should begin operation. @@ -76,13 +91,28 @@ */ - (BOOL)halt; -- (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; -- (NSString *)songTitleAtIndex; +- (NSString *)songTitleAtIndex:(int)index; - (int)currentSongIndex; - (NSString *)currentSongTitle; @@ -92,16 +122,25 @@ - (NSString *)currentSongLength; - (NSString *)currentSongRemaining; +- (float)currentSongRating; +- (BOOL)setCurrentSongRating:(float)rating; + +- (BOOL)equalizerEnabled; +- (BOOL)setEqualizerEnabled:(BOOL)enabled; + - (NSArray *)eqPresets; +- (int)currentEQPresetIndex; + +- (float)volume; +- (BOOL)setVolume:(float)volume; - (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;