Replacement of all comments with HeaderDoc
[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
36 @protocol ITMTRemote
37 /*! @method remote
38  *  @abstract Returns an autoreleased instance of the remote.
39  *  @discussion Should be very quick and compact.
40  *  EXAMPLE:
41  *    + (id)remote
42  *    {
43  *        return [[[MyRemote alloc] init] autorelease];
44  *    }
45  *  @result The instance.
46  */
47 + (id)remote;
48
49 /*! @method title:
50  *  @abstract Returns an autoreleased instance of the remote.
51  *  @result An NSString containing the title.
52  */
53 - (NSString *)title;
54
55 /*! @method description:
56  *  @abstract Returns a description of the remote.
57  *  @result An NSString containing the description.
58  */
59 - (NSString *)description;
60
61 /*! @method icon:
62  *  @abstract Returns a icon for the remote.
63  *  @result An NSImage containing the icon.
64  */
65 - (NSImage *)icon;
66
67 /*! @method begin:
68  *  @abstract Sent when the plugin should begin operation.
69  *  @result A result code signifying success.
70  */
71 - (BOOL)begin;
72
73 /*! @method halt:
74  *  @abstract Sent when the plugin should cease operation.
75  *  @result A result code signifying success.
76  */
77 - (BOOL)halt;
78
79 - (NSArray *)sources;
80 - (int)currentSourceIndex;
81
82 - (NSArray *)playlistsForCurrentSource;
83 - (int)currentPlaylistIndex;
84
85 - (NSString *)songTitleAtIndex;
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
97 - (BOOL)play;
98 - (BOOL)pause;
99 - (BOOL)goToNextSong;
100 - (BOOL)goToPreviousSong;
101 - (BOOL)goToNextPlaylist;
102 - (BOOL)goToPreviousPlaylist;
103
104 - (BOOL)switchToSourceAtIndex:(int)index;
105 - (BOOL)switchToPlaylistAtIndex:(int)index;
106 - (BOOL)switchToSongAtIndex:(int)index;
107 - (BOOL)switchToEQAtIndex:(int)index;
108
109 @end
110
111
112 @interface ITMTRemote : NSObject <ITMTRemote>
113
114 @end