+- (BOOL)shuffle
+{
+ int result = [[ITAppleEventCenter sharedCenter]
+ sendTwoTierAEWithRequestedKeyForNumber:@"pShf" fromObjectByKey:@"pPla" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+ return result;
+}
+
+- (BOOL)supportsRepeatMode:(ITMTRemoteRepeatMode)repeatMode
+{
+ switch (repeatMode)
+ {
+ case ITMTRemoteRepeatNone:
+ case ITMTRemoteRepeatAll:
+ case ITMTRemoteRepeatOne:
+ return YES;
+ break;
+ default:
+ return NO;
+ break;
+ }
+}
+
+- (BOOL)setRepeatMode:(ITMTRemoteRepeatMode)repeatMode
+{
+ char *m00f = NULL;
+ switch (repeatMode)
+ {
+ case ITMTRemoteRepeatNone:
+ m00f = "kRp0";
+ break;
+ case ITMTRemoteRepeatOne:
+ m00f = "kRp1";
+ break;
+ case ITMTRemoteRepeatAll:
+ m00f = "kRpA";
+ break;
+ }
+ [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"data:type('%s') ----:obj { form:'prop', want:type('pRpt'), seld:type('pShf'), from:obj { form:'prop', want:type('prop'), seld:type('pPla'), from:'null'() } }",m00f] eventClass:@"core" eventID:@"setd" appPSN:savedPSN];
+ return YES;
+}
+
+- (BOOL)repeatMode
+{
+ FourCharCode m00f = 0;
+ int result = 0;
+ m00f = [[ITAppleEventCenter sharedCenter]
+ sendTwoTierAEWithRequestedKeyForNumber:@"pRpt" fromObjectByKey:@"pPla" eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+
+ switch (m00f)
+ {
+ case 'kRp0':
+ result = ITMTRemoteRepeatNone;
+ break;
+ case 'kRp1':
+ result = ITMTRemoteRepeatOne;
+ break;
+ case 'kRpA':
+ result = ITMTRemoteRepeatAll;
+ break;
+ }
+ return result;
+}
+
+- (BOOL)supportsVolume
+{
+ return YES;
+}
+
+- (BOOL)setVolume:(float)volume
+{
+ [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"data:long(%lu), '----':obj { form:'prop', want:type('prop'), seld:type('pVol'), from:'null'() }",(long)(volume*100)] eventClass:@"core" eventID:@"setd" appPSN:savedPSN];
+ return NO;
+}
+
+- (float)volume
+{
+ return (float)[[ITAppleEventCenter sharedCenter] sendAEWithRequestedKeyForNumber:@"pVol" eventClass:@"core" eventID:@"getd" appPSN:savedPSN] / 100;
+}
+
+- (BOOL)supportsCustomEqualizer
+{
+ return YES;
+}
+
+- (BOOL)showEqualizerWindow
+{
+ //Do this Alex, please :D
+ return YES;
+}
+
+- (BOOL)supportsEqualizerPresets
+{
+ return YES;
+}
+
+- (NSArray *)equalizerPresetNames
+{
+ int i;
+ long numPresets = [[ITAppleEventCenter sharedCenter] sendAEWithSendStringForNumber:@"kocl:type('cEQP'), '----':(), &subj:()" eventClass:@"core" eventID:@"cnte" appPSN:savedPSN];
+ NSMutableArray *presets = [[NSMutableArray alloc] initWithCapacity:numPresets];
+
+ for (i = 1; i <= numPresets; i++) {
+ NSString *theObj = [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('pnam'), from:obj { form:'indx', want:type('cEQP'), seld:long(%lu), from:'null'() } }",i] eventClass:@"core" eventID:@"getd" appPSN:savedPSN];
+ if (theObj) {
+ [presets addObject:theObj];
+ }
+ }
+ return [presets autorelease];
+}
+
+- (BOOL)switchToEqualizerPreset:(int)index
+{
+ [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('pEQP'), from:'null'() }, data:obj { form:'indx', want:type('cEQP'), seld:long(%lu), from:'null'() }",(index+1)] eventClass:@"core" eventID:@"setd" appPSN:savedPSN];
+ return YES;
+}
+
+- (BOOL)supportsExternalWindow