2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
27 * This subclass implements a relay to a protocol and device-specific
31 * Aug 27, 1999 jliu - Created.
34 #ifndef _IOATAHDDRIVENUB_H
35 #define _IOATAHDDRIVENUB_H
37 #include <IOKit/IOTypes.h>
38 #include <IOKit/storage/IOBlockStorageDevice.h>
42 class IOATAHDDriveNub
: public IOBlockStorageDevice
44 OSDeclareDefaultStructors(IOATAHDDriveNub
)
47 IOATAHDDrive
* _provider
;
51 * Overrides from IOService.
53 virtual bool attach(IOService
* provider
);
54 virtual void detach(IOService
* provider
);
57 * Mandatory overrides from IOBlockStorageDevice.
59 virtual IOReturn
doAsyncReadWrite(IOMemoryDescriptor
* buffer
,
62 IOStorageCompletion completion
);
63 virtual IOReturn
doSyncReadWrite(IOMemoryDescriptor
* buffer
,
66 virtual IOReturn
doEjectMedia();
67 virtual IOReturn
doFormatMedia(UInt64 byteCapacity
);
68 virtual UInt32
doGetFormatCapacities(UInt64
* capacities
,
69 UInt32 capacitiesMaxCount
) const;
70 virtual IOReturn
doLockUnlockMedia(bool doLock
);
71 virtual IOReturn
doSynchronizeCache();
72 virtual char * getVendorString();
73 virtual char * getProductString();
74 virtual char * getRevisionString();
75 virtual char * getAdditionalDeviceInfoString();
76 virtual IOReturn
reportBlockSize(UInt64
* blockSize
);
77 virtual IOReturn
reportEjectability(bool * isEjectable
);
78 virtual IOReturn
reportLockability(bool * isLockable
);
79 virtual IOReturn
reportMediaState(bool * mediaPresent
, bool * changed
);
80 virtual IOReturn
reportPollRequirements(bool * pollIsRequired
,
81 bool * pollIsExpensive
);
82 virtual IOReturn
reportMaxReadTransfer (UInt64 blockSize
,UInt64
* max
);
83 virtual IOReturn
reportMaxValidBlock(UInt64
* maxBlock
);
84 virtual IOReturn
reportMaxWriteTransfer(UInt64 blockSize
,UInt64
* max
);
85 virtual IOReturn
reportRemovability(bool * isRemovable
);
86 virtual IOReturn
reportWriteProtection(bool * isWriteProtected
);
89 #endif /* !_IOATAHDDRIVENUB_H */