]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/storage/scsi/IOSCSIHDDriveNub.h
94647d545a9bde5e2d578b2b61c92378a4c7533a
[apple/xnu.git] / iokit / IOKit / storage / scsi / IOSCSIHDDriveNub.h
1 /*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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.
11 *
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
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /* IOSCSIHDDriveNub.h created by rick on Tue 23-Mar-1999 */
23
24 /* This subclass implements a relay to a protocol- and device-specific provider. */
25
26 #ifndef _IOSCSIHDDRIVENUB_H
27 #define _IOSCSIHDDRIVENUB_H
28
29 #include <IOKit/IOTypes.h>
30 #include <IOKit/storage/IOBlockStorageDevice.h>
31
32 class IOSCSIHDDrive;
33
34 class IOSCSIHDDriveNub : public IOBlockStorageDevice {
35
36 OSDeclareDefaultStructors(IOSCSIHDDriveNub)
37
38 public:
39
40 /* Overrides from IOService */
41
42 virtual bool attach(IOService * provider);
43 virtual void detach(IOService * provider);
44
45 /* Mandatory overrides from IOBlockStorageDevice: */
46
47 virtual IOReturn doAsyncReadWrite(IOMemoryDescriptor *buffer,
48 UInt32 block,UInt32 nblks,
49 IOStorageCompletion completion);
50 virtual IOReturn doSyncReadWrite(IOMemoryDescriptor *buffer,UInt32 block,UInt32 nblks);
51 virtual IOReturn doEjectMedia(void);
52 virtual IOReturn doFormatMedia(UInt64 byteCapacity);
53 virtual UInt32 doGetFormatCapacities(UInt64 * capacities,
54 UInt32 capacitiesMaxCount) const;
55 virtual IOReturn doLockUnlockMedia(bool doLock);
56 virtual IOReturn doSynchronizeCache(void);
57 virtual char * getVendorString(void);
58 virtual char * getProductString(void);
59 virtual char * getRevisionString(void);
60 virtual char * getAdditionalDeviceInfoString(void);
61 virtual IOReturn reportBlockSize(UInt64 *blockSize);
62 virtual IOReturn reportEjectability(bool *isEjectable);
63 virtual IOReturn reportLockability(bool *isLockable);
64 virtual IOReturn reportMediaState(bool *mediaPresent,bool *changed);
65 virtual IOReturn reportPollRequirements(bool *PollIsRequired,bool *pollIsExpensive);
66 virtual IOReturn reportMaxReadTransfer (UInt64 blockSize,UInt64 *max);
67 virtual IOReturn reportMaxValidBlock(UInt64 *maxBlock);
68 virtual IOReturn reportMaxWriteTransfer(UInt64 blockSize,UInt64 *max);
69 virtual IOReturn reportRemovability(bool *isRemovable);
70 virtual IOReturn reportWriteProtection(bool *isWriteProtected);
71
72 protected:
73
74 IOSCSIHDDrive * _provider;
75 };
76 #endif