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@669
|
36
|
mas01mj@669
|
37 // Extracting
|
mas01mj@669
|
38 IBOutlet id importSheet;
|
mas01mj@669
|
39 IBOutlet NSBox* extractingBox;
|
mas01mj@669
|
40 IBOutlet NSMatrix* extractorOptions;
|
mas01mj@669
|
41 IBOutlet NSProgressIndicator* indicator;
|
mas01mj@669
|
42
|
mas01mj@669
|
43 // Playback
|
mas01mj@669
|
44 NSSound* queryTrack;
|
mas01mj@669
|
45 NSSound* resultTrack;
|
mas01mj@669
|
46
|
mas01mj@669
|
47 // Query param fields
|
mas01mj@669
|
48
|
mas01mj@669
|
49 /* To Come
|
mas01mj@669
|
50 IBOutlet id queryType;
|
mas01mj@669
|
51 IBOutlet NSTextField* queryStartField;
|
mas01mj@669
|
52 IBOutlet id queryTypeOptions;
|
mas01mj@669
|
53 IBOutlet NSTextField* queryLengthField;
|
mas01mj@669
|
54 IBOutlet NSTextField* queryRadiusField;
|
mas01mj@669
|
55 IBOutlet NSButtonCell* exhaustiveField;*/
|
mas01mj@669
|
56
|
mas01mj@669
|
57 }
|
mas01mj@669
|
58
|
mas01mj@669
|
59 // Menus
|
mas01mj@669
|
60 -(IBAction)newDatabase:(id)sender;
|
mas01mj@669
|
61 -(IBAction)openDatabase:(id)sender;
|
mas01mj@669
|
62 -(IBAction)selectFiles:(id)sender;
|
mas01mj@669
|
63
|
mas01mj@669
|
64 // Import
|
mas01mj@669
|
65 -(IBAction)importAudio:(id)sender;
|
mas01mj@669
|
66 -(IBAction)cancelImport:(id)sender;
|
mas01mj@669
|
67
|
mas01mj@669
|
68 // Buttons
|
mas01mj@669
|
69 -(IBAction)playBoth:(id)sender;
|
mas01mj@669
|
70 -(IBAction)playResult:(id)sender;
|
mas01mj@669
|
71 -(IBAction)stopPlay:(id)sender;
|
mas01mj@669
|
72 -(IBAction)chooseQuery:(id)sender;
|
mas01mj@669
|
73 -(IBAction)selectedChanged:(id)sender;
|
mas01mj@669
|
74
|
mas01mj@669
|
75
|
mas01mj@669
|
76 -(void)performQuery;
|
mas01mj@669
|
77 -(void)updateStatus;
|
mas01mj@669
|
78 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
|
mas01mj@669
|
79 - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)playbackSuccessful;
|
mas01mj@669
|
80
|
mas01mj@669
|
81 @end
|