Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/scsi/IOBDServices.h

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) 2006-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_BD_SERVICES_H_
26#define _IOKIT_IO_BD_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/IOBDTypes.h>
40#include <IOKit/storage/IOBDBlockStorageDevice.h>
41
42// SCSI Architecture Model Family includes
43#include <IOKit/scsi/IOSCSIPeripheralDeviceType05.h>
44
45class IOMemoryDescriptor;
46
47//-----------------------------------------------------------------------------
48//Class Declaration
49//-----------------------------------------------------------------------------
50
51class IOBDServices : public IOBDBlockStorageDevice
52{
53
54OSDeclareDefaultStructors ( IOBDServices )
55
56protected:
57
58OSSet *fClients;
59IOSCSIPeripheralDeviceType05 *fProvider;
60
61virtual voidfree ( void );
62
63 // Reserve space for future expansion.
64 struct IOBDServicesExpansionData { };
65 IOBDServicesExpansionData *fIOBDServicesReserved;
66
67public:
68
69static voidAsyncReadWriteComplete ( void * clientData,
70 IOReturnstatus,
71 UInt64 actualByteCount );
72
73// Deprecated
74virtual IOReturndoAsyncReadWrite ( IOMemoryDescriptor *buffer,
75UInt32block,
76UInt32nblks,
77IOStorageCompletioncompletion );
78
79virtual IOReturndoAsyncReadWrite ( IOMemoryDescriptor *buffer,
80UInt64block,
81UInt64nblks,
82IOStorageCompletioncompletion );
83
84virtual IOReturndoAsyncReadWrite ( IOMemoryDescriptor *buffer,
85UInt64block,
86UInt64nblks,
87IOStorageAttributes * attributes,
88IOStorageCompletion *completion );
89
90 virtual IOReturndoEjectMedia ( void );
91
92 virtual IOReturndoFormatMedia ( UInt64 byteCapacity );
93
94 virtual UInt32doGetFormatCapacities ( UInt64 *capacities,
95 UInt32capacitiesMaxCount ) const;
96
97 virtual IOReturndoLockUnlockMedia ( bool doLock );
98
99 virtual IOReturndoSynchronizeCache ( void );
100
101virtual IOReturngetWriteCacheState ( bool * enabled );
102
103virtual IOReturnsetWriteCacheState ( bool enabled );
104
105 virtual char *getVendorString ( void );
106
107 virtual char *getProductString ( void );
108
109 virtual char *getRevisionString ( void );
110
111 virtual char *getAdditionalDeviceInfoString ( void );
112
113 virtual IOReturnreportBlockSize ( UInt64 * blockSize );
114
115 virtual IOReturnreportEjectability ( bool * isEjectable );
116
117 virtual IOReturnreportLockability ( bool * isLockable );
118
119 virtual IOReturnreportMediaState ( bool * mediaPresent, bool * changed );
120
121 virtual IOReturnreportPollRequirements ( bool * pollIsRequired,
122 bool * pollIsExpensive );
123
124 virtual IOReturnreportMaxValidBlock ( UInt64 * maxBlock );
125
126 virtual IOReturnreportRemovability ( bool * isRemovable );
127
128 virtual IOReturnreportWriteProtection ( bool * isWriteProtected );
129
130/* CD Specific */
131virtual IOReturndoAsyncReadCD ( IOMemoryDescriptor * buffer,
132UInt32 block,
133UInt32 nblks,
134CDSectorArea sectorArea,
135CDSectorType sectorType,
136IOStorageCompletion completion );
137
138virtual IOReturnreadISRC ( UInt8 track, CDISRC isrc );
139
140virtual IOReturnreadMCN ( CDMCN mcn);
141
142virtual IOReturnreadTOC ( IOMemoryDescriptor * buffer );
143
144virtual IOReturnaudioPause ( bool pause );
145
146virtual IOReturnaudioPlay ( CDMSF timeStart, CDMSF timeStop );
147
148virtual IOReturnaudioScan ( CDMSF timeStart, bool reverse );
149
150virtual IOReturnaudioStop ( void );
151
152virtual IOReturngetAudioStatus ( CDAudioStatus * status );
153
154virtual IOReturngetAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume );
155
156virtual IOReturnsetAudioVolume ( UInt8 leftVolume, UInt8 rightVolume );
157
158virtual IOReturngetSpeed ( UInt16 * kilobytesPerSecond );
159
160virtual IOReturnsetSpeed ( UInt16 kilobytesPerSecond );
161
162/* DVD Specific */
163virtual UInt32getMediaType( void );
164
165virtual IOReturnreportKey( IOMemoryDescriptor * buffer,
166 const DVDKeyClass keyClass,
167 const UInt32 lba,
168 const UInt8 agid,
169 const DVDKeyFormat keyFormat );
170
171virtual IOReturnsendKey( IOMemoryDescriptor * buffer,
172 const DVDKeyClass keyClass,
173 const UInt8 agid,
174 const DVDKeyFormat keyFormat );
175
176virtual IOReturnreadDVDStructure ( IOMemoryDescriptor * buffer,
177const UInt8structureFormat,
178const UInt32logicalBlockAddress,
179const UInt8layer,
180const UInt8 agid );
181
182/* BD Specific */
183 virtual IOReturnreadDiscStructure(IOMemoryDescriptor * buffer,
184UInt8 structureFormat,
185UInt32 logicalBlockAddress,
186UInt8 layer,
187UInt8 agid,
188UInt8 mediaType );
189
190/* 10.6.0 */
191 virtual IOReturnrequestIdle ( void );
192
193/* System Specific */
194virtual IOReturn message ( UInt32 type, IOService * provider, void * argument );
195 virtual IOReturnsetProperties ( OSObject * properties );
196
197/* User Client Specific */
198virtual bool start ( IOService * provider );
199virtual bool open ( IOService * client, IOOptionBits options, IOStorageAccess access );
200
201virtual bool handleOpen( IOService * client, IOOptionBits options, void * access );
202virtual void handleClose ( IOService * client, IOOptionBits options );
203virtual bool handleIsOpen ( const IOService * client ) const;
204
205/* Added with 10.1.3 */
206virtual IOReturnreadTOC (IOMemoryDescriptor *buffer,
207CDTOCFormatformat,
208UInt8msf,
209UInt8trackSessionNumber,
210UInt16 *actualByteCount );
211
212/* Added with 10.1.3 */
213virtual IOReturnreadDiscInfo (IOMemoryDescriptor *buffer,
214UInt16 *actualByteCount );
215
216/* Added with 10.1.3 */
217virtual IOReturnreadTrackInfo (IOMemoryDescriptor *buffer,
218UInt32address,
219CDTrackInfoAddressTypeaddressType,
220UInt16 *actualByteCount );
221
222/* Added with 10.5 */
223virtual IOReturnsplitTrack ( UInt32 address );
224
225private:
226
227// Space reserved for future expansion.
228 OSMetaClassDeclareReservedUnused ( IOBDServices, 1 );
229 OSMetaClassDeclareReservedUnused ( IOBDServices, 2 );
230 OSMetaClassDeclareReservedUnused ( IOBDServices, 3 );
231 OSMetaClassDeclareReservedUnused ( IOBDServices, 4 );
232 OSMetaClassDeclareReservedUnused ( IOBDServices, 5 );
233 OSMetaClassDeclareReservedUnused ( IOBDServices, 6 );
234 OSMetaClassDeclareReservedUnused ( IOBDServices, 7 );
235 OSMetaClassDeclareReservedUnused ( IOBDServices, 8 );
236
237};
238
239#endif/* defined(KERNEL) && defined(__cplusplus) */
240
241#endif /* _IOKIT_IO_BD_SERVICES_H_ */
242

Archive Download this file

Revision: 1129