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_IOUSBROOTHUBDEVICE_H␊ |
25 | #define _IOKIT_IOUSBROOTHUBDEVICE_H␊ |
26 | ␊ |
27 | #include <IOKit/usb/IOUSBHubDevice.h>␊ |
28 | ␊ |
29 | /*!␊ |
30 | @class IOUSBRootHubDevice␊ |
31 | @abstract The object representing the Root Hub simulation.␊ |
32 | */␊ |
33 | class IOUSBRootHubDevice : public IOUSBHubDevice␊ |
34 | {␊ |
35 | OSDeclareDefaultStructors(IOUSBRootHubDevice)␊ |
36 | ␊ |
37 | private:␊ |
38 | UInt16␉␉␉␉configuration;␊ |
39 | ␉IOCommandGate␉␉*_commandGate;␊ |
40 | ␊ |
41 | ␉// private method which overrides the same method in IOUSBHubDevice␊ |
42 | ␉virtual bool␉␉␉InitializeCharacteristics(void);␉␉␉␉␉// used at start␊ |
43 | ␉␊ |
44 | struct ExpansionData ␊ |
45 | ␉{␊ |
46 | ␉␉IOService *␉␉_IOResourcesEntry;␊ |
47 | ␉};␊ |
48 | ExpansionData *_expansionData;␊ |
49 | ␊ |
50 | public:␊ |
51 | ␉// static methods␊ |
52 | static IOUSBRootHubDevice␉*NewRootHubDevice(void);␊ |
53 | static IOReturn␉␉␉␉GatedDeviceRequest (OSObject *␉owner, ␊ |
54 | ␉␉␉␉␉␉␉␉␉␉␉␉void *␉␉arg0, ␊ |
55 | ␉␉␉␉␉␉␉␉␉␉␉␉void *␉␉arg1, ␊ |
56 | ␉␉␉␉␉␉␉␉␉␉␉␉void *␉␉arg2, ␊ |
57 | ␉␉␉␉␉␉␉␉␉␉␉␉void *␉␉arg3 );␊ |
58 | ␊ |
59 | ␉// IOKit methods␊ |
60 | virtual bool ␉init();␊ |
61 | ␉virtual bool ␉start( IOService * provider );␊ |
62 | virtual void ␉stop( IOService *provider );␊ |
63 | virtual void␉free();␊ |
64 | ␊ |
65 | ␉// IOUSBHubDevice methods␊ |
66 | ␉virtual bool␉␉␉IsRootHub(void);␊ |
67 | ␉virtual UInt32␉␉␉RequestExtraPower(UInt32 requestedPower);␊ |
68 | ␉virtual void␉␉␉ReturnExtraPower(UInt32 returnedPower);␊ |
69 | ␊ |
70 | ␉// ␊ |
71 | ␉virtual UInt32␉␉␉RequestSleepPower(UInt32 requestedPower);␊ |
72 | ␉virtual void␉␉␉ReturnSleepPower(UInt32 returnedPower);␊ |
73 | ␉␊ |
74 | ␉// a non static but non-virtual function␊ |
75 | ␉IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion);␊ |
76 | ␊ |
77 | ␉// IOUSBDevice methods overriden here␊ |
78 | virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0);␊ |
79 | virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0);␊ |
80 | ␊ |
81 | OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0);␊ |
82 | ␉virtual IOReturn␉␉GetDeviceInformation(UInt32 *info);␊ |
83 | ␉␊ |
84 | OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1);␊ |
85 | ␉virtual void␉␉␉InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent);␊ |
86 | ␉␊ |
87 | OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2);␊ |
88 | ␉virtual void␉␉␉SetSleepCurrent(UInt32 sleepCurrent);␊ |
89 | ␉␊ |
90 | OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3);␊ |
91 | ␉virtual UInt32␉␉␉GetSleepCurrent();␊ |
92 | ␊ |
93 | OSMetaClassDeclareReservedUnused(IOUSBRootHubDevice, 4);␊ |
94 | };␊ |
95 | ␊ |
96 | #endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */␊ |
97 | ␊ |
98 |