| 1 | /* |
|---|
| 2 | * QEMU Cocoa Control PC Editor Window |
|---|
| 3 | * |
|---|
| 4 | * Copyright (c) 2005, 2006 Mike Kronenberg |
|---|
| 5 | * |
|---|
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
|---|
| 7 | * of this software and associated documentation files (the "Software"), to deal |
|---|
| 8 | * in the Software without restriction, including without limitation the rights |
|---|
| 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|---|
| 10 | * copies of the Software, and to permit persons to whom the Software is |
|---|
| 11 | * furnished to do so, subject to the following conditions: |
|---|
| 12 | * |
|---|
| 13 | * The above copyright notice and this permission notice shall be included in |
|---|
| 14 | * all copies or substantial portions of the Software. |
|---|
| 15 | * |
|---|
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|---|
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|---|
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|---|
| 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|---|
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|---|
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|---|
| 22 | * THE SOFTWARE. |
|---|
| 23 | */ |
|---|
| 24 | |
|---|
| 25 | #import <Cocoa/Cocoa.h> |
|---|
| 26 | |
|---|
| 27 | @interface cocoaControlEditPC : NSObject |
|---|
| 28 | { |
|---|
| 29 | IBOutlet id editPCPanel; |
|---|
| 30 | IBOutlet id viewGeneral; |
|---|
| 31 | IBOutlet id viewHardware; |
|---|
| 32 | IBOutlet id viewAdvanced; |
|---|
| 33 | IBOutlet id viewNetwork; |
|---|
| 34 | IBOutlet id firewallPortTable; |
|---|
| 35 | IBOutlet id firewallPortEditPanel; |
|---|
| 36 | IBOutlet NSTextField *textFieldName; |
|---|
| 37 | IBOutlet NSTextField *textFieldRAM; |
|---|
| 38 | IBOutlet NSTextField *textFieldAppend; |
|---|
| 39 | IBOutlet NSTextField *textFieldArguments; |
|---|
| 40 | IBOutlet NSTextField *textFieldFirewallPortName; |
|---|
| 41 | IBOutlet NSTextField *textFieldFirewallPortHostPorts; |
|---|
| 42 | IBOutlet NSTextField *textFieldFirewallPortGuestPorts; |
|---|
| 43 | IBOutlet NSTextField *textFieldFirewallPortError; |
|---|
| 44 | IBOutlet NSPopUpButton *popUpButtonSmbFilesharing; |
|---|
| 45 | IBOutlet NSPopUpButton *popUpButtonVGA; |
|---|
| 46 | IBOutlet NSPopUpButton *popUpButtonCPU; |
|---|
| 47 | IBOutlet NSPopUpButton *popUpButtonSMP; |
|---|
| 48 | IBOutlet NSPopUpButton *popUpButtonFda; |
|---|
| 49 | IBOutlet NSPopUpButton *popUpButtonHda; |
|---|
| 50 | IBOutlet NSPopUpButton *popUpButtonHdb; |
|---|
| 51 | IBOutlet NSPopUpButton *popUpButtonHdc; |
|---|
| 52 | IBOutlet NSPopUpButton *popUpButtonHdd; |
|---|
| 53 | IBOutlet NSPopUpButton *popUpButtonCdrom; |
|---|
| 54 | IBOutlet NSPopUpButton *popUpButtonBoot; |
|---|
| 55 | IBOutlet NSPopUpButton *popUpButtonKernel; |
|---|
| 56 | IBOutlet NSPopUpButton *popUpButtonInitrd; |
|---|
| 57 | IBOutlet NSPopUpButton *popUpButtonFirewallAdditionalPorts; |
|---|
| 58 | IBOutlet NSPopUpButton *popUpButtonFirewallServiceType; |
|---|
| 59 | IBOutlet NSButton *buttonEnableAdlib; |
|---|
| 60 | IBOutlet NSButton *buttonEnableSB16; |
|---|
| 61 | IBOutlet NSButton *buttonEnableES1370; |
|---|
| 62 | IBOutlet NSButton *buttonEnableUSBTablet; |
|---|
| 63 | IBOutlet NSButton *buttonNetNicNe2000; |
|---|
| 64 | IBOutlet NSButton *buttonNetNicRtl8139; |
|---|
| 65 | IBOutlet NSButton *buttonNetNicPcnet; |
|---|
| 66 | IBOutlet NSButton *buttonNetUser; |
|---|
| 67 | IBOutlet NSButton *buttonLocaltime; |
|---|
| 68 | IBOutlet NSButton *buttonWMStopWhenInactive; |
|---|
| 69 | IBOutlet NSButton *buttonQWinDrivers; |
|---|
| 70 | IBOutlet NSButton *buttonWin2kHack; |
|---|
| 71 | IBOutlet NSButton *buttonOk; |
|---|
| 72 | IBOutlet NSButton *buttonFirewallSavePort; |
|---|
| 73 | id customImagePopUpButtonTemp; |
|---|
| 74 | int customImageSizeHda; |
|---|
| 75 | int customImageSizeHdb; |
|---|
| 76 | int customImageSizeHdc; |
|---|
| 77 | int customImageSizeHdd; |
|---|
| 78 | NSString *customImageTypeHda; |
|---|
| 79 | NSString *customImageTypeHdb; |
|---|
| 80 | NSString *customImageTypeHdc; |
|---|
| 81 | NSString *customImageTypeHdd; |
|---|
| 82 | NSUserDefaults *userDefaults; |
|---|
| 83 | id qSender; |
|---|
| 84 | NSMutableDictionary *thisPC; |
|---|
| 85 | } |
|---|
| 86 | NSMutableArray *firewallPortList; |
|---|
| 87 | BOOL firewallPortTableEnabled; |
|---|
| 88 | - (NSPanel *) editPCPanel; |
|---|
| 89 | - (void) prepareEditPCPanel:(NSMutableDictionary *)aPC newPC:(BOOL)newPC sender:(id)sender; |
|---|
| 90 | - (IBAction) genericFolderSelectPanel:(id)sender; |
|---|
| 91 | - (IBAction) genericImageSelectPanel:(id)sender; |
|---|
| 92 | - (IBAction) menuItemNewImage:(id)sender; |
|---|
| 93 | - (IBAction) closeEditPCPanel:(id)sender; |
|---|
| 94 | - (IBAction) editPCEditPCPanel:(id)sender; |
|---|
| 95 | - (void) setCustomDIType:(NSString *)string size:(int)size; |
|---|
| 96 | - (IBAction) showHelp:(id)sender; |
|---|
| 97 | - (NSString *) createDI:(NSString *)type withSize:(int)size; |
|---|
| 98 | - (void)initFirewallSettings; |
|---|
| 99 | - (IBAction) startShowNewPort:(id)sender; |
|---|
| 100 | - (IBAction) startShowEditPort:(id)sender; |
|---|
| 101 | - (void) startEditPort:(BOOL)newPort; |
|---|
| 102 | - (IBAction) deletePort:(id)sender; |
|---|
| 103 | - (IBAction) setAdditionalPort:(id)sender; |
|---|
| 104 | - (IBAction) saveNewPort:(id)sender; |
|---|
| 105 | - (IBAction) saveEditPort:(id)sender; |
|---|
| 106 | - (BOOL) checkPort:(BOOL)newPort; |
|---|
| 107 | - (IBAction) endEditPort:(id)sender; |
|---|
| 108 | - (void) saveFirewallPortList; |
|---|
| 109 | - (NSString *) constructFirewallArguments; |
|---|
| 110 | @end |
|---|