Root/
Source at commit 1166 created 13 years 10 days ago. By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged. | |
---|---|
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_BLOCK_STORAGE_SERVICES_H_␊ |
26 | #define _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_␊ |
27 | ␊ |
28 | #if defined(KERNEL) && defined(__cplusplus)␊ |
29 | ␊ |
30 | ␊ |
31 | //-----------------------------------------------------------------------------␊ |
32 | //␉Includes␊ |
33 | //-----------------------------------------------------------------------------␊ |
34 | ␊ |
35 | // IOKit includes␊ |
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/IOSCSIBlockCommandsDevice.h>␊ |
43 | ␊ |
44 | ␊ |
45 | //-----------------------------------------------------------------------------␊ |
46 | //␉Class Declaration␊ |
47 | //-----------------------------------------------------------------------------␊ |
48 | ␊ |
49 | class IOBlockStorageServices : public IOBlockStorageDevice␊ |
50 | {␊ |
51 | ␉␊ |
52 | ␉OSDeclareDefaultStructors ( IOBlockStorageServices )␊ |
53 | ␉␊ |
54 | private:␊ |
55 | ␉␊ |
56 | ␉bool␉␉␉␉␉␉␉fMediaChanged; /* DEPRECATED */␊ |
57 | ␉bool␉␉␉␉␉␉␉fMediaPresent;␊ |
58 | ␉␊ |
59 | protected:␊ |
60 | ␉␊ |
61 | IOSCSIBlockCommandsDevice * fProvider;␊ |
62 | ␉␊ |
63 | ␉UInt64␉␉␉␉␉␉␉fMaxReadBlocks;␊ |
64 | ␉UInt64␉␉␉␉␉␉␉fMaxWriteBlocks;␊ |
65 | ␉␊ |
66 | ␉virtual bool␉␉attach ( IOService * provider );␊ |
67 | ␉virtual void␉␉detach ( IOService * provider );␊ |
68 | virtual IOReturn␉newUserClient (␊ |
69 | ␉␉␉␉␉␉ task_t␉␉␉owningTask,␊ |
70 | ␉␉␉␉␉␉ void *␉␉␉securityID,␊ |
71 | ␉␉␉␉␉␉ UInt32␉␉␉type,␊ |
72 | ␉␉␉␉␉␉ OSDictionary * ␉properties,␊ |
73 | ␉␉␉␉␉␉ IOUserClient **␉handler );␊ |
74 | ␉␊ |
75 | // Reserve space for future expansion.␊ |
76 | struct IOBlockStorageServicesExpansionData { };␊ |
77 | IOBlockStorageServicesExpansionData * fIOBlockStorageServicesReserved;␊ |
78 | ␉␊ |
79 | public:␊ |
80 | ␉␊ |
81 | ␉virtual IOReturn ␉message ( UInt32 type, IOService * provider, void * argument );␊ |
82 | ␉␊ |
83 | ␉static void ␉␉AsyncReadWriteComplete ( void * ␉␉␉clientData,␊ |
84 | ␉␉␉␉ IOReturn␉␉␉status,␊ |
85 | ␉␉␉␉ UInt64 ␉␉␉actualByteCount );␊ |
86 | ␉␊ |
87 | ␉// Deprecated␊ |
88 | ␉virtual IOReturn␉doAsyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
89 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉block,␊ |
90 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉nblks,␊ |
91 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion␉␉completion );␊ |
92 | ␉␉␉␉␉␉␉␉␉␉␉␊ |
93 | ␉virtual IOReturn␉doAsyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
94 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉block,␊ |
95 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉nblks,␊ |
96 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion ␉completion );␊ |
97 | ␊ |
98 | ␉virtual IOReturn␉doAsyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
99 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉block,␊ |
100 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉nblks,␊ |
101 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageAttributes * attributes,␊ |
102 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion *␉completion );␊ |
103 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␊ |
104 | virtual IOReturn␉doEjectMedia ( void );␊ |
105 | ␉␊ |
106 | virtual IOReturn␉doFormatMedia ( UInt64 byteCapacity );␊ |
107 | ␉␊ |
108 | virtual UInt32␉␉doGetFormatCapacities ( UInt64 *␉capacities,␊ |
109 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉capacitiesMaxCount ) const;␊ |
110 | ␉␊ |
111 | virtual IOReturn␉doLockUnlockMedia ( bool doLock );␊ |
112 | ␉␊ |
113 | virtual IOReturn␉doSynchronizeCache ( void );␊ |
114 | ␉␊ |
115 | virtual char *␉␉getVendorString ( void );␊ |
116 | ␊ |
117 | virtual char *␉␉getProductString ( void );␊ |
118 | ␊ |
119 | virtual char *␉␉getRevisionString ( void );␊ |
120 | ␊ |
121 | virtual char *␉␉getAdditionalDeviceInfoString ( void );␊ |
122 | ␊ |
123 | virtual IOReturn␉reportBlockSize ( UInt64 * blockSize );␊ |
124 | ␊ |
125 | virtual IOReturn␉reportEjectability ( bool * isEjectable );␊ |
126 | ␊ |
127 | virtual IOReturn␉reportLockability ( bool * isLockable );␊ |
128 | ␊ |
129 | virtual IOReturn␉reportMediaState ( bool * mediaPresent, bool * changed );␊ |
130 | ␊ |
131 | virtual IOReturn␉reportPollRequirements ( ␉bool * pollIsRequired,␊ |
132 | ␉␉␉␉␉␉␉␉␉␉␉␉bool * pollIsExpensive );␊ |
133 | ␊ |
134 | virtual IOReturn␉reportMaxValidBlock ( UInt64 * maxBlock );␊ |
135 | ␊ |
136 | virtual IOReturn␉reportRemovability ( bool * isRemovable );␊ |
137 | ␊ |
138 | virtual IOReturn␉reportWriteProtection ( bool * isWriteProtected );␊ |
139 | ␉␊ |
140 | ␉virtual IOReturn␉getWriteCacheState ( bool * enabled );␊ |
141 | ␉␊ |
142 | ␉virtual IOReturn␉setWriteCacheState ( bool enabled );␊ |
143 | ␉␊ |
144 | ␉// Space reserved for future expansion.␊ |
145 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 1 );␊ |
146 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 2 );␊ |
147 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 3 );␊ |
148 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 4 );␊ |
149 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 5 );␊ |
150 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 6 );␊ |
151 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 7 );␊ |
152 | OSMetaClassDeclareReservedUnused ( IOBlockStorageServices, 8 );␊ |
153 | ␉␊ |
154 | };␊ |
155 | ␊ |
156 | #endif␉/* defined(KERNEL) && defined(__cplusplus) */␊ |
157 | ␊ |
158 | #endif␉/* _IOKIT_IO_BLOCK_STORAGE_SERVICES_H_ */␊ |
159 |