From e980fa37a154b26625b8e9472bfd5404bde0aa85 Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Fri, 21 Mar 2003 02:17:54 +0000 Subject: [PATCH] Quick API addition for Unique IDs, to reduce unneeded MT queries. --- ITMTRemote.h | 5 +++++ ITMTRemote.m | 7 ++++++- iTunesRemote.m | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ITMTRemote.h b/ITMTRemote.h index 07dec73..2d55b42 100755 --- a/ITMTRemote.h +++ b/ITMTRemote.h @@ -209,6 +209,11 @@ typedef enum { */ - (NSString *)songTitleAtIndex:(int)index; +/*! + * @method currentSongUniqueIdentifier: + */ +- (NSString *)currentSongUniqueIdentifier; + /*! * @method currentSongIndex */ diff --git a/ITMTRemote.m b/ITMTRemote.m index 50fcb21..36b82eb 100755 --- a/ITMTRemote.m +++ b/ITMTRemote.m @@ -1,4 +1,4 @@ -#import "ITMTRemote.h" +pen#import "ITMTRemote.h" @implementation ITMTRemote @@ -99,6 +99,11 @@ return nil; } +- (NSString *)currentSongUniqueIdentifier +{ + return nil; +} + - (int)currentSongIndex { return nil; diff --git a/iTunesRemote.m b/iTunesRemote.m index 5cda1b0..b89ccec 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -165,6 +165,11 @@ return [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('pnam'), from:obj { form:'indx', want:type('cTrk'), seld:long(%lu), from:obj { form:'prop', want:type('prop'), seld:type('pPla'), from:'null'() } } }",index] eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN]; } +- (NSString *)currentSongUniqueIdentifier +{ + return @"BBQ"; +} + - (int)currentSongIndex { return [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pidx" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN]; -- 2.20.1