Root/
Source at commit 1808 created 12 years 4 months ago. By blackosx, Revise layout of package installer 'Welcome' file so it looks cleaner. Change the copyright notice to begin from 2009 as seen in the Chameleon 2.0 r431 installer. Should this date be set earlier? | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_OSREFERENCE_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. The rights granted to you under the License␊ |
10 | * may not be used to create, or enable the creation or redistribution of,␊ |
11 | * unlawful or unlicensed copies of an Apple operating system, or to␊ |
12 | * circumvent, violate, or enable the circumvention or violation of, any␊ |
13 | * terms of an Apple operating system software license agreement.␊ |
14 | * ␊ |
15 | * Please obtain a copy of the License at␊ |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file.␊ |
17 | * ␊ |
18 | * The Original Code and all software distributed under the License are␊ |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
23 | * Please see the License for the specific language governing rights and␊ |
24 | * limitations under the License.␊ |
25 | * ␊ |
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@␊ |
27 | */␊ |
28 | #ifndef␉__IOKIT_IOTYPES_H␊ |
29 | #define __IOKIT_IOTYPES_H␊ |
30 | ␊ |
31 | #ifndef IOKIT␊ |
32 | #define IOKIT 1␊ |
33 | #endif /* !IOKIT */␊ |
34 | ␊ |
35 | #if KERNEL␊ |
36 | #include <IOKit/system.h>␊ |
37 | #else␊ |
38 | #include <mach/message.h>␊ |
39 | #include <mach/vm_types.h>␊ |
40 | #endif␊ |
41 | ␊ |
42 | #include <IOKit/IOReturn.h>␊ |
43 | ␊ |
44 | #ifdef __cplusplus␊ |
45 | extern "C" {␊ |
46 | #endif␊ |
47 | ␊ |
48 | #ifndef␉NULL␊ |
49 | #if defined (__cplusplus)␊ |
50 | #define␉NULL␉0␊ |
51 | #else␊ |
52 | #define NULL ((void *)0)␊ |
53 | #endif␊ |
54 | #endif␊ |
55 | ␉␊ |
56 | /*␊ |
57 | * Simple data types.␊ |
58 | */␊ |
59 | #ifndef __MACTYPES__␉/* CF MacTypes.h */␊ |
60 | #ifndef __TYPES__␉/* guess... Mac Types.h */␊ |
61 | ␊ |
62 | #include <stdbool.h>␊ |
63 | #include <libkern/OSTypes.h>␊ |
64 | ␊ |
65 | #endif /* __TYPES__ */␊ |
66 | #endif /* __MACTYPES__ */␊ |
67 | ␊ |
68 | #if KERNEL␊ |
69 | #include <libkern/OSBase.h>␊ |
70 | #endif␊ |
71 | ␊ |
72 | typedef UInt32␉␉IOOptionBits;␊ |
73 | typedef SInt32␉␉IOFixed;␊ |
74 | typedef UInt32␉␉IOVersion;␊ |
75 | typedef UInt32␉␉IOItemCount;␊ |
76 | typedef UInt32 ␉IOCacheMode;␊ |
77 | ␊ |
78 | typedef UInt32␉ ␉IOByteCount32;␊ |
79 | typedef UInt64␉ ␉IOByteCount64;␊ |
80 | ␊ |
81 | typedef UInt32␉IOPhysicalAddress32;␊ |
82 | typedef UInt64␉IOPhysicalAddress64;␊ |
83 | typedef UInt32␉IOPhysicalLength32;␊ |
84 | typedef UInt64␉IOPhysicalLength64;␊ |
85 | ␊ |
86 | #ifdef __LP64__␊ |
87 | typedef mach_vm_address_t␉IOVirtualAddress;␊ |
88 | #else␊ |
89 | typedef vm_address_t␉␉IOVirtualAddress;␊ |
90 | #endif␊ |
91 | ␊ |
92 | #if defined(__LP64__) && defined(KERNEL)␊ |
93 | typedef IOByteCount64␉␉IOByteCount;␊ |
94 | #else␊ |
95 | typedef IOByteCount32␉ ␉IOByteCount;␊ |
96 | #endif␊ |
97 | ␊ |
98 | typedef IOVirtualAddress IOLogicalAddress;␊ |
99 | ␊ |
100 | #if defined(__LP64__) && defined(KERNEL)␊ |
101 | ␊ |
102 | typedef IOPhysicalAddress64␉ IOPhysicalAddress;␊ |
103 | typedef IOPhysicalLength64␉ IOPhysicalLength;␊ |
104 | #define IOPhysical32( hi, lo )␉␉((UInt64) lo + ((UInt64)(hi) << 32))␊ |
105 | #define IOPhysSize␉64␊ |
106 | ␊ |
107 | #else␊ |
108 | ␊ |
109 | typedef IOPhysicalAddress32␉ IOPhysicalAddress;␊ |
110 | typedef IOPhysicalLength32␉ IOPhysicalLength;␊ |
111 | #define IOPhysical32( hi, lo )␉␉(lo)␊ |
112 | #define IOPhysSize␉32␊ |
113 | ␊ |
114 | #endif␊ |
115 | ␊ |
116 | ␊ |
117 | typedef struct␊ |
118 | {␊ |
119 | IOPhysicalAddress␉address;␊ |
120 | IOByteCount␉␉length;␊ |
121 | } IOPhysicalRange;␊ |
122 | ␊ |
123 | typedef struct ␊ |
124 | {␊ |
125 | IOVirtualAddress␉address;␊ |
126 | IOByteCount␉␉length;␊ |
127 | } IOVirtualRange;␊ |
128 | ␊ |
129 | #ifdef __LP64__␊ |
130 | typedef IOVirtualRange␉IOAddressRange;␊ |
131 | #else /* !__LP64__ */␊ |
132 | typedef struct ␊ |
133 | {␊ |
134 | mach_vm_address_t␉address;␊ |
135 | mach_vm_size_t␉length;␊ |
136 | } IOAddressRange;␊ |
137 | #endif /* !__LP64__ */␊ |
138 | ␊ |
139 | /*␊ |
140 | * Map between #defined or enum'd constants and text description.␊ |
141 | */␊ |
142 | typedef struct {␊ |
143 | ␉int value;␊ |
144 | ␉const char *name;␊ |
145 | } IONamedValue;␊ |
146 | ␊ |
147 | ␊ |
148 | /*␊ |
149 | * Memory alignment -- specified as a power of two.␊ |
150 | */␊ |
151 | typedef unsigned int␉IOAlignment;␊ |
152 | ␊ |
153 | #define IO_NULL_VM_TASK␉␉((vm_task_t)0)␊ |
154 | ␊ |
155 | ␊ |
156 | /*␊ |
157 | * Pull in machine specific stuff.␊ |
158 | */␊ |
159 | ␊ |
160 | //#include <IOKit/machine/IOTypes.h>␊ |
161 | ␊ |
162 | #ifndef MACH_KERNEL␊ |
163 | ␊ |
164 | #ifndef __IOKIT_PORTS_DEFINED__␊ |
165 | #define __IOKIT_PORTS_DEFINED__␊ |
166 | typedef struct OSObject * io_object_t;␊ |
167 | #endif /* __IOKIT_PORTS_DEFINED__ */␊ |
168 | ␊ |
169 | #include <device/device_types.h>␊ |
170 | ␊ |
171 | typedef io_object_t␉io_connect_t;␊ |
172 | typedef io_object_t␉io_enumerator_t;␊ |
173 | typedef io_object_t␉io_iterator_t;␊ |
174 | typedef io_object_t␉io_registry_entry_t;␊ |
175 | typedef io_object_t␉io_service_t;␊ |
176 | ␊ |
177 | #define␉IO_OBJECT_NULL␉((io_object_t) 0)␊ |
178 | ␊ |
179 | #endif /* MACH_KERNEL */␊ |
180 | ␊ |
181 | // IOConnectMapMemory memoryTypes␊ |
182 | enum {␊ |
183 | kIODefaultMemoryType␉= 0␊ |
184 | };␊ |
185 | ␊ |
186 | enum {␊ |
187 | kIODefaultCache␉␉= 0,␊ |
188 | kIOInhibitCache␉␉= 1,␊ |
189 | kIOWriteThruCache␉␉= 2,␊ |
190 | kIOCopybackCache␉␉= 3,␊ |
191 | kIOWriteCombineCache␉= 4␊ |
192 | };␊ |
193 | ␊ |
194 | // IOMemory mapping options␊ |
195 | enum {␊ |
196 | kIOMapAnywhere␉␉= 0x00000001,␊ |
197 | ␊ |
198 | kIOMapCacheMask␉␉= 0x00000700,␊ |
199 | kIOMapCacheShift␉␉= 8,␊ |
200 | kIOMapDefaultCache␉␉= kIODefaultCache << kIOMapCacheShift,␊ |
201 | kIOMapInhibitCache␉␉= kIOInhibitCache << kIOMapCacheShift,␊ |
202 | kIOMapWriteThruCache␉= kIOWriteThruCache << kIOMapCacheShift,␊ |
203 | kIOMapCopybackCache␉␉= kIOCopybackCache << kIOMapCacheShift,␊ |
204 | kIOMapWriteCombineCache␉= kIOWriteCombineCache << kIOMapCacheShift,␊ |
205 | ␊ |
206 | kIOMapUserOptionsMask␉= 0x00000fff,␊ |
207 | ␊ |
208 | kIOMapReadOnly␉␉= 0x00001000,␊ |
209 | ␊ |
210 | kIOMapStatic␉␉= 0x01000000,␊ |
211 | kIOMapReference␉␉= 0x02000000,␊ |
212 | kIOMapUnique␉␉= 0x04000000␊ |
213 | };␊ |
214 | ␊ |
215 | /*! @enum Scale Factors␊ |
216 | @discussion Used when a scale_factor parameter is required to define a unit of time.␊ |
217 | @constant kNanosecondScale Scale factor for nanosecond based times.␊ |
218 | @constant kMicrosecondScale Scale factor for microsecond based times.␊ |
219 | @constant kMillisecondScale Scale factor for millisecond based times.␊ |
220 | @constant kTickScale Scale factor for the standard (100Hz) tick.␊ |
221 | @constant kSecondScale Scale factor for second based times. */␊ |
222 | ␊ |
223 | enum {␊ |
224 | kNanosecondScale = 1,␊ |
225 | kMicrosecondScale = 1000,␊ |
226 | kMillisecondScale = 1000 * 1000,␊ |
227 | kSecondScale = 1000 * 1000 * 1000,␊ |
228 | kTickScale = (kSecondScale / 100)␊ |
229 | };␊ |
230 | ␊ |
231 | /* compatibility types */␊ |
232 | ␊ |
233 | ␊ |
234 | #ifdef __cplusplus␊ |
235 | }␊ |
236 | #endif␊ |
237 | ␊ |
238 | #endif /* ! __IOKIT_IOTYPES_H */␊ |
239 |