Adding initial work on new plugin API. THIS BREAKS MT. We are working to
[MenuTunes.git] / ITMTRemote.h
1 /****************************************
2     ITMTRemote 1.0 (MenuTunes Remotes)
3     ITMTRemote.h
4     
5     Responsibility:
6         Joseph Spiros <joseph.spiros@ithinksw.com>
7     
8     Copyright (c) 2002 - 2003 by iThink Software.
9     All Rights Reserved.
10 ****************************************/
11
12 #import <Cocoa/Cocoa.h>
13
14 #import <ITMTRemote/ITMTPlayer.h>
15 #import <ITMTRemote/ITMTPlaylist.h>
16 #import <ITMTRemote/ITMTTrack.h>
17 #import <ITMTRemote/ITMTEqualizer.h>
18
19 /*!
20     @typedef ITMTGenericProperty
21     @constant ITMTNameProperty The object's human readable name.
22     @constant ITMTImageProperty An image that can be associated with the object.
23 */
24 typedef enum {
25     ITMTNameProperty,
26     ITMTImageProperty
27 } ITMTGenericProperty;
28 /*!
29     @typedef ITMTRemoteProperty
30     @constant ITMTRemoteNameProperty
31     @constant ITMTRemoteImageProperty
32     @constant ITMTRemoteAuthorProperty
33     @constant ITMTRemoteDescriptionProperty
34     @constant ITMTRemoteURLProperty
35     @constant ITMTRemoteCopyrightProperty
36 */
37 typedef enum {
38     ITMTRemoteNameProperty,
39     ITMTRemoteImageProperty,
40     ITMTRemoteAuthorProperty,
41     ITMTRemoteDescriptionProperty,
42     ITMTRemoteURLProperty,
43     ITMTRemoteCopyrightProperty,
44     ITMTRemoteActivationStringProperty,
45     ITMTRemoteDeactivationStringProperty
46 } ITMTRemoteProperty
47 /*!
48     @typedef ITMTPlayerStyle
49     @constant ITMTSinglePlayerStyle Like iTunes, One player controls all available songs.
50     @constant ITMTMultiplePlayerStyle Like Audion, Multiple players control multiple playlists.
51     @constant ITMTSinglePlayerSinglePlaylistStyle Like *Amp, XMMS. Not recommended, but instead, developers are urged to use ITMTSinglePlayerStyle with emulated support for multiple playlists.
52 */
53 typedef enum {
54     ITMTSinglePlayerStyle,
55     ITMTMultiplePlayerStyle,
56     ITMTSinglePlayerSinglePlaylistStyle
57 } ITMTPlayerStyle;
58
59 /*!
60     @protocol ITMTRemote
61     @abstract The ITMTRemote protocol is the protocol that all MenuTunes remotes' primary class must implement.
62 */
63 @protocol ITMTRemote
64 /*!
65     @method remote
66     @result Returns an autoreleased instance of the remote.
67 */
68 + (id)remote;
69
70 /*!
71     @method valueOfProperty:
72 */
73 - (id)valueOfProperty:(ITMTRemoteProperty)property;
74
75 /*!
76     @method propertiesAndValues
77 */
78 - (NSDictionary *)propertiesAndValues;
79
80 /*!
81     @method playerStyle
82     @result An ITMTPlayerStyle defining how the remote works with players and playlists.
83 */
84 - (ITMTPlayerStyle)playerStyle;
85
86 /*!
87     @method activate
88     @result A BOOL indicating success or failure.
89 */
90 - (BOOL)activate;
91 /*!
92     @method deactivate
93     @result A BOOL indicating success or failure.
94 */
95 - (BOOL)deactivate;
96
97 /*!
98     @method currentPlayer
99     @result An ITMTPlayer object representing the currently active player that the remote is controlling.
100 */
101 - (ITMTPlayer *)currentPlayer
102 /*!
103     @method players
104     @result An NSArray filled with ITMTPlayer objects.
105 */
106 - (NSArray *)players;
107 @end
108
109 /*!
110     @class ITMTRemote
111 */
112 @interface ITMTRemote : NSObject <ITMTRemote>
113 @end