From: Kent Sutherland Date: Wed, 12 Feb 2003 09:54:49 +0000 (+0000) Subject: Added/removed some methods. X-Git-Tag: v1.0~241 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/c3ade301266db044b41f7e21df374fead6ff4d46?hp=b28cde9af5f0de2466cb62fa8e43c60fc58bf948 Added/removed some methods. --- diff --git a/ITMTRemote.h b/ITMTRemote.h index a24e654..e4d3019 100755 --- a/ITMTRemote.h +++ b/ITMTRemote.h @@ -77,14 +77,11 @@ */ - (BOOL)halt; -- (NSArray *)sources; -- (int)currentSourceIndex; -- (NSString *)sourceTypeOfCurrentPlaylist; - -- (NSArray *)playlistsForCurrentSource; +- (int)numberOfSongsInPlaylistAtIndex:(int)index; +- (NSString *)classOfPlaylistAtIndex:(int)index; - (int)currentPlaylistIndex; -- (NSString *)songTitleAtIndex; +- (NSString *)songTitleAtIndex:(int)index; - (int)currentSongIndex; - (NSString *)currentSongTitle; @@ -100,10 +97,7 @@ - (BOOL)pause; - (BOOL)goToNextSong; - (BOOL)goToPreviousSong; -- (BOOL)goToNextPlaylist; -- (BOOL)goToPreviousPlaylist; -- (BOOL)switchToSourceAtIndex:(int)index; - (BOOL)switchToPlaylistAtIndex:(int)index; - (BOOL)switchToSongAtIndex:(int)index; - (BOOL)switchToEQAtIndex:(int)index; diff --git a/ITMTRemote.m b/ITMTRemote.m index 9a4cab8..bdc2dda 100755 --- a/ITMTRemote.m +++ b/ITMTRemote.m @@ -33,22 +33,12 @@ return NO; } -- (NSArray *)sources +- (int)numberOfSongsInPlaylistAtIndex:(int)index { - return nil; -} - -- (int)currentSourceIndex -{ - return nil; + return 0; } -- (NSString *)sourceTypeOfCurrentPlaylist -{ - return nil; -} - -- (NSArray *)playlistsForCurrentSource +- (NSString *)classOfPlaylistAtIndex:(int)index { return nil; } @@ -58,7 +48,7 @@ return nil; } -- (NSString *)songTitleAtIndex +- (NSString *)songTitleAtIndex:(int)index { return nil; } @@ -123,21 +113,6 @@ return NO; } -- (BOOL)goToNextPlaylist -{ - return NO; -} - -- (BOOL)goToPreviousPlaylist -{ - return NO; -} - -- (BOOL)switchToSourceAtIndex:(int)index -{ - return NO; -} - - (BOOL)switchToPlaylistAtIndex:(int)index { return NO; diff --git a/iTunesRemote.m b/iTunesRemote.m index 27d346e..5978135 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -40,25 +40,15 @@ return YES; } -- (NSArray *)sources +- (int)numberOfSongsInPlaylistAtIndex:(int)index { - //This is probably unneeded - return nil; -} - -- (int)currentSourceIndex -{ - //This is probably unneeded - return nil; + return [[ITAppleEventCenter sharedCenter] + sendAEWithSendStringForNumber:@"cPla" + eventClass:@"core" eventID:@"cnte" + appPSN:[self iTunesPSN]]; } -- (NSArray *)playlistsForCurrentSource -{ - //This is probably unneeded - return nil; -} - -- (NSString *)sourceTypeOfCurrentPlaylist +- (NSString *)classOfPlaylistAtIndex:(int)index { //Not working yet. It returns the 4 character code instead of a name. NSString *result; @@ -79,7 +69,7 @@ return result; } -- (NSString *)songTitleAtIndex +- (NSString *)songTitleAtIndex:(int)index { return nil; } @@ -164,8 +154,9 @@ - (BOOL)goToNextSong { - [[ITAppleEventCenter sharedCenter] sendAEWithEventClass:@"hook" eventID:@"Next" - appPSN:[self iTunesPSN]]; + [self numberOfSongsInPlaylistAtIndex:1]; + //[[ITAppleEventCenter sharedCenter] sendAEWithEventClass:@"hook" eventID:@"Next" + // appPSN:[self iTunesPSN]]; return YES; } @@ -176,24 +167,6 @@ return YES; } -- (BOOL)goToNextPlaylist -{ - //This is probably unneeded - return NO; -} - -- (BOOL)goToPreviousPlaylist -{ - //This is probably unneeded - return NO; -} - -- (BOOL)switchToSourceAtIndex:(int)index -{ - //This is probably unneeded - return NO; -} - - (BOOL)switchToPlaylistAtIndex:(int)index { return NO;