A couple more modifications, as well as some comments to ease others'
[MenuTunes.git] / ITMTRemote.h
index be50925..aedbc4d 100755 (executable)
-/*
- *  MenuTunes
- *  ITMTRemote
- *    Plugin definition for audio player control via MenuTunes
- *
- *  Original Author : Matt Judy <mjudy@ithinksw.com>
- *   Responsibility : Matt Judy <mjudy@ithinksw.com>
- *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
- *
- *     This header defines the Objective-C protocol which all MenuTunes Remote
- *  plugins must implement.  To build a remote, create a subclass of this
- *  object, and implement each method in the @protocol below.
- *
- */
-
-/*
- * TO DO:
- *
- * - Capability methods
- *
- */
-
-/*! @header ITMTRemote
- *  @abstract Declares the necessary protocol and class to implement a MenuTunes Remote.
- */
+/****************************************
+    ITMTRemote 1.0 (MenuTunes Remotes)
+    ITMTRemote.h
+    
+    Responsibility:
+        Joseph Spiros <joseph.spiros@ithinksw.com>
+    
+    Copyright (c) 2002 - 2003 by iThink Software.
+    All Rights Reserved.
+****************************************/
 
 #import <Cocoa/Cocoa.h>
 
 
 #import <Cocoa/Cocoa.h>
 
-/*! @protocol ITMTRemote
- *  @abstract Declares what a MenuTunes Remote must be able to do.
- *  @discussion A MenuTunes Remote must be able to return and change state information.
- */
+#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,
+    ITMTRemoteAuthorProperty,
+    ITMTRemoteDescriptionProperty,
+    ITMTRemoteURLProperty,
+    ITMTRemoteCopyrightProperty,
+    ITMTRemoteActivationStringProperty,
+    ITMTRemoteDeactivationStringProperty
+} ITMTRemoteProperty
+/*!
+    @typedef ITMTPlayerStyle
+    @constant ITMTSinglePlayerStyle Like iTunes, One player controls all available songs.
+    @constant ITMTMultiplePlayerStyle Like Audion, Multiple players control multiple playlists.
+    @constant ITMTSinglePlayerSinglePlaylistStyle Like *Amp, XMMS. Not recommended, but instead, developers are urged to use ITMTSinglePlayerStyle with emulated support for multiple playlists.
+*/
+typedef enum {
+    ITMTSinglePlayerStyle,
+    ITMTMultiplePlayerStyle,
+    ITMTSinglePlayerSinglePlaylistStyle
+} ITMTPlayerStyle;
+
+/*!
+    @protocol ITMTRemote
+    @abstract The ITMTRemote protocol is the protocol that all MenuTunes remotes' primary class must implement.
+*/
 @protocol ITMTRemote
 @protocol ITMTRemote
-
-
-/*! @method remote
- *  @abstract Returns an autoreleased instance of the remote.
- *  @discussion Should be very quick and compact.
- *  EXAMPLE:
- *    + (id)remote
- *    {
- *        return [[[MyRemote alloc] init] autorelease];
- *    }
- *  @result The instance.
- */
+/*!
+    @method remote
+    @result Returns an autoreleased instance of the remote.
+*/
 + (id)remote;
 
 + (id)remote;
 
-/*! @method title:
- *  @abstract Returns an autoreleased instance of the remote.
- *  @result An NSString containing the title.
- */
-- (NSString *)title;
-
-/*! @method description:
- *  @abstract Returns a description of the remote.
- *  @result An NSString containing the description.
- */
-- (NSString *)information;
-
-/*! @method icon:
- *  @abstract Returns a icon for the remote.
- *  @result An NSImage containing the icon.
- */
-- (NSImage *)icon;
-
-/*! @method begin:
- *  @abstract Sent when the plugin should begin operation.
- *  @result A result code signifying success.
- */
-- (BOOL)begin;
-
-/*! @method halt:
- *  @abstract Sent when the plugin should cease operation.
- *  @result A result code signifying success.
- */
-- (BOOL)halt;
-
-- (int)numberOfPlaylists;
-- (int)numberOfSongsInPlaylistAtIndex:(int)index;
-- (NSString *)classOfPlaylistAtIndex:(int)index;
-- (int)currentPlaylistIndex;
-
-- (NSString *)songTitleAtIndex:(int)index;
-- (int)currentSongIndex;
-
-- (NSString *)currentSongTitle;
-- (NSString *)currentSongArtist;
-- (NSString *)currentSongAlbum;
-- (NSString *)currentSongGenre;
-- (NSString *)currentSongLength;
-- (NSString *)currentSongRemaining;
-
-- (NSArray *)eqPresets;
-
-- (BOOL)play;
-- (BOOL)pause;
-- (BOOL)goToNextSong;
-- (BOOL)goToPreviousSong;
-
-- (BOOL)switchToPlaylistAtIndex:(int)index;
-- (BOOL)switchToSongAtIndex:(int)index;
-- (BOOL)switchToEQAtIndex:(int)index;
-
+/*!
+    @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.
+*/
+- (NSArray *)players;
 @end
 
 @end
 
-
+/*!
+    @class ITMTRemote
+*/
 @interface ITMTRemote : NSObject <ITMTRemote>
 @interface ITMTRemote : NSObject <ITMTRemote>
-
 @end
 @end