Root/
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) 1998-2006 Apple Computer, 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 _IOKIT_IOUSBUSERCLIENT_H␊ |
25 | #define _IOKIT_IOUSBUSERCLIENT_H␊ |
26 | ␊ |
27 | // these are the new User Client method names ␊ |
28 | enum {␊ |
29 | kUSBDeviceUserClientOpen,␊ |
30 | kUSBDeviceUserClientClose,␊ |
31 | kUSBDeviceUserClientSetConfig,␊ |
32 | kUSBDeviceUserClientGetConfig,␊ |
33 | kUSBDeviceUserClientGetConfigDescriptor,␊ |
34 | kUSBDeviceUserClientGetFrameNumber,␊ |
35 | kUSBDeviceUserClientDeviceRequestOut,␊ |
36 | kUSBDeviceUserClientDeviceRequestIn,␊ |
37 | kUSBDeviceUserClientCreateInterfaceIterator,␊ |
38 | kUSBDeviceUserClientResetDevice,␊ |
39 | kUSBDeviceUserClientSuspend,␊ |
40 | kUSBDeviceUserClientAbortPipeZero,␊ |
41 | kUSBDeviceUserClientReEnumerateDevice,␊ |
42 | kUSBDeviceUserClientGetMicroFrameNumber,␊ |
43 | kUSBDeviceUserClientGetFrameNumberWithTime,␊ |
44 | kUSBDeviceUserClientSetAsyncPort,␊ |
45 | ␉kUSBDeviceUserClientGetDeviceInformation,␊ |
46 | ␉kUSBDeviceUserClientRequestExtraPower,␊ |
47 | ␉kUSBDeviceUserClientReturnExtraPower,␊ |
48 | ␉kUSBDeviceUserClientGetExtraPowerAllocated,␊ |
49 | kIOUSBLibDeviceUserClientNumCommands␊ |
50 | };␊ |
51 | ␊ |
52 | enum {␊ |
53 | kUSBInterfaceUserClientOpen,␊ |
54 | kUSBInterfaceUserClientClose,␊ |
55 | kUSBInterfaceUserClientGetDevice,␊ |
56 | kUSBInterfaceUserClientSetAlternateInterface,␊ |
57 | kUSBInterfaceUserClientGetFrameNumber,␊ |
58 | kUSBInterfaceUserClientGetPipeProperties,␊ |
59 | kUSBInterfaceUserClientReadPipe,␊ |
60 | kUSBInterfaceUserClientWritePipe,␊ |
61 | kUSBInterfaceUserClientGetPipeStatus,␊ |
62 | kUSBInterfaceUserClientAbortPipe,␊ |
63 | kUSBInterfaceUserClientResetPipe,␊ |
64 | kUSBInterfaceUserClientClearPipeStall,␊ |
65 | kUSBInterfaceUserClientControlRequestOut,␊ |
66 | kUSBInterfaceUserClientControlRequestIn,␊ |
67 | kUSBInterfaceUserClientSetPipePolicy,␊ |
68 | kUSBInterfaceUserClientGetBandwidthAvailable,␊ |
69 | kUSBInterfaceUserClientGetEndpointProperties,␊ |
70 | kUSBInterfaceUserClientLowLatencyPrepareBuffer,␊ |
71 | kUSBInterfaceUserClientLowLatencyReleaseBuffer,␊ |
72 | kUSBInterfaceUserClientGetMicroFrameNumber,␊ |
73 | kUSBInterfaceUserClientGetFrameListTime,␊ |
74 | kUSBInterfaceUserClientGetFrameNumberWithTime,␊ |
75 | kUSBInterfaceUserClientSetAsyncPort,␊ |
76 | kUSBInterfaceUserClientReadIsochPipe,␊ |
77 | kUSBInterfaceUserClientWriteIsochPipe,␊ |
78 | kUSBInterfaceUserClientLowLatencyReadIsochPipe,␊ |
79 | kUSBInterfaceUserClientLowLatencyWriteIsochPipe,␊ |
80 | ␉kUSBInterfaceUserClientGetConfigDescriptor,␊ |
81 | kIOUSBLibInterfaceUserClientNumCommands␊ |
82 | };␊ |
83 | ␊ |
84 | ␊ |
85 | #if KERNEL␊ |
86 | #include <IOKit/IOService.h>␊ |
87 | #include <IOKit/IOUserClient.h>␊ |
88 | #include <IOKit/usb/USB.h>␊ |
89 | ␊ |
90 | //================================================================================================␊ |
91 | //␊ |
92 | // Structure declarations␊ |
93 | //␊ |
94 | //================================================================================================␊ |
95 | //␊ |
96 | typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock;␊ |
97 | ␊ |
98 | struct IOUSBUserClientAsyncParamBlock ␊ |
99 | {␊ |
100 | OSAsyncReference64␉␉␉fAsyncRef;␊ |
101 | uint32_t␉␉␉␉␉fAsyncCount;␊ |
102 | uint32_t␉␉␉␉␉fMax;␊ |
103 | IOMemoryDescriptor *␉␉fMem;␊ |
104 | IOUSBDevRequestDesc␉␉␉req;␊ |
105 | };␊ |
106 | ␊ |
107 | typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock;␊ |
108 | struct IOUSBInterfaceUserClientISOAsyncParamBlock ␊ |
109 | {␊ |
110 | OSAsyncReference64␉␉␉fAsyncRef;␊ |
111 | ␉uint32_t␉␉␉␉␉fAsyncCount;␊ |
112 | mach_vm_size_t␉␉␉␉frameLen;␉// In bytes␊ |
113 | mach_vm_address_t frameBase;␉// In user task␊ |
114 | IOMemoryDescriptor * dataMem;␊ |
115 | IOMemoryDescriptor * countMem;␊ |
116 | ␉uint64_t␉␉␉␉␉numFrames;␊ |
117 | IOUSBIsocFrame frames[0]; // Must be the last one␊ |
118 | };␊ |
119 | ␊ |
120 | ␊ |
121 | //================================================================================================␊ |
122 | //␊ |
123 | // This class is used to add an IOProviderMergeProperties dictionary entry to a provider's␊ |
124 | // property list, thus providing a tie between hardware and a CFBundle at hardware␊ |
125 | // load time. This property usually contains the user client class name and the CFPlugInTypes UUID's␊ |
126 | // but it can contain other properties.␊ |
127 | //␊ |
128 | //================================================================================================␊ |
129 | //␊ |
130 | class IOUSBUserClientInit : public IOService ␊ |
131 | {␊ |
132 | OSDeclareDefaultStructors(IOUSBUserClientInit);␊ |
133 | ␊ |
134 | public:␊ |
135 | ␊ |
136 | virtual bool␉␉start(IOService * provider) ;␊ |
137 | virtual bool ␉␉MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict);␊ |
138 | virtual bool␉␉MergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary);␊ |
139 | };␊ |
140 | ␊ |
141 | #endif // KERNEL␊ |
142 | ␊ |
143 | #endif /* ! _IOKIT_IOUSBUSERCLIENT_H */␊ |
144 | ␊ |
145 |