Root/
Source at commit 2350 created 10 years 5 months ago. By ifabio, remove duplicated define. | |
---|---|
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 | #ifndef _IODVDMEDIABSDCLIENT_H␊ |
25 | #define _IODVDMEDIABSDCLIENT_H␊ |
26 | ␊ |
27 | #include <sys/ioctl.h>␊ |
28 | ␊ |
29 | #include <IOKit/storage/IODVDTypes.h>␊ |
30 | ␊ |
31 | /*␊ |
32 | * Definitions␊ |
33 | *␊ |
34 | * ioctl description␊ |
35 | * ---------------------------- ------------------------------------------------␊ |
36 | * DKIOCDVDREADSTRUCTURE see IODVDMedia::readStructure() in IODVDMedia.h␊ |
37 | *␊ |
38 | * DKIOCDVDREADDISCINFO see IODVDMedia::readDiscInfo() in IODVDMedia.h␊ |
39 | * DKIOCDVDREADRZONEINFO see IODVDMedia::readRZoneInfo() in IODVDMedia.h␊ |
40 | *␊ |
41 | * DKIOCDVDREPORTKEY see IODVDMedia::reportKey() in IODVDMedia.h␊ |
42 | * DKIOCDVDSENDKEY see IODVDMedia::sendKey() in IODVDMedia.h␊ |
43 | *␊ |
44 | * DKIOCDVDGETSPEED see IODVDMedia::getSpeed() in IODVDMedia.h␊ |
45 | * DKIOCDVDSETSPEED see IODVDMedia::setSpeed() in IODVDMedia.h␊ |
46 | *␊ |
47 | * in /System/Library/Frameworks/Kernel.framework/Headers/IOKit/storage/␊ |
48 | */␊ |
49 | ␊ |
50 | typedef struct␊ |
51 | {␊ |
52 | uint8_t format;␊ |
53 | ␊ |
54 | uint8_t reserved0008[3]; /* reserved, clear to zero */␊ |
55 | ␊ |
56 | uint32_t address;␊ |
57 | uint8_t grantID;␊ |
58 | uint8_t layer;␊ |
59 | ␊ |
60 | #ifdef __LP64__␊ |
61 | uint8_t reserved0080[4]; /* reserved, clear to zero */␊ |
62 | #endif /* __LP64__ */␊ |
63 | ␊ |
64 | uint16_t bufferLength;␊ |
65 | void * buffer;␊ |
66 | } dk_dvd_read_structure_t;␊ |
67 | ␊ |
68 | typedef struct␊ |
69 | {␊ |
70 | uint8_t format;␊ |
71 | uint8_t keyClass;␊ |
72 | ␊ |
73 | uint8_t reserved0016[2]; /* reserved, clear to zero */␊ |
74 | ␊ |
75 | uint32_t address;␊ |
76 | uint8_t grantID;␊ |
77 | ␊ |
78 | #ifdef __LP64__␊ |
79 | uint8_t reserved0072[5]; /* reserved, clear to zero */␊ |
80 | #else /* !__LP64__ */␊ |
81 | uint8_t reserved0072[1]; /* reserved, clear to zero */␊ |
82 | #endif /* !__LP64__ */␊ |
83 | ␊ |
84 | uint16_t bufferLength;␊ |
85 | void * buffer;␊ |
86 | } dk_dvd_report_key_t;␊ |
87 | ␊ |
88 | typedef struct␊ |
89 | {␊ |
90 | uint8_t format;␊ |
91 | uint8_t keyClass;␊ |
92 | ␊ |
93 | uint8_t reserved0016[6]; /* reserved, clear to zero */␊ |
94 | ␊ |
95 | uint8_t grantID;␊ |
96 | ␊ |
97 | #ifdef __LP64__␊ |
98 | uint8_t reserved0072[5]; /* reserved, clear to zero */␊ |
99 | #else /* !__LP64__ */␊ |
100 | uint8_t reserved0072[1]; /* reserved, clear to zero */␊ |
101 | #endif /* !__LP64__ */␊ |
102 | ␊ |
103 | uint16_t bufferLength;␊ |
104 | void * buffer;␊ |
105 | } dk_dvd_send_key_t;␊ |
106 | ␊ |
107 | typedef struct␊ |
108 | {␊ |
109 | #ifdef __LP64__␊ |
110 | uint8_t reserved0000[14]; /* reserved, clear to zero */␊ |
111 | #else /* !__LP64__ */␊ |
112 | uint8_t reserved0000[10]; /* reserved, clear to zero */␊ |
113 | #endif /* !__LP64__ */␊ |
114 | ␊ |
115 | uint16_t bufferLength; /* actual length on return */␊ |
116 | void * buffer;␊ |
117 | } dk_dvd_read_disc_info_t;␊ |
118 | ␊ |
119 | typedef struct␊ |
120 | {␊ |
121 | uint8_t reserved0000[4]; /* reserved, clear to zero */␊ |
122 | ␊ |
123 | uint32_t address;␊ |
124 | uint8_t addressType;␊ |
125 | ␊ |
126 | #ifdef __LP64__␊ |
127 | uint8_t reserved0072[5]; /* reserved, clear to zero */␊ |
128 | #else /* !__LP64__ */␊ |
129 | uint8_t reserved0072[1]; /* reserved, clear to zero */␊ |
130 | #endif /* !__LP64__ */␊ |
131 | ␊ |
132 | uint16_t bufferLength; /* actual length on return */␊ |
133 | void * buffer;␊ |
134 | } dk_dvd_read_rzone_info_t;␊ |
135 | ␊ |
136 | #define DKIOCDVDREADSTRUCTURE _IOW('d', 128, dk_dvd_read_structure_t)␊ |
137 | #define DKIOCDVDREPORTKEY _IOW('d', 129, dk_dvd_report_key_t)␊ |
138 | #define DKIOCDVDSENDKEY _IOW('d', 130, dk_dvd_send_key_t)␊ |
139 | ␊ |
140 | #define DKIOCDVDGETSPEED _IOR('d', 131, uint16_t)␊ |
141 | #define DKIOCDVDSETSPEED _IOW('d', 131, uint16_t)␊ |
142 | ␊ |
143 | #define DKIOCDVDREADDISCINFO _IOWR('d', 132, dk_dvd_read_disc_info_t)␊ |
144 | #define DKIOCDVDREADRZONEINFO _IOWR('d', 133, dk_dvd_read_rzone_info_t)␊ |
145 | ␊ |
146 | #ifdef KERNEL␊ |
147 | #ifdef __cplusplus␊ |
148 | ␊ |
149 | /*␊ |
150 | * Kernel␊ |
151 | */␊ |
152 | ␊ |
153 | #include <IOKit/storage/IODVDMedia.h>␊ |
154 | #include <IOKit/storage/IOMediaBSDClient.h>␊ |
155 | ␊ |
156 | /*␊ |
157 | * Class␊ |
158 | */␊ |
159 | ␊ |
160 | class IODVDMediaBSDClient : public IOMediaBSDClient␊ |
161 | {␊ |
162 | OSDeclareDefaultStructors(IODVDMediaBSDClient)␊ |
163 | ␊ |
164 | protected:␊ |
165 | ␊ |
166 | struct ExpansionData { /* */ };␊ |
167 | ExpansionData * _expansionData;␊ |
168 | ␊ |
169 | public:␊ |
170 | ␊ |
171 | /*␊ |
172 | * Obtain this object's provider. We override the superclass's method␊ |
173 | * to return a more specific subclass of IOService -- IODVDMedia. This␊ |
174 | * method serves simply as a convenience to subclass developers.␊ |
175 | */␊ |
176 | ␊ |
177 | virtual IODVDMedia * getProvider() const;␊ |
178 | ␊ |
179 | /*␊ |
180 | * Process a DVD-specific ioctl.␊ |
181 | */␊ |
182 | ␊ |
183 | virtual int ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, proc_t proc);␊ |
184 | ␊ |
185 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 0);␊ |
186 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 1);␊ |
187 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 2);␊ |
188 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 3);␊ |
189 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 4);␊ |
190 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 5);␊ |
191 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 6);␊ |
192 | OSMetaClassDeclareReservedUnused(IODVDMediaBSDClient, 7);␊ |
193 | };␊ |
194 | ␊ |
195 | #endif /* __cplusplus */␊ |
196 | #endif /* KERNEL */␊ |
197 | #endif /* !_IODVDMEDIABSDCLIENT_H */␊ |
198 |