Chameleon

Chameleon Svn Source Tree

Root/branches/slice/trunkM/i386/include/IOKit/scsi/IOReducedBlockServices.h

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
49class IOReducedBlockServices : public IOBlockStorageDevice
50{
51
52OSDeclareDefaultStructors ( IOReducedBlockServices )
53
54
55protected:
56 // Reserve space for future expansion.
57 struct IOReducedBlockServicesExpansionData { };
58 IOReducedBlockServicesExpansionData * fIOReducedBlockServicesReserved;
59
60IOSCSIPeripheralDeviceType0E * fProvider;
61
62virtual boolattach ( IOService * provider );
63virtual voiddetach ( IOService * provider );
64
65
66public:
67
68virtual IOReturn message ( UInt32 type, IOService * provider, void * argument );
69
70static voidAsyncReadWriteComplete ( void * clientData,
71 IOReturnstatus,
72 UInt64 actualByteCount );
73
74// Deprecated
75virtual IOReturndoAsyncReadWrite ( IOMemoryDescriptor *buffer,
76UInt32block,
77UInt32nblks,
78IOStorageCompletioncompletion );
79
80virtual IOReturndoAsyncReadWrite ( IOMemoryDescriptor *buffer,
81UInt64block,
82UInt64nblks,
83IOStorageCompletioncompletion );
84
85virtual IOReturndoAsyncReadWrite ( IOMemoryDescriptor *buffer,
86UInt64block,
87UInt64nblks,
88IOStorageAttributes * attributes,
89IOStorageCompletion *completion );
90
91 virtual IOReturndoEjectMedia ( void );
92
93 virtual IOReturndoFormatMedia ( UInt64 byteCapacity );
94
95 virtual UInt32doGetFormatCapacities ( UInt64 *capacities,
96 UInt32capacitiesMaxCount ) const;
97
98 virtual IOReturndoLockUnlockMedia ( bool doLock );
99
100 virtual IOReturndoSynchronizeCache ( void );
101
102virtual IOReturngetWriteCacheState ( bool * enabled );
103
104virtual IOReturnsetWriteCacheState ( 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 IOReturnreportBlockSize ( UInt64 * blockSize );
115
116 virtual IOReturnreportEjectability ( bool * isEjectable );
117
118 virtual IOReturnreportLockability ( bool * isLockable );
119
120 virtual IOReturnreportMediaState ( bool * mediaPresent, bool * changed );
121
122 virtual IOReturnreportPollRequirements ( bool * pollIsRequired,
123 bool * pollIsExpensive );
124
125 virtual IOReturnreportMaxValidBlock ( UInt64 * maxBlock );
126
127 virtual IOReturnreportRemovability ( bool * isRemovable );
128
129 virtual IOReturnreportWriteProtection ( bool * isWriteProtected );
130
131private:
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

Archive Download this file

Revision: 1171