Chameleon

Chameleon Svn Source Tree

Root/branches/ErmaC/Modules/i386/include/IOKit/storage/IOBDBlockStorageDevice.h

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 * @header IOBDBlockStorageDevice
26 * @abstract
27 * This header contains the IOBDBlockStorageDevice class definition.
28 */
29
30#ifndef_IOBDBLOCKSTORAGEDEVICE_H
31#define_IOBDBLOCKSTORAGEDEVICE_H
32
33#include <IOKit/storage/IOBDTypes.h>
34
35/*!
36 * @defined kIOBDBlockStorageDeviceClass
37 * @abstract
38 * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class.
39 * @discussion
40 * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class.
41 */
42
43#define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice"
44
45#ifdef KERNEL
46#ifdef __cplusplus
47
48/*
49 * Kernel
50 */
51
52#include <IOKit/storage/IODVDBlockStorageDevice.h>
53
54/* Property used for matching, so the generic driver gets the nub it wants. */
55#definekIOBlockStorageDeviceTypeBD"BD"
56
57/*!
58 * @class
59 * IOBDBlockStorageDevice
60 * @abstract
61 * The IOBDBlockStorageDevice class is a generic BD block storage device
62 * abstraction.
63 * @discussion
64 * This class is the protocol for generic BD functionality, independent of
65 * the physical connection protocol (e.g. SCSI, ATA, USB).
66 *
67 * The APIs are the union of CD APIs, DVD APIs, and all
68 * necessary new low-level BD APIs.
69 *
70 * A subclass implements relay methods that translate our requests into
71 * calls to a protocol- and device-specific provider.
72 */
73
74class IOBDBlockStorageDevice : public IODVDBlockStorageDevice
75{
76 OSDeclareAbstractStructors(IOBDBlockStorageDevice)
77
78protected:
79
80 struct ExpansionData { /* */ };
81 ExpansionData * _expansionData;
82
83public:
84
85 /*!
86 * @function init
87 * @discussion
88 * Initialize this object's minimal state.
89 * @param properties
90 * Substitute property table for this object (optional).
91 * @result
92 * Returns true on success, false otherwise.
93 */
94
95 virtual bool init(OSDictionary * properties);
96
97 /*!
98 * @function readDiscStructure
99 * @discussion
100 * Issue an MMC READ DISC STRUCTURE command.
101 * @param buffer
102 * Buffer for the data transfer. The size of the buffer implies the size of
103 * the data transfer.
104 * @param format
105 * As documented by MMC.
106 * @param address
107 * As documented by MMC.
108 * @param layer
109 * As documented by MMC.
110 * @param grantID
111 * As documented by MMC.
112 * @param type
113 * As documented by MMC.
114 * @result
115 * Returns the status of the data transfer.
116 */
117
118 virtual IOReturn readDiscStructure( IOMemoryDescriptor * buffer,
119 UInt8 format,
120 UInt32 address,
121 UInt8 layer,
122 UInt8 grantID,
123 UInt8 type ) = 0;
124
125 /*!
126 * @function splitTrack
127 * @discussion
128 * Issue an MMC RESERVE TRACK command with the ARSV bit.
129 * @param address
130 * As documented by MMC.
131 * @result
132 * Returns the status of the operation.
133 */
134
135 virtual IOReturn splitTrack(UInt32 address) = 0;
136
137 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 0);
138 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 1);
139 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 2);
140 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 3);
141 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 4);
142 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 5);
143 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 6);
144 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 7);
145 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 8);
146 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 9);
147 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 10);
148 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 11);
149 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 12);
150 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 13);
151 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 14);
152 OSMetaClassDeclareReservedUnused(IOBDBlockStorageDevice, 15);
153};
154
155#endif /* __cplusplus */
156#endif /* KERNEL */
157#endif /* !_IOBDBLOCKSTORAGEDEVICE_H */
158

Archive Download this file

Revision: 1621