Transitioned over to the plugins almost completely.
[MenuTunes.git] / ITMTRemote.h
1 /*
2  *  MenuTunes
3  *  ITMTRemote
4  *    Plugin definition for audio player control via MenuTunes
5  *
6  *  Original Author : Matt Judy <mjudy@ithinksw.com>
7  *   Responsibility : Matt Judy <mjudy@ithinksw.com>
8  *
9  *  Copyright (c) 2002 - 2003 iThink Software.
10  *  All Rights Reserved
11  *
12  *      This header defines the Objective-C protocol which all MenuTunes Remote
13  *  plugins must implement.  To build a remote, create a subclass of this
14  *  object, and implement each method in the @protocol below.
15  *
16  */
17
18 /*
19  * TO DO:
20  *
21  * - Capability methods
22  *
23  */
24
25 /*! @header ITMTRemote
26  *  @abstract Declares the necessary protocol and class to implement a MenuTunes Remote.
27  */
28
29 #import <Cocoa/Cocoa.h>
30
31 /*! @protocol ITMTRemote
32  *  @abstract Declares what a MenuTunes Remote must be able to do.
33  *  @discussion A MenuTunes Remote must be able to return and change state information.
34  */
35 @protocol ITMTRemote
36
37
38 /*! @method remote
39  *  @abstract Returns an autoreleased instance of the remote.
40  *  @discussion Should be very quick and compact.
41  *  EXAMPLE:
42  *    + (id)remote
43  *    {
44  *        return [[[MyRemote alloc] init] autorelease];
45  *    }
46  *  @result The instance.
47  */
48 + (id)remote;
49
50 /*! @method title:
51  *  @abstract Returns an autoreleased instance of the remote.
52  *  @result An NSString containing the title.
53  */
54 - (NSString *)title;
55
56 /*! @method description:
57  *  @abstract Returns a description of the remote.
58  *  @result An NSString containing the description.
59  */
60 - (NSString *)information;
61
62 /*! @method icon:
63  *  @abstract Returns a icon for the remote.
64  *  @result An NSImage containing the icon.
65  */
66 - (NSImage *)icon;
67
68 /*! @method begin:
69  *  @abstract Sent when the plugin should begin operation.
70  *  @result A result code signifying success.
71  */
72 - (BOOL)begin;
73
74 /*! @method halt:
75  *  @abstract Sent when the plugin should cease operation.
76  *  @result A result code signifying success.
77  */
78 - (BOOL)halt;
79
80 - (NSArray *)playlists;
81 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
82 - (NSString *)classOfPlaylistAtIndex:(int)index;
83 - (int)currentPlaylistIndex;
84
85 - (NSString *)songTitleAtIndex:(int)index;
86 - (int)currentSongIndex;
87
88 - (NSString *)currentSongTitle;
89 - (NSString *)currentSongArtist;
90 - (NSString *)currentSongAlbum;
91 - (NSString *)currentSongGenre;
92 - (NSString *)currentSongLength;
93 - (NSString *)currentSongRemaining;
94
95 - (NSArray *)eqPresets;
96 - (int)currentEQPresetIndex;
97
98 - (BOOL)play;
99 - (BOOL)pause;
100 - (BOOL)goToNextSong;
101 - (BOOL)goToPreviousSong;
102
103 - (BOOL)switchToPlaylistAtIndex:(int)index;
104 - (BOOL)switchToSongAtIndex:(int)index;
105 - (BOOL)switchToEQAtIndex:(int)index;
106
107 @end
108
109
110 @interface ITMTRemote : NSObject <ITMTRemote>
111
112 @end