]> git.saurik.com Git - apple/xnu.git/blame - iokit/IOKit/storage/ata/IOATAPIHDDriveNub.h
xnu-124.13.tar.gz
[apple/xnu.git] / iokit / IOKit / storage / ata / IOATAPIHDDriveNub.h
CommitLineData
1c79356b
A
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/*
23 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
24 *
25 * IOATAPIHDDriveNub.h
26 *
27 * This subclass implements a relay to a protocol and device-specific
28 * provider.
29 *
30 * HISTORY
31 * 2-Sep-1999 Joe Liu (jliu) created.
32 */
33
34#ifndef _IOATAPIHDDRIVENUB_H
35#define _IOATAPIHDDRIVENUB_H
36
37#include <IOKit/IOTypes.h>
38#include <IOKit/storage/IOBlockStorageDevice.h>
39
40class IOATAPIHDDrive;
41
42class IOATAPIHDDriveNub : public IOBlockStorageDevice
43{
44 OSDeclareDefaultStructors(IOATAPIHDDriveNub)
45
46protected:
47 IOATAPIHDDrive * _provider;
48
49public:
50 /* Overrides from IOService */
51
52 virtual bool attach(IOService * provider);
53 virtual void detach(IOService * provider);
54
55 /* Mandatory overrides from IOBlockStorageDevice */
56
57 virtual IOReturn doAsyncReadWrite(IOMemoryDescriptor * buffer,
58 UInt32 block,
59 UInt32 nblks,
60 IOStorageCompletion completion);
61 virtual IOReturn doSyncReadWrite(IOMemoryDescriptor * buffer,
62 UInt32 block,
63 UInt32 nblks);
64 virtual IOReturn doEjectMedia();
65 virtual IOReturn doFormatMedia(UInt64 byteCapacity);
66 virtual UInt32 doGetFormatCapacities(UInt64 * capacities,
67 UInt32 capacitiesMaxCount) const;
68 virtual IOReturn doLockUnlockMedia(bool doLock);
69 virtual IOReturn doSynchronizeCache();
70 virtual char * getVendorString();
71 virtual char * getProductString();
72 virtual char * getRevisionString();
73 virtual char * getAdditionalDeviceInfoString();
74 virtual IOReturn reportBlockSize(UInt64 * blockSize);
75 virtual IOReturn reportEjectability(bool * isEjectable);
76 virtual IOReturn reportLockability(bool * isLockable);
77 virtual IOReturn reportMediaState(bool * mediaPresent, bool * changed);
78 virtual IOReturn reportPollRequirements(bool * pollIsRequired,
79 bool * pollIsExpensive);
80 virtual IOReturn reportMaxReadTransfer (UInt64 blockSize,UInt64 * max);
81 virtual IOReturn reportMaxValidBlock(UInt64 * maxBlock);
82 virtual IOReturn reportMaxWriteTransfer(UInt64 blockSize,UInt64 * max);
83 virtual IOReturn reportRemovability(bool * isRemovable);
84 virtual IOReturn reportWriteProtection(bool * isWriteProtected);
85};
86
87#endif /* !_IOATAPIHDDRIVENUB_H */