From: Joseph Spiros Date: Fri, 14 Mar 2003 07:13:08 +0000 (+0000) Subject: Added methods for shuffle and repeat modes. X-Git-Tag: v1.0~187 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/cefefd3e817015f9b8e5708bedc52539cfa88799?ds=inline Added methods for shuffle and repeat modes. --- diff --git a/ITMTRemote.h b/ITMTRemote.h index 57a3228..b65b2d1 100755 --- a/ITMTRemote.h +++ b/ITMTRemote.h @@ -22,12 +22,12 @@ #import /*! - @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,20 @@ typedef enum { ITMTRemotePlayerForwarding } ITMTRemotePlayerPlayingState; +/*! + * @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. @@ -249,6 +263,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 */ diff --git a/ITMTRemote.m b/ITMTRemote.m index 72bd8df..d2f2ccc 100755 --- a/ITMTRemote.m +++ b/ITMTRemote.m @@ -157,6 +157,26 @@ return NO; } +- (BOOL)shuffleEnabled +{ + return NO; +} + +- (BOOL)setShuffleEnabled:(BOOL)enabled +{ + return NO; +} + +- (ITMTRemotePlayerRepeatMode)repeatMode +{ + return ITMTRemotePlayerRepeatOff; +} + +- (BOOL)setRepeatMode:(ITMTRemotePlayerRepeatMode)repeatMode +{ + return NO; +} + - (BOOL)play { return NO; diff --git a/iTunesRemote.m b/iTunesRemote.m index a5a1f82..0a02b1b 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -237,6 +237,26 @@ return NO; } +- (BOOL)shuffleEnabled +{ + return NO; +} + +- (BOOL)setShuffleEnabled:(BOOL)enabled +{ + return NO; +} + +- (ITMTRemotePlayerRepeatMode)repeatMode +{ + return ITMTRemotePlayerRepeatOff; +} + +- (BOOL)setRepeatMode:(ITMTRemotePlayerRepeatMode)repeatMode +{ + return NO; +} + - (BOOL)play { [[ITAppleEventCenter sharedCenter] sendAEWithEventClass:@"hook" eventID:@"Play" appPSN:iTunesPSN];