+++ /dev/null
-//
-// iTunesPlayer.h
-// MenuTunes
-//
-// Created by Joseph Spiros on Sat Sep 06 2003.
-// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-#import <ITFoundation/ITFoundation.h>
-#import <ITMTRemote/ITMTRemote.h>
-
-@interface iTunesPlayer : ITMTPlayer <ITMTPlayer> {
- iTunesRemote *_remote;
-}
-
-@end
+++ /dev/null
-/* Copyright (c) 2002 - 2003 by iThink Software. All Rights Reserved. */
-
-#import "iTunesPlayer.h"
-
-@implementation iTunesPlayer
-
-static iTunesPlayer *_sharediTunesPlayer = nil;
-
-+ (id)sharedPlayerForRemote:(iTunesRemote *)remote {
- if ( _sharediTunesPlayer ) {
- _remote = remote;
- return _sharediTunesPlayer;
- } else {
- _remote = remote;
- return _sharediTunesPlayer = [[iTunesPlayer alloc] init];
- }
-}
-
-- (BOOL)writable {
- return NO;
-}
-
-- (BOOL)show {
- return NO;
-}
-
-- (BOOL)setValue:(id)value forProperty:(ITMTGenericProperty)property {
- return NO;
-}
-
-- (id)valueOfProperty:(ITMTGenericProperty)property {
- if ( ( property == ITMTNameProperty ) {
- return @"iTunes";
- } else if ( ( property == ITMTImageProperty ) {
- return nil;
- } else {
- return nil;
- }
-}
-
-- (NSDictionary *)propertiesAndValues {
- return [NSDictionary dictionaryWithObjectsAndKeys:@"iTunes",@"ITMTNameProperty",nil,@"ITMTImageProperty"];
-}
-
-- (ITMTRemote *)remote {
- return _remote;
-}
-
-- (ITMTPlaylist *)currentPlaylist {
- int tIndex;
- if ( ( tIndex = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pidx" fromObjectByKey:@"pPla" eventClass:@"core" eventID:@"getd" appPSN:savedPSN] ) ) {
- return [iTunesPlaylist playlistWithIndex:tIndex];
- } else {
- return nil;
- }
-}
-
-- (ITMTTrack *)currentTrack {
- int tDIndex;
- if ( ( tDindex = [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pDID" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:savedPSN] ) ) {
- return [iTunesTrack trackWithDatabaseIndex:tDIndex];
- } else {
- return nil;
- }
-}
-
-- (ITMTEqualizer *)currentEqualizer {
- // return dynamically from an AE
-}
-
-- (NSArray *)playlists {
- // return dynamically from an AE
-}
-
-- (NSArray *)tracks {
- // return dynamically from an AE
-}
-
-- (ITMTPlaylist *)libraryPlaylist {
- // return dynamically from an AE
-}
-
-- (NSArray *)equalizers {
- // return dynamically from an AE
-}
-
-@end
+++ /dev/null
-//
-// iTunesPlaylist.h
-// MenuTunes
-//
-// Created by Joseph Spiros on Sat Sep 06 2003.
-// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-@interface iTunesPlaylist : ITMTPlaylist <ITMTPlaylist> {
- int _index;
-}
-+ (id)playlistWithIndex:(int)index;
-- (id)initWithIndex:(int)index;
-@end
+++ /dev/null
-//
-// iTunesPlaylist.m
-// MenuTunes
-//
-// Created by Joseph Spiros on Sat Sep 06 2003.
-// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import "iTunesPlaylist.h"
-
-
-@implementation iTunesPlaylist
-
-+ (id)playlistWithIndex:(int)index {
- return [[[iTunesPlaylist alloc] initWithIndex:index] autorelease];
-}
-
-- (id)initWithIndex:(int)index {
- if ( ( self = [super init] ) ) {
- _index = index;
- }
- return self;
-}
-
-@end
+++ /dev/null
-//
-// iTunesTrack.h
-// MenuTunes
-//
-// Created by Joseph Spiros on Sat Sep 06 2003.
-// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-@interface iTunesTrack : ITMTTrack <ITMTTrack> {
- int _index;
-}
-+ (id)trackWithDatabaseIndex:(int)index;
-- (id)initWithDatabaseIndex:(int)index;
-@end
+++ /dev/null
-//
-// iTunesTrack.m
-// MenuTunes
-//
-// Created by Joseph Spiros on Sat Sep 06 2003.
-// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import "iTunesTrack.h"
-
-@implementation iTunesTrack
-
-+ (id)trackWithDatabaseIndex:(int)index {
- return [[[iTunesTrack alloc] initWithIndex:index] autorelease];
-}
-
-- (id)initWithDatabaseIndex:(int)index {
- if ( ( self = [super init] ) ) {
- _index = index;
- }
- return self;
-}
-
-@end