#import <Cocoa/Cocoa.h>

#import <fcntl.h>
#import <sys/wait.h>

#import <IOKit/IOKitLib.h>
#import <IOKit/IOCFPlugIn.h>
#import <IOKit/scsi/SCSITaskLib.h>
#import <IOKit/IOBSD.h>
#import <IOKit/storage/IODVDMediaBSDClient.h>
#import <IOKit/storage/IOStorageDeviceCharacteristics.h>

// work around for <Kernel/IOKit/storage/IOCDBlockStorageDriver.h>
#ifndef kIODVDBlockStorageDriverClass
#define kIODVDBlockStorageDriverClass "IODVDBlockStorageDriver"
#endif

// work around for undefined symbols
#ifndef kIOPropertyVendorIdentificationKey
#define kIOPropertyVendorIdentificationKey "Vendor Identification"
#endif
#ifndef kIOPropertyProductIdentificationKey
#define kIOPropertyProductIdentificationKey "Product Identification"
#endif

enum {DirNone, DirIn, DirOut};
enum {Disk=0, Tape=1, Printer=2, Processor=3, WORM=4, CD=5, Scanner=6, Optical=7, MediumChanger=8, Communications=9, GraphicA=10, GraphicB=11, Enclosure=12, SimpleDisk=13, Card=14};

@interface Device : NSDocument {
	NSWindowController *windowController;
	SCSICmd_INQUIRY_StandardData inquiry;
	DVDRegionPlaybackControlInfo rpcquery;
}

+ (UInt32) ScanAll;
@end


@interface RegionController : NSObject
{
    IBOutlet id ChangesLeft;
    IBOutlet id Region;
    IBOutlet id ApplicationToLaunch;
    IBOutlet id OKButton;
}
- (void)awakeFromNib;
- (IBAction)ChangesLeftChanged:(id)sender;
- (IBAction)RegionChanged:(id)sender;
- (IBAction)Save:(id)sender;
- (IBAction)ReadMe:(id)sender;
- (IBAction)MacsAndRegionFree:(id)sender;
- (IBAction)AboutXvi:(id)sender;
- (IBAction)LaunchOption:(id)sender;
@end
