mas01mj@669
|
1 //
|
mas01mj@669
|
2 // AppController.h
|
mas01mj@669
|
3 // iAudioDB
|
mas01mj@669
|
4 //
|
mas01mj@669
|
5 // Created by Mike Jewell on 27/01/2010.
|
mas01mj@669
|
6 // Copyright 2010 __MyCompanyName__. All rights reserved.
|
mas01mj@669
|
7 //
|
mas01mj@669
|
8
|
mas01mj@669
|
9 #import <Cocoa/Cocoa.h>
|
mas01mj@669
|
10 #include <audioDB_API.h>
|
mas01mj@669
|
11
|
mas01mj@669
|
12 @interface AppController : NSObject {
|
mas01mj@669
|
13 adb_ptr db;
|
mas01mj@669
|
14 NSModalSession session;
|
mas01mj@669
|
15
|
mas01mj@669
|
16 NSString* dbName;
|
mas01mj@669
|
17 NSString* dbFilename;
|
mas01mj@669
|
18 NSString* plistFilename;
|
mas01mj@669
|
19 NSString* selectedKey;
|
mas01mj@669
|
20 NSString* selectedFilename;
|
mas01mj@669
|
21
|
mas01mj@669
|
22 IBOutlet NSTextField *statusField;
|
mas01mj@669
|
23 IBOutlet NSTableView *tracksView;
|
mas01mj@669
|
24 IBOutlet id mainWindow;
|
mas01mj@669
|
25
|
mas01mj@669
|
26 // Querying
|
mas01mj@669
|
27 IBOutlet NSTextField* queryKey;
|
mas01mj@669
|
28 IBOutlet NSButton* playBothButton;
|
mas01mj@669
|
29 IBOutlet NSButton* playResultButton;
|
mas01mj@669
|
30 IBOutlet NSButton* stopButton;
|
mas01mj@669
|
31 IBOutlet NSButton* chooseButton;
|
mas01mj@669
|
32
|
mas01mj@669
|
33 NSMutableArray* results;
|
mas01mj@669
|
34 NSDictionary* trackMap;
|
mas01mj@669
|
35
|
mas01mj@669
|
36 // Extracting
|
mas01mj@669
|
37 IBOutlet id importSheet;
|
mas01mj@669
|
38 IBOutlet NSBox* extractingBox;
|
mas01mj@669
|
39 IBOutlet NSMatrix* extractorOptions;
|
mas01mj@669
|
40 IBOutlet NSProgressIndicator* indicator;
|
mas01mj@669
|
41
|
mas01mj@669
|
42 // Playback
|
mas01mj@669
|
43 NSSound* queryTrack;
|
mas01mj@669
|
44 NSSound* resultTrack;
|
mas01mj@669
|
45
|
mas01mj@669
|
46 // Query param fields
|
mas01mj@669
|
47
|
mas01mj@669
|
48 /* To Come
|
mas01mj@669
|
49 IBOutlet id queryType;
|
mas01mj@669
|
50 IBOutlet NSTextField* queryStartField;
|
mas01mj@669
|
51 IBOutlet id queryTypeOptions;
|
mas01mj@669
|
52 IBOutlet NSTextField* queryLengthField;
|
mas01mj@669
|
53 IBOutlet NSTextField* queryRadiusField;
|
mas01mj@669
|
54 IBOutlet NSButtonCell* exhaustiveField;*/
|
mas01mj@669
|
55
|
mas01mj@669
|
56 }
|
mas01mj@669
|
57
|
mas01mj@669
|
58 // Menus
|
mas01mj@669
|
59 -(IBAction)newDatabase:(id)sender;
|
mas01mj@669
|
60 -(IBAction)openDatabase:(id)sender;
|
mas01mj@669
|
61 -(IBAction)selectFiles:(id)sender;
|
mas01mj@669
|
62
|
mas01mj@669
|
63 // Import
|
mas01mj@669
|
64 -(IBAction)importAudio:(id)sender;
|
mas01mj@669
|
65 -(IBAction)cancelImport:(id)sender;
|
mas01mj@669
|
66
|
mas01mj@669
|
67 // Buttons
|
mas01mj@669
|
68 -(IBAction)playBoth:(id)sender;
|
mas01mj@669
|
69 -(IBAction)playResult:(id)sender;
|
mas01mj@669
|
70 -(IBAction)stopPlay:(id)sender;
|
mas01mj@669
|
71 -(IBAction)chooseQuery:(id)sender;
|
mas01mj@669
|
72 -(IBAction)selectedChanged:(id)sender;
|
mas01mj@669
|
73
|
mas01mj@669
|
74
|
mas01mj@669
|
75 -(void)performQuery;
|
mas01mj@669
|
76 -(void)updateStatus;
|
mas01mj@669
|
77 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
|
mas01mj@669
|
78 - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)playbackSuccessful;
|
mas01mj@669
|
79
|
mas01mj@669
|
80 @end
|