1 /* vim: set ft=objc ts=4 nowrap: */ 2 /* 3 * Player.h 4 * 5 * Copyright (c) 1999 - 2003 6 * 7 * Author: ACKyugo <ackyugo@geocities.co.jp> 8 * Andreas Schik <andreas@schik.de> 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 25 #ifndef __PLAYER_H_INCLUDED 26 #define __PLAYER_H_INCLUDED 27 28 #include <AppKit/AppKit.h> 29 30 #include <AudioCD/AudioCDProtocol.h> 31 32 @class NSTimer; 33 @class LED; 34 35 36 @interface Player : NSObject<CDHandlerProtocol> 37 { 38 Class audiocdClass; 39 id<AudioCDProtocol> drive; 40 41 NSTimer *timer; 42 43 int track; 44 BOOL present; 45 BOOL autoPlay; 46 47 NSWindow *window; 48 LED *led; 49 NSButton *prev; 50 NSButton *play; 51 NSButton *pause; 52 NSButton *stop; 53 NSButton *next; 54 } 55 56 - init; 57 - (void) buildInterface; 58 59 - (BOOL) loadAudioCDBundle; 60 61 - (void) stop: (id)sender; 62 - (void) eject: (id)sender; 63 64 - (void) playTrack: (NSNotification *)not; 65 66 // 67 // services methods 68 // 69 70 - (void) getTOC: (NSPasteboard *) pboard 71 userData: (NSString *) userData 72 error: (NSString **) error; 73 74 - (void) playCD: (NSPasteboard *) pboard 75 userData: (NSString *) userData 76 error: (NSString **) error; 77 78 // 79 // class methods 80 // 81 + (Player *) sharedPlayer; 82 83 @end 84 85 #endif 86