|
|
1.1 root 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/IOHDDriveNub.h>
31:
32: class IOSCSIHDDrive;
33:
34: class IOSCSIHDDriveNub : public IOHDDriveNub {
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 IOHDDriveNub: */
46:
47: virtual IOReturn doAsyncReadWrite(IOMemoryDescriptor *buffer,
48: UInt32 block,UInt32 nblks,
49: gdCompletionFunction action,
50: IOService *target,void *param);
51: virtual IOReturn doSyncReadWrite(IOMemoryDescriptor *buffer,UInt32 block,UInt32 nblks);
52: virtual IOReturn doEjectMedia(void);
53: virtual IOReturn doFormatMedia(UInt64 byteCapacity);
54: virtual UInt32 doGetFormatCapacities(UInt64 * capacities,
55: UInt32 capacitiesMaxCount) const;
56: virtual IOReturn doLockUnlockMedia(bool doLock);
57: virtual IOReturn doSynchronizeCache(void);
58: virtual IOReturn executeCdb(struct cdbParams *params);
59: virtual char * getVendorString(void);
60: virtual char * getProductString(void);
61: virtual char * getRevisionString(void);
62: virtual char * getAdditionalDeviceInfoString(void);
63: virtual IOReturn reportBlockSize(UInt64 *blockSize);
64: virtual IOReturn reportEjectability(bool *isEjectable);
65: virtual IOReturn reportLockability(bool *isLockable);
66: virtual IOReturn reportMediaState(bool *mediaPresent,bool *changed);
67: virtual IOReturn reportPollRequirements(bool *PollIsRequired,bool *pollIsExpensive);
68: virtual IOReturn reportMaxReadTransfer (UInt64 blockSize,UInt64 *max);
69: virtual IOReturn reportMaxValidBlock(UInt64 *maxBlock);
70: virtual IOReturn reportMaxWriteTransfer(UInt64 blockSize,UInt64 *max);
71: virtual IOReturn reportRemovability(bool *isRemovable);
72: virtual IOReturn reportWriteProtection(bool *isWriteProtected);
73:
74: protected:
75:
76: IOSCSIHDDrive * _provider;
77: };
78: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.