Root/
Source at commit 2055 created 11 years 10 months ago. By cosmo1t, http://forge.voodooprojects.org/p/chameleon/issues/287/#ic2184 | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. Please obtain a copy of the License at␊ |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
11 | * file.␊ |
12 | * ␊ |
13 | * The Original Code and all software distributed under the License are␊ |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
18 | * Please see the License for the specific language governing rights and␊ |
19 | * limitations under the License.␊ |
20 | * ␊ |
21 | * @APPLE_LICENSE_HEADER_END@␊ |
22 | */␊ |
23 | ␊ |
24 | ␊ |
25 | #ifndef _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_␊ |
26 | #define _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_␊ |
27 | ␊ |
28 | #if defined(KERNEL) && defined(__cplusplus)␊ |
29 | ␊ |
30 | ␊ |
31 | //-----------------------------------------------------------------------------␊ |
32 | //␉Includes␊ |
33 | //-----------------------------------------------------------------------------␊ |
34 | ␊ |
35 | // Generic IOKit related headers␊ |
36 | #include <IOKit/IOTypes.h>␊ |
37 | ␊ |
38 | // Generic IOKit storage related headers␊ |
39 | #include <IOKit/storage/IOBlockStorageDevice.h>␊ |
40 | ␊ |
41 | // SCSI Architecture Model Family includes␊ |
42 | #include <IOKit/scsi/IOSCSIPeripheralDeviceType0E.h>␊ |
43 | ␊ |
44 | ␊ |
45 | //-----------------------------------------------------------------------------␊ |
46 | //␉Class Declaration␊ |
47 | //-----------------------------------------------------------------------------␊ |
48 | ␊ |
49 | class IOReducedBlockServices : public IOBlockStorageDevice␊ |
50 | {␊ |
51 | ␉␊ |
52 | ␉OSDeclareDefaultStructors ( IOReducedBlockServices )␊ |
53 | ␉␊ |
54 | ␉␊ |
55 | protected:␊ |
56 | // Reserve space for future expansion.␊ |
57 | struct IOReducedBlockServicesExpansionData { };␊ |
58 | IOReducedBlockServicesExpansionData * fIOReducedBlockServicesReserved;␊ |
59 | ␉␊ |
60 | ␉IOSCSIPeripheralDeviceType0E * fProvider;␊ |
61 | ␉␊ |
62 | ␉virtual bool␉attach ( IOService * provider );␊ |
63 | ␉virtual void␉detach ( IOService * provider );␊ |
64 | ␉␊ |
65 | ␉␊ |
66 | public:␊ |
67 | ␊ |
68 | ␉virtual IOReturn ␉message ( UInt32 type, IOService * provider, void * argument );␊ |
69 | ␉␊ |
70 | ␉static void␉␉␉AsyncReadWriteComplete ( void * ␉␉␉clientData,␊ |
71 | ␉␉␉␉ IOReturn␉␉␉status,␊ |
72 | ␉␉␉␉ UInt64 ␉␉␉actualByteCount );␊ |
73 | ␉␉␉␉␊ |
74 | ␉// Deprecated␊ |
75 | ␉virtual IOReturn␉doAsyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
76 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉block,␊ |
77 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉nblks,␊ |
78 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion␉␉completion );␊ |
79 | ␊ |
80 | ␉virtual IOReturn␉doAsyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
81 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉block,␊ |
82 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉nblks,␊ |
83 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion␉␉completion );␊ |
84 | ␉␉␉␉␉␉␉␉␉␉␉␊ |
85 | ␉virtual IOReturn␉doAsyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
86 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉block,␊ |
87 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉nblks,␊ |
88 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageAttributes * attributes,␊ |
89 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion *␉completion );␊ |
90 | ␊ |
91 | virtual IOReturn␉doEjectMedia ( void );␊ |
92 | ␊ |
93 | virtual IOReturn␉doFormatMedia ( UInt64 byteCapacity );␊ |
94 | ␊ |
95 | virtual UInt32␉␉doGetFormatCapacities ( UInt64 *␉capacities,␊ |
96 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉capacitiesMaxCount ) const;␊ |
97 | ␊ |
98 | virtual IOReturn␉doLockUnlockMedia ( bool doLock );␊ |
99 | ␊ |
100 | virtual IOReturn␉doSynchronizeCache ( void );␊ |
101 | ␉␊ |
102 | ␉virtual IOReturn␉getWriteCacheState ( bool * enabled );␊ |
103 | ␉␊ |
104 | ␉virtual IOReturn␉setWriteCacheState ( bool enabled );␊ |
105 | ␊ |
106 | virtual char *␉␉getVendorString ( void );␊ |
107 | ␊ |
108 | virtual char *␉␉getProductString ( void );␊ |
109 | ␊ |
110 | virtual char *␉␉getRevisionString ( void );␊ |
111 | ␊ |
112 | virtual char *␉␉getAdditionalDeviceInfoString ( void );␊ |
113 | ␊ |
114 | virtual IOReturn␉reportBlockSize ( UInt64 * blockSize );␊ |
115 | ␊ |
116 | virtual IOReturn␉reportEjectability ( bool * isEjectable );␊ |
117 | ␊ |
118 | virtual IOReturn␉reportLockability ( bool * isLockable );␊ |
119 | ␊ |
120 | virtual IOReturn␉reportMediaState ( bool * mediaPresent, bool * changed );␊ |
121 | ␊ |
122 | virtual IOReturn␉reportPollRequirements ( ␉bool * pollIsRequired,␊ |
123 | ␉␉␉␉␉␉␉␉␉␉␉␉bool * pollIsExpensive );␊ |
124 | ␊ |
125 | virtual IOReturn␉reportMaxValidBlock ( UInt64 * maxBlock );␊ |
126 | ␊ |
127 | virtual IOReturn␉reportRemovability ( bool * isRemovable );␊ |
128 | ␊ |
129 | virtual IOReturn␉reportWriteProtection ( bool * isWriteProtected );␊ |
130 | ␊ |
131 | private:␊ |
132 | ␉␊ |
133 | ␉// Space reserved for future expansion.␊ |
134 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 1 );␊ |
135 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 2 );␊ |
136 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 3 );␊ |
137 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 4 );␊ |
138 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 5 );␊ |
139 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 6 );␊ |
140 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 7 );␊ |
141 | OSMetaClassDeclareReservedUnused ( IOReducedBlockServices, 8 );␊ |
142 | ␊ |
143 | };␊ |
144 | ␊ |
145 | #endif␉/* defined(KERNEL) && defined(__cplusplus) */␊ |
146 | ␊ |
147 | #endif␉/* _IOKIT_IO_REDUCED_BLOCK_SERVICES_H_ */␊ |
148 |