IOSCSITargetDevice.h [plain text]
#ifndef _IOKIT_IO_SCSI_TARGET_DEVICE_H_
#define _IOKIT_IO_SCSI_TARGET_DEVICE_H_
#include <IOKit/IOLib.h>
#include <IOKit/IOService.h>
#include <IOKit/IOSyncer.h>
#include <IOKit/scsi-commands/IOSCSIPrimaryCommandsDevice.h>
#include <IOKit/scsi-commands/SCSICmds_INQUIRY_Definitions.h>
#include <IOKit/scsi-commands/IOSCSIPeripheralDeviceNub.h>
class IOSCSITargetDevice : public IOSCSIPrimaryCommandsDevice
{
OSDeclareDefaultStructors ( IOSCSITargetDevice )
protected:
bool InitializeDeviceSupport ( void );
void StartDeviceSupport ( void );
void SuspendDeviceSupport ( void );
void ResumeDeviceSupport ( void );
void StopDeviceSupport ( void );
void TerminateDeviceSupport ( void );
UInt32 GetNumberOfPowerStateTransitions ( void );
bool ClearNotReadyStatus ( void );
void RetrieveCharacteristicsFromProvider( void );
bool DetermineTargetCharacteristics( void );
bool VerifyTargetPresence( void );
bool SetCharacteristicsFromINQUIRY( SCSICmd_INQUIRY_StandardDataAll * inquiryBuffer );
bool RetrieveReportLUNsData(
SCSILogicalUnitNumber logicalUnit,
UInt8 * dataBuffer,
UInt8 dataSize );
UInt64 DetermineMaximumLogicalUnitNumber( void );
bool VerifyLogicalUnitPresence( SCSILogicalUnitNumber theLogicalUnit );
bool CreateLogicalUnit( SCSILogicalUnitNumber theLogicalUnit );
bool RetrieveDefaultINQUIRYData(
SCSILogicalUnitNumber logicalUnit,
UInt8 * inquiryBuffer,
UInt8 inquirySize );
bool RetrieveINQUIRYDataPage(
SCSILogicalUnitNumber logicalUnit,
UInt8 * inquiryBuffer,
UInt8 inquiryPage,
UInt8 inquirySize );
void PublishDeviceIdentification( void );
virtual UInt32 GetInitialPowerState ( void );
virtual void HandlePowerChange ( void );
virtual void HandleCheckPowerState ( void );
virtual void TicklePowerManager ( void );
private:
struct IOSCSITargetDeviceExpansionData { };
IOSCSITargetDeviceExpansionData * fIOSCSITargetDeviceReserved;
OSSet * fClients;
UInt8 fTargetPeripheralDeviceType;
UInt8 fTargetANSIVersion;
bool fTargetHasHiSup;
bool fTargetHasSCCS;
bool fTargetHasEncServs;
bool fTargetHasMultiPorts;
bool fTargetHasMChanger;
bool handleOpen( IOService * client,
IOOptionBits options,
void * arg );
void handleClose( IOService * client,
IOOptionBits options );
bool handleIsOpen( const IOService * client ) const;
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 1 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 2 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 3 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 4 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 5 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 6 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 7 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 8 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 9 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 10 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 11 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 12 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 13 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 14 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 15 );
OSMetaClassDeclareReservedUnused ( IOSCSITargetDevice, 16 );
};
#endif