after MT 1.0 release... Also, volume and rating stuff needs to be
implemented into the iTunesRemote
playing,
rewinding,
forwarding
playing,
rewinding,
forwarding
+} ITMTRemotePlayerState;
/*! @protocol ITMTRemote
* @abstract Declares what a MenuTunes Remote must be able to do.
/*! @protocol ITMTRemote
* @abstract Declares what a MenuTunes Remote must be able to do.
+/*! @method isAppRunning:
+ * @abstract Returns controlled application's running status (is or isn't running).
+ * @result BOOL of the controlled application's running status.
+ */
-- (PlayerState)playerState;
+
+/*! @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;
- (NSArray *)playlists;
- (int)numberOfSongsInPlaylistAtIndex:(int)index;
- (NSString *)currentSongLength;
- (NSString *)currentSongRemaining;
- (NSString *)currentSongLength;
- (NSString *)currentSongRemaining;
-- (int)currentSongRating;
-- (BOOL)setCurrentSongRating:(int)rating;
+- (float)currentSongRating;
+- (BOOL)setCurrentSongRating:(float)rating;
- (NSArray *)eqPresets;
- (int)currentEQPresetIndex;
- (NSArray *)eqPresets;
- (int)currentEQPresetIndex;
+- (float)volume;
+- (BOOL)setVolume:(float)volume;
+
- (BOOL)play;
- (BOOL)pause;
- (BOOL)goToNextSong;
- (BOOL)play;
- (BOOL)pause;
- (BOOL)goToNextSong;
-- (PlayerState)playerState
+- (ITMTRemotePlayerState)playerState
-- (int)currentSongRating
+- (float)currentSongRating
+ return 0.00;
+}
+
+- (BOOL)setCurrentSongRating:(float)rating
+{
+ return NO;
+}
+
+- (float)volume
+{
+ return 1.00;
-- (BOOL)setCurrentSongRating:(int)rating
+- (BOOL)setVolume:(float)volume
- (void)timerUpdate
{
int playlist = [currentRemote currentPlaylistIndex];
- (void)timerUpdate
{
int playlist = [currentRemote currentPlaylistIndex];
- PlayerState playerState = [currentRemote playerState];
+ ITMTRemotePlayerState playerState = [currentRemote playerState];
if ((playlist > 0) || playerState != stopped) {
int trackPlayingIndex = [currentRemote currentSongIndex];
if ((playlist > 0) || playerState != stopped) {
int trackPlayingIndex = [currentRemote currentSongIndex];
- (void)playPause:(id)sender
{
- (void)playPause:(id)sender
{
- PlayerState state = [currentRemote playerState];
+ ITMTRemotePlayerState state = [currentRemote playerState];
if (state == playing) {
[currentRemote pause];
if (state == playing) {
[currentRemote pause];
- return @"iTunes Plug-in";
}
- (NSString *)information;
}
- (NSString *)information;
-- (PlayerState)playerState
+- (ITMTRemotePlayerState)playerState
{
long result = [[ITAppleEventCenter sharedCenter] sendAEWithSendStringForNumber:@"'----':obj { form:'prop', want:type('prop'), seld:type('pPlS'), from:'null'() }" eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN];
{
long result = [[ITAppleEventCenter sharedCenter] sendAEWithSendStringForNumber:@"'----':obj { form:'prop', want:type('prop'), seld:type('pPlS'), from:'null'() }" eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN];
return [[NSNumber numberWithLong:duration - current] stringValue];
}
return [[NSNumber numberWithLong:duration - current] stringValue];
}
-- (int)currentSongRating
+- (float)currentSongRating
-- (BOOL)setCurrentSongRating:(int)rating
+- (BOOL)setCurrentSongRating:(float)rating
+{
+ return NO;
+}
+
+- (float)volume
+{
+ return 1.00;
+}
+
+- (BOOL)setVolume:(float)volume