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@682
|
12
|
mas01mj@669
|
13 @interface AppController : NSObject {
|
mas01mj@682
|
14 adb_t *db;
|
mas01mj@669
|
15 NSModalSession session;
|
mas01mj@669
|
16
|
mas01mj@669
|
17 NSString* dbName;
|
mas01mj@669
|
18 NSString* dbFilename;
|
mas01mj@669
|
19 NSString* plistFilename;
|
mas01mj@669
|
20 NSString* selectedKey;
|
mas01mj@669
|
21 NSString* selectedFilename;
|
mas01mj@669
|
22
|
mas01mj@669
|
23 IBOutlet NSTextField *statusField;
|
mas01mj@669
|
24 IBOutlet NSTableView *tracksView;
|
mas01mj@669
|
25 IBOutlet id mainWindow;
|
mas01mj@669
|
26
|
mas01mj@669
|
27 // Querying
|
mas01mj@669
|
28 IBOutlet NSTextField* queryKey;
|
mas01mj@669
|
29 IBOutlet NSButton* playBothButton;
|
mas01mj@669
|
30 IBOutlet NSButton* playResultButton;
|
mas01mj@669
|
31 IBOutlet NSButton* stopButton;
|
mas01mj@669
|
32 IBOutlet NSButton* chooseButton;
|
mas01mj@669
|
33
|
mas01mj@669
|
34 NSMutableArray* results;
|
mas01mj@669
|
35 NSDictionary* trackMap;
|
mas01mj@685
|
36 NSDictionary* dbState;
|
mas01mj@685
|
37
|
mas01mj@685
|
38 // Creating
|
mas01mj@685
|
39 IBOutlet id createSheet;
|
mas01mj@685
|
40 IBOutlet NSMatrix* extractorOptions;
|
mas01mj@685
|
41 IBOutlet NSTextField* windowSizeField;
|
mas01mj@685
|
42 IBOutlet NSTextField* hopSizeField;
|
mas01mj@685
|
43 IBOutlet NSTextField* maxTracksField;
|
mas01mj@685
|
44 IBOutlet NSTextField* maxLengthField;
|
mas01mj@669
|
45
|
mas01mj@669
|
46 // Extracting
|
mas01mj@669
|
47 IBOutlet id importSheet;
|
mas01mj@669
|
48 IBOutlet NSProgressIndicator* indicator;
|
mas01mj@669
|
49
|
mas01mj@669
|
50 // Playback
|
mas01mj@669
|
51 NSSound* queryTrack;
|
mas01mj@669
|
52 NSSound* resultTrack;
|
mas01mj@669
|
53
|
mas01mj@685
|
54
|
mas01mj@685
|
55
|
mas01mj@669
|
56 // Query param fields
|
mas01mj@669
|
57
|
mas01mj@669
|
58 /* To Come
|
mas01mj@669
|
59 IBOutlet id queryType;
|
mas01mj@669
|
60 IBOutlet NSTextField* queryStartField;
|
mas01mj@669
|
61 IBOutlet id queryTypeOptions;
|
mas01mj@669
|
62 IBOutlet NSTextField* queryLengthField;
|
mas01mj@669
|
63 IBOutlet NSTextField* queryRadiusField;
|
mas01mj@669
|
64 IBOutlet NSButtonCell* exhaustiveField;*/
|
mas01mj@669
|
65 }
|
mas01mj@669
|
66
|
mas01mj@669
|
67 // Menus
|
mas01mj@669
|
68 -(IBAction)newDatabase:(id)sender;
|
mas01mj@669
|
69 -(IBAction)openDatabase:(id)sender;
|
mas01mj@669
|
70
|
mas01mj@669
|
71 // Import
|
mas01mj@669
|
72 -(IBAction)importAudio:(id)sender;
|
mas01mj@685
|
73 // -(IBAction)cancelImport:(id)sender;
|
mas01mj@685
|
74
|
mas01mj@685
|
75 // Create
|
mas01mj@685
|
76
|
mas01mj@685
|
77 -(IBAction)cancelCreate:(id)sender;
|
mas01mj@685
|
78 -(IBAction)createDatabase:(id)sender;
|
mas01mj@669
|
79
|
mas01mj@669
|
80 // Buttons
|
mas01mj@669
|
81 -(IBAction)playBoth:(id)sender;
|
mas01mj@669
|
82 -(IBAction)playResult:(id)sender;
|
mas01mj@669
|
83 -(IBAction)stopPlay:(id)sender;
|
mas01mj@669
|
84 -(IBAction)chooseQuery:(id)sender;
|
mas01mj@669
|
85 -(IBAction)selectedChanged:(id)sender;
|
mas01mj@684
|
86 -(IBAction)tableDoubleClick:(id)sender;
|
mas01mj@669
|
87
|
mas01mj@669
|
88 -(void)performQuery;
|
mas01mj@669
|
89 -(void)updateStatus;
|
mas01mj@669
|
90 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
|
mas01mj@669
|
91 - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)playbackSuccessful;
|
mas01mj@669
|
92
|
mas01mj@669
|
93 @end
|