Added/removed some methods.
[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 - (int)numberOfSongsInPlaylistAtIndex:(int)index;
81 - (NSString *)classOfPlaylistAtIndex:(int)index;
82 - (int)currentPlaylistIndex;
83
84 - (NSString *)songTitleAtIndex:(int)index;
85 - (int)currentSongIndex;
86
87 - (NSString *)currentSongTitle;
88 - (NSString *)currentSongArtist;
89 - (NSString *)currentSongAlbum;
90 - (NSString *)currentSongGenre;
91 - (NSString *)currentSongLength;
92 - (NSString *)currentSongRemaining;
93
94 - (NSArray *)eqPresets;
95
96 - (BOOL)play;
97 - (BOOL)pause;
98 - (BOOL)goToNextSong;
99 - (BOOL)goToPreviousSong;
100
101 - (BOOL)switchToPlaylistAtIndex:(int)index;
102 - (BOOL)switchToSongAtIndex:(int)index;
103 - (BOOL)switchToEQAtIndex:(int)index;
104
105 @end
106
107
108 @interface ITMTRemote : NSObject <ITMTRemote>
109
110 @end