1 /* vim: set ft=objc ts=4 nowrap: */
2 /*
3  *  TrackList.h
4  *
5  *  Copyright (c) 2003
6  *
7  *  Author: Andreas Schik <andreas@schik.de>
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software
21  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23 
24 #ifndef __TRACKLIST_H_INCLUDED
25 #define __TRACKLIST_H_INCLUDED
26 
27 
28 #include <AppKit/AppKit.h>
29 
30 @interface TrackList : NSObject
31 {
32   id window;
33   id titleField;
34   id trackListView;
35 
36 	int playsTrack;
37 	NSMutableDictionary *toc;
38 	NSString *artist;
39 	NSString *title;
40 }
41 
42 - (id) init;
43 - (id) initWithNibName: (NSString *) nibName;
44 
45 - (void) activate;
46 - (BOOL) isVisible;
47 
48 - (void) setTOC: (NSDictionary *) newTOC;
49 - (void) setPlaysTrack: (int) track;
50 
51 - (void)queryCddb:(id)sender;
52 - (NSString *)createCddbQuery: (NSDictionary *) theTOC;
53 - (void) saveCddbResultInCache: (NSString *) discid cdInfo: (NSDictionary *) cdInfo;
54 /**
55  * <p>Tries to retrieve cached cddb data for a CD from the local cache.
56  * This method is executed exactly once when the CD has been detected.</p>
57  * <br />
58  * <strong>Inputs</strong><br />
59  * <deflist>
60  * <term>discid</term>
61  * <desc>The cddb ID for the CD.</desc>
62  * </deflist>
63  */
64 - (NSDictionary *) getCddbResultFromCache: (NSString *) discid;
65 
66 - (int) numberOfTracksInTOC;
67 
68 - (id)validRequestorForSendType: (NSString *) sendType
69             returnType: (NSString *) returnType;
70 
71 - (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard
72 			types:(NSArray *)types;
73 
74 //
75 // class methods
76 //
77 + (void)initialize;
78 + (id) sharedTrackList;
79 
80 @end
81 
82 #endif
83