Root/
Source at commit 1129 created 12 years 11 months ago. By meklort, Change options.o so that it reloads the system config as well. Also change it so that it uses that config for variables (NOTE: if the calue exists in chameleonConfig, it's used instead. | |
---|---|
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_UFI_STORAGE_SERVICES_H_␊ |
26 | #define _IOKIT_UFI_STORAGE_SERVICES_H_␊ |
27 | ␊ |
28 | #if defined(KERNEL) && defined(__cplusplus)␊ |
29 | ␊ |
30 | #include <IOKit/IOTypes.h>␊ |
31 | #include <IOKit/storage/IOBlockStorageDevice.h>␊ |
32 | #include <IOKit/usb/IOUSBMassStorageUFISubclass.h>␊ |
33 | ␊ |
34 | ␊ |
35 | class IOUFIStorageServices : public IOBlockStorageDevice␊ |
36 | {␊ |
37 | ␉␊ |
38 | ␉OSDeclareDefaultStructors ( IOUFIStorageServices )␊ |
39 | ␊ |
40 | private:␊ |
41 | ␉bool␉␉␉␉␉␉␉fMediaChanged;␊ |
42 | ␉bool␉␉␉␉␉␉␉fMediaPresent;␊ |
43 | ␊ |
44 | protected:␊ |
45 | ␉␊ |
46 | IOUSBMassStorageUFIDevice *␉␉fProvider;␊ |
47 | ␊ |
48 | ␉UInt64␉␉␉␉␉␉␉fMaxReadBlocks;␊ |
49 | ␉UInt64␉␉␉␉␉␉␉fMaxWriteBlocks;␊ |
50 | ␉␊ |
51 | ␉virtual bool␉attach ( IOService * provider );␊ |
52 | ␉virtual void␉detach ( IOService * provider );␊ |
53 | ␉␊ |
54 | // Reserve space for future expansion.␊ |
55 | struct IOUFIStorageServicesExpansionData { };␊ |
56 | IOUFIStorageServicesExpansionData *fIOUFIStorageServicesReserved;␊ |
57 | ␉␊ |
58 | public:␊ |
59 | ␊ |
60 | ␉virtual IOReturn ␉message ( UInt32 type, IOService * provider, void * argument );␊ |
61 | ␊ |
62 | ␉static void ␉␉AsyncReadWriteComplete ( void * ␉␉␉clientData,␊ |
63 | ␉␉␉␉ IOReturn␉␉␉status,␊ |
64 | ␉␉␉␉ UInt64 ␉␉␉actualByteCount );␊ |
65 | ␊ |
66 | // Deprecated␊ |
67 | virtual IOReturn doAsyncReadWrite (␉IOMemoryDescriptor *␉buffer,␊ |
68 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉block,␊ |
69 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉nblks,␊ |
70 | ␉␉␉␉␉␉␉␉␉␉␉IOStorageCompletion␉␉completion );␊ |
71 | ␊ |
72 | ␉virtual IOReturn␉doAsyncReadWrite ( IOMemoryDescriptor * buffer,␊ |
73 | UInt64 block, ␊ |
74 | UInt64 nblks,␊ |
75 | IOStorageAttributes * attributes,␊ |
76 | IOStorageCompletion * completion );␊ |
77 | ␊ |
78 | ␉virtual IOReturn␉doSyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
79 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉block,␊ |
80 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉nblks );␊ |
81 | ␊ |
82 | virtual IOReturn␉doEjectMedia ( void );␊ |
83 | ␊ |
84 | virtual IOReturn␉doFormatMedia ( UInt64 byteCapacity );␊ |
85 | ␊ |
86 | virtual UInt32␉␉doGetFormatCapacities ( UInt64 *␉capacities,␊ |
87 | ␉␉␉␉␉␉␉␉␉␉␉UInt32␉␉capacitiesMaxCount ) const;␊ |
88 | ␊ |
89 | virtual IOReturn␉doLockUnlockMedia ( bool doLock );␊ |
90 | ␊ |
91 | virtual IOReturn␉doSynchronizeCache ( void );␊ |
92 | ␊ |
93 | virtual char *␉␉getVendorString ( void );␊ |
94 | ␊ |
95 | virtual char *␉␉getProductString ( void );␊ |
96 | ␊ |
97 | virtual char *␉␉getRevisionString ( void );␊ |
98 | ␊ |
99 | virtual char *␉␉getAdditionalDeviceInfoString ( void );␊ |
100 | ␊ |
101 | virtual IOReturn␉reportBlockSize ( UInt64 * blockSize );␊ |
102 | ␊ |
103 | virtual IOReturn␉reportEjectability ( bool * isEjectable );␊ |
104 | ␊ |
105 | virtual IOReturn␉reportLockability ( bool * isLockable );␊ |
106 | ␊ |
107 | virtual IOReturn␉reportMediaState ( bool * mediaPresent, bool * changed );␊ |
108 | ␊ |
109 | virtual IOReturn␉reportPollRequirements ( ␉bool * pollIsRequired,␊ |
110 | ␉␉␉␉␉␉␉␉␉␉␉␉bool * pollIsExpensive );␊ |
111 | ␊ |
112 | virtual IOReturn␉reportMaxValidBlock ( UInt64 * maxBlock );␊ |
113 | ␊ |
114 | virtual IOReturn␉reportRemovability ( bool * isRemovable );␊ |
115 | ␊ |
116 | virtual IOReturn␉reportWriteProtection ( bool * isWriteProtected );␊ |
117 | ␊ |
118 | virtual IOReturn␉getWriteCacheState ( bool * enabled );␊ |
119 | ␉␊ |
120 | ␉virtual IOReturn␉setWriteCacheState ( bool enabled );␊ |
121 | ␊ |
122 | ␉// Space reserved for future expansion.␊ |
123 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 1 );␊ |
124 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 2 );␊ |
125 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 3 );␊ |
126 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 4 );␊ |
127 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 5 );␊ |
128 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 6 );␊ |
129 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 7 );␊ |
130 | OSMetaClassDeclareReservedUnused( IOUFIStorageServices, 8 );␊ |
131 | ␊ |
132 | };␊ |
133 | ␊ |
134 | #endif␉/* defined(KERNEL) && defined(__cplusplus) */␊ |
135 | ␊ |
136 | #endif␉/* _IOKIT_UFI_STORAGE_SERVICES_H_ */␊ |
137 |