ITMTRemote now builds, but working on the API still, some things still
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Sun, 7 Sep 2003 17:59:53 +0000 (17:59 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Sun, 7 Sep 2003 17:59:53 +0000 (17:59 +0000)
need to be added.

ITMTEqualizer.h [deleted file]
ITMTEqualizer.m [deleted file]
ITMTPlayer.h [deleted file]
ITMTPlayer.m [deleted file]
ITMTPlaylist.h [deleted file]
ITMTPlaylist.m [deleted file]
ITMTRemote.h
ITMTRemote.m
ITMTTrack.h [deleted file]
ITMTTrack.m [deleted file]

diff --git a/ITMTEqualizer.h b/ITMTEqualizer.h
deleted file mode 100755 (executable)
index 909c61d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************
-    ITMTRemote 1.0 (MenuTunes Remotes)
-    ITMTEqualizer.h
-    
-    Responsibility:
-        Joseph Spiros <joseph.spiros@ithinksw.com>
-    
-    Copyright (c) 2002 - 2003 by iThink Software.
-    All Rights Reserved.
-****************************************/
-
-#import <Cocoa/Cocoa.h>
-
-#import <ITMTRemote/ITMTRemote.h>
-
-typedef enum {
-    ITMT32HzEqualizerBandLevel,
-    ITMT64HzEqualizerBandLevel,
-    ITMT125HzEqualizerBandLevel,
-    ITMT250HzEqualizerBandLevel,
-    ITMT500HzEqualizerBandLevel,
-    ITMT1kHzEqualizerBandLevel,
-    ITMT2kHzEqualizerBandLevel,
-    ITMT4kHzEqualizerBandLevel,
-    ITMT8kHzEqualizerBandLevel,
-    ITMT16kHzEqualizerBandLevel,
-    ITMTEqualizerPreampLevel
-} ITMTEqualizerLevel;
-
-@protocol ITMTEqualizer
-- (BOOL)writable;
-
-- (ITMTPlayer *)player;
-
-- (float)dBForLevel:(ITMTEqualizerLevel)level;
-- (BOOL)setdB:(float)dB forLevel:(ITMTEqualizerLevel)level;
-@end
-
-@interface ITMTEqualizer : NSObject 
-@end
diff --git a/ITMTEqualizer.m b/ITMTEqualizer.m
deleted file mode 100755 (executable)
index b08dce2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Copyright (c) 2002 - 2003 by iThink Software. All Rights Reserved. */
-
-#import "ITMTEqualizer.h"
-
-@implementation ITMTEqualizer
-@end
diff --git a/ITMTPlayer.h b/ITMTPlayer.h
deleted file mode 100755 (executable)
index 8ae8343..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************
-    ITMTRemote 1.0 (MenuTunes Remotes)
-    ITMTPlayer.h
-    
-    Responsibility:
-        Joseph Spiros <joseph.spiros@ithinksw.com>
-    
-    Copyright (c) 2002 - 2003 by iThink Software.
-    All Rights Reserved.
-****************************************/
-
-#import <Cocoa/Cocoa.h>
-
-#import <ITMTRemote/ITMTRemote.h>
-
-/*!
-    @protocol ITMTPlayer
-    @abstract Object representation for a controlled player.
-    @discussion Object representation for a controlled player. Players can be defined as things that control playlist(s) objects, a pool of track objects, and possibly, equalizer objects.
-*/
-@protocol ITMTPlayer
-/*!
-    @method writable
-*/
-- (BOOL)writable;
-
-/*!
-    @method show
-*/
-- (BOOL)show;
-
-/*!
-    @method setValue:forProperty:
-*/
-- (BOOL)setValue:(id)value forProperty:(ITMTGenericProperty)property;
-/*!
-    @method valueOfProperty:
-*/
-- (id)valueOfProperty:(ITMTGenericProperty)property;
-/*!
-    @method propertiesAndValues
-*/
-- (NSDictionary *)propertiesAndValues;
-
-/*!
-    @method remote
-*/
-- (ITMTRemote *)remote;
-
-/*!
-    @method currentPlaylist
-*/
-- (ITMTPlaylist *)currentPlaylist;
-/*!
-    @method currentTrack
-*/
-- (ITMTTrack *)currentTrack;
-/*!
-    @method currentEqualizer
-*/
-- (ITMTEqualizer *)currentEqualizer;
-
-/*!
-    @method playlists
-*/
-- (NSArray *)playlists;
-
-/*!
-    @method tracks
-*/
-- (NSArray *)tracks;
-/*!
-    @method libraryPlaylist
-*/
-- (ITMTPlaylist *)libraryPlaylist;
-
-/*!
-    @method equalizers
-*/
-- (NSArray *)equalizers;
-@end
-
-/*!
-    @class ITMTPlayer
-*/
-@interface ITMTPlayer : NSObject
-@end
diff --git a/ITMTPlayer.m b/ITMTPlayer.m
deleted file mode 100755 (executable)
index c92715f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Copyright (c) 2002 - 2003 by iThink Software. All Rights Reserved. */
-
-#import "ITMTPlayer.h"
-
-@implementation ITMTPlayer
-@end
diff --git a/ITMTPlaylist.h b/ITMTPlaylist.h
deleted file mode 100755 (executable)
index 01a3f53..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************
-    ITMTRemote 1.0 (MenuTunes Remotes)
-    ITMTPlaylist.h
-    
-    Responsibility:
-        Joseph Spiros <joseph.spiros@ithinksw.com>
-    
-    Copyright (c) 2002 - 2003 by iThink Software.
-    All Rights Reserved.
-****************************************/
-
-#import <Cocoa/Cocoa.h>
-
-#import <ITMTRemote/ITMTRemote.h>
-
-@protocol ITMTPlaylist
-- (BOOL)writable;
-
-- (BOOL)show; // graphical
-
-- (BOOL)setValue:(id)value forProperty:(ITMTGenericProperty)property;
-- (id)valueOfProperty:(ITMTGenericProperty)property;
-- (NSDictionary *)propertiesAndValues;
-
-- (ITMTPlayer *)player;
-
-- (BOOL)addTrack:(ITMTTrack *)track;
-- (BOOL)insertTrack:(ITMTTrack *)track atIndex:(int)index;
-
-- (BOOL)removeTrack:(ITMTTrack *)item;
-- (BOOL)removeTrackAtIndex:(int)index;
-
-- (ITMTTrack *)trackAtIndex:(int)index;
-
-- (int)indexOfTrack:(ITMTTrack *)track;
-- (ITMTTrack *)trackWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatch:(BOOL)partial;
-- (NSArray *)tracksWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatches:(BOOL)partial;
-- (int)indexOfTrackWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatch:(BOOL)partial;
-- (NSArray *)indexesOfTracksWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatches:(BOOL)partial;
-
-- (int)trackCount;
-- (NSArray *)trackArray;
-@end
-
-@interface ITMTPlaylist : NSObject
-@end
diff --git a/ITMTPlaylist.m b/ITMTPlaylist.m
deleted file mode 100755 (executable)
index 5665229..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Copyright (c) 2002 - 2003 by iThink Software. All Rights Reserved. */
-
-#import "ITMTPlaylist.h"
-
-@implementation ITMTPlaylist
-@end
index aedbc4d..50c0df1 100755 (executable)
 
 #import <Cocoa/Cocoa.h>
 
-#import <ITMTRemote/ITMTPlayer.h>
-#import <ITMTRemote/ITMTPlaylist.h>
-#import <ITMTRemote/ITMTTrack.h>
-#import <ITMTRemote/ITMTEqualizer.h>
-
-/*!
-    @typedef ITMTGenericProperty
-    @constant ITMTNameProperty The object's human readable name.
-    @constant ITMTImageProperty An image that can be associated with the object.
-*/
 typedef enum {
     ITMTNameProperty,
     ITMTImageProperty
 } ITMTGenericProperty;
-/*!
-    @typedef ITMTRemoteProperty
-    @constant ITMTRemoteNameProperty
-    @constant ITMTRemoteImageProperty
-    @constant ITMTRemoteAuthorProperty
-    @constant ITMTRemoteDescriptionProperty
-    @constant ITMTRemoteURLProperty
-    @constant ITMTRemoteCopyrightProperty
-*/
+
 typedef enum {
     ITMTRemoteNameProperty,
     ITMTRemoteImageProperty,
@@ -43,7 +25,24 @@ typedef enum {
     ITMTRemoteCopyrightProperty,
     ITMTRemoteActivationStringProperty,
     ITMTRemoteDeactivationStringProperty
-} ITMTRemoteProperty
+} ITMTRemoteProperty;
+
+typedef enum {
+    ITMTTrackTitle,
+    ITMTTrackArtist,
+    ITMTTrackComposer,
+    ITMTTrackYear,
+    ITMTTrackImage,
+    ITMTTrackAlbum,
+    ITMTTrackNumber,
+    ITMTTrackTotal,
+    ITMTDiscNumber,
+    ITMTDiscTotal,
+    ITMTTrackComments,
+    ITMTTrackGenre,
+    ITMTTrackRating
+} ITMTTrackProperty;
+
 /*!
     @typedef ITMTPlayerStyle
     @constant ITMTSinglePlayerStyle Like iTunes, One player controls all available songs.
@@ -56,58 +55,156 @@ typedef enum {
     ITMTSinglePlayerSinglePlaylistStyle
 } ITMTPlayerStyle;
 
-/*!
-    @protocol ITMTRemote
-    @abstract The ITMTRemote protocol is the protocol that all MenuTunes remotes' primary class must implement.
-*/
+typedef enum {
+    ITMT32HzEqualizerBandLevel,
+    ITMT64HzEqualizerBandLevel,
+    ITMT125HzEqualizerBandLevel,
+    ITMT250HzEqualizerBandLevel,
+    ITMT500HzEqualizerBandLevel,
+    ITMT1kHzEqualizerBandLevel,
+    ITMT2kHzEqualizerBandLevel,
+    ITMT4kHzEqualizerBandLevel,
+    ITMT8kHzEqualizerBandLevel,
+    ITMT16kHzEqualizerBandLevel,
+    ITMTEqualizerPreampLevel
+} ITMTEqualizerLevel;
+
+typedef enum {
+    ITMTTrackStopped = -1,
+    ITMTTrackPaused,
+    ITMTTrackPlaying,
+    ITMTTrackForwarding,
+    ITMTTrackRewinding
+} ITMTTrackState;
+
+@class ITMTRemote, ITMTPlayer, ITMTPlaylist, ITMTTrack, ITMTEqualizer;
+
 @protocol ITMTRemote
-/*!
-    @method remote
-    @result Returns an autoreleased instance of the remote.
-*/
 + (id)remote;
 
-/*!
-    @method valueOfProperty:
-*/
 - (id)valueOfProperty:(ITMTRemoteProperty)property;
 
-/*!
-    @method propertiesAndValues
-*/
 - (NSDictionary *)propertiesAndValues;
 
-/*!
-    @method playerStyle
-    @result An ITMTPlayerStyle defining how the remote works with players and playlists.
-*/
 - (ITMTPlayerStyle)playerStyle;
 
-/*!
-    @method activate
-    @result A BOOL indicating success or failure.
-*/
 - (BOOL)activate;
-/*!
-    @method deactivate
-    @result A BOOL indicating success or failure.
-*/
 - (BOOL)deactivate;
 
-/*!
-    @method currentPlayer
-    @result An ITMTPlayer object representing the currently active player that the remote is controlling.
-*/
-- (ITMTPlayer *)currentPlayer
-/*!
-    @method players
-    @result An NSArray filled with ITMTPlayer objects.
-*/
+- (ITMTPlayer *)currentPlayer;
+- (BOOL)selectPlayer:(ITMTPlayer *)player;
 - (NSArray *)players;
 @end
 
+@interface ITMTRemote : NSObject <ITMTRemote>
+@end
+
 /*!
-    @class ITMTRemote
+    @protocol ITMTPlayer
+    @abstract Object representation for a controlled player.
+    @discussion Object representation for a controlled player. Players can be defined as things that control playlist(s) objects, a pool of track objects, and possibly, equalizer objects.
 */
-@interface ITMTRemote : NSObject <ITMTRemote>
+@protocol ITMTPlayer
+- (BOOL)writable;
+
+- (BOOL)show;
+
+- (BOOL)setValue:(id)value forProperty:(ITMTGenericProperty)property;
+- (id)valueOfProperty:(ITMTGenericProperty)property;
+- (NSDictionary *)propertiesAndValues;
+
+- (ITMTRemote *)remote;
+
+- (ITMTPlaylist *)currentPlaylist;
+- (BOOL)selectPlaylist:(ITMTPlaylist *)playlist;
+- (ITMTTrack *)currentTrack;
+- (BOOL)selectTrack:(ITMTTrack *)track;
+- (ITMTEqualizer *)currentEqualizer;
+- (BOOL)selectEqualizer:(ITMTEqualizer *)equalizer;
+
+- (NSArray *)playlists;
+
+- (NSArray *)tracks;
+- (ITMTPlaylist *)libraryPlaylist;
+
+- (NSArray *)equalizers;
+@end
+
+@interface ITMTPlayer : NSObject <ITMTPlayer>
+@end
+
+@protocol ITMTPlaylist
+- (BOOL)isEqualToPlaylist:(ITMTPlaylist *)playlist;
+
+- (BOOL)writable;
+
+- (BOOL)show;
+
+- (BOOL)setValue:(id)value forProperty:(ITMTGenericProperty)property;
+- (id)valueOfProperty:(ITMTGenericProperty)property;
+- (NSDictionary *)propertiesAndValues;
+
+- (ITMTPlayer *)player;
+
+- (BOOL)addTrack:(ITMTTrack *)track;
+- (BOOL)insertTrack:(ITMTTrack *)track atIndex:(int)index;
+
+- (BOOL)removeTrack:(ITMTTrack *)item;
+- (BOOL)removeTrackAtIndex:(int)index;
+
+- (ITMTTrack *)trackAtIndex:(int)index;
+
+- (int)indexOfTrack:(ITMTTrack *)track;
+- (ITMTTrack *)trackWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatch:(BOOL)partial;
+- (NSArray *)tracksWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatches:(BOOL)partial;
+- (int)indexOfTrackWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatch:(BOOL)partial;
+- (NSArray *)indexesOfTracksWithProperty:(ITMTTrackProperty)property ofValue:(id)value allowPartialMatches:(BOOL)partial;
+
+- (int)trackCount;
+- (NSArray *)tracks;
+
+- (ITMTTrack *)currentTrack;
+- (int)indexOfCurrentTrack;
+
+- (BOOL)selectTrack:(ITMTTrack *)track;
+- (BOOL)selectTrackAtIndex:(int)index;
 @end
+
+@interface ITMTPlaylist : NSObject <ITMTPlaylist>
+@end
+
+@protocol ITMTTrack
+- (BOOL)isEqualToTrack:(ITMTTrack *)track;
+
+- (BOOL)writable;
+
+- (BOOL)addToPlaylist:(ITMTPlaylist *)playlist;
+- (BOOL)addToPlaylist:(ITMTPlaylist *)playlist atIndex:(int)index;
+
+- (ITMTPlayer *)player;
+- (NSArray *)playlists;
+- (ITMTPlaylist *)currentPlaylist;
+- (BOOL)setCurrentPlaylist:(ITMTPlaylist *)playlist;
+
+- (BOOL)setValue:(id)value forProperty:(ITMTTrackProperty)property;
+- (id)valueOfProperty:(ITMTTrackProperty)property;
+- (NSDictionary *)propertiesAndValues;
+
+- (BOOL)setState:(ITMTTrackState)state;
+- (ITMTTrackState)state;
+@end
+
+@interface ITMTTrack : NSObject <ITMTTrack>
+@end
+
+@protocol ITMTEqualizer
+- (BOOL)writable;
+
+- (ITMTPlayer *)player;
+
+- (float)dBForLevel:(ITMTEqualizerLevel)level;
+- (BOOL)setdB:(float)dB forLevel:(ITMTEqualizerLevel)level;
+@end
+
+@interface ITMTEqualizer : NSObject <ITMTEqualizer>
+@end
\ No newline at end of file
index 8284318..f67ab66 100755 (executable)
@@ -2,5 +2,4 @@
 
 #import "ITMTRemote.h"
 
-@implementation ITMTRemote
-@end
+// Put Implementations of Default Classes Here Soon!
diff --git a/ITMTTrack.h b/ITMTTrack.h
deleted file mode 100755 (executable)
index 4f45307..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************
-    ITMTRemote 1.0 (MenuTunes Remotes)
-    ITMTTrack.h
-    
-    Responsibility:
-        Joseph Spiros <joseph.spiros@ithinksw.com>
-    
-    Copyright (c) 2002 - 2003 by iThink Software.
-    All Rights Reserved.
-****************************************/
-
-#import <Cocoa/Cocoa.h>
-
-#import <ITMTRemote/ITMTRemote.h>
-
-@protocol ITMTTrack
-- (BOOL)writable;
-
-- (BOOL)addToPlaylist:(ITMTPlaylist *)playlist;
-- (BOOL)addToPlaylist:(ITMTPlaylist *)playlist atIndex:(int)index;
-
-- (ITMTPlayer *)player;
-- (NSArray *)playlists;
-
-- (BOOL)setValue:(id)value forProperty:(ITMTTrackProperty)property; // setting nil as value removes value completely
-- (id)valueOfProperty:(ITMTTrackProperty)property;
-- (NSDictionary *)propertiesAndValues;
-@end
-
-@interface ITMTTrack : NSObject
-@end
\ No newline at end of file
diff --git a/ITMTTrack.m b/ITMTTrack.m
deleted file mode 100755 (executable)
index b8063fb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Copyright (c) 2002 - 2003 by iThink Software. All Rights Reserved. */
-
-#import "ITMTTrack.h"
-
-@implementation ITMTTrack
-@end