Added/removed some methods.
authorKent Sutherland <ksuther@ithinksw.com>
Wed, 12 Feb 2003 09:54:49 +0000 (09:54 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Wed, 12 Feb 2003 09:54:49 +0000 (09:54 +0000)
ITMTRemote.h
ITMTRemote.m
iTunesRemote.m

index a24e654..e4d3019 100755 (executable)
  */
 - (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;
 - (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;
index 9a4cab8..bdc2dda 100755 (executable)
     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;
 }
     return NO;
 }
 
-- (BOOL)goToNextPlaylist
-{
-    return NO;
-}
-
-- (BOOL)goToPreviousPlaylist
-{
-    return NO;
-}
-
-- (BOOL)switchToSourceAtIndex:(int)index
-{
-    return NO;
-}
-
 - (BOOL)switchToPlaylistAtIndex:(int)index
 {
     return NO;
index 27d346e..5978135 100755 (executable)
     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; 
 }
 
 - (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;
 }
 
     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;