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-2000 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 | /*␊ |
29 | * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.␊ |
30 | *␊ |
31 | * HISTORY␊ |
32 | *␊ |
33 | */␊ |
34 | ␊ |
35 | ␊ |
36 | #ifndef _IOKIT_IOPOWERCONNECTION_H␊ |
37 | #define _IOKIT_IOPOWERCONNECTION_H␊ |
38 | ␊ |
39 | #include <IOKit/IOService.h>␊ |
40 | #include <IOKit/pwr_mgt/IOPM.h>␊ |
41 | ␊ |
42 | class IOPowerConnection : public IOService␊ |
43 | {␊ |
44 | OSDeclareDefaultStructors(IOPowerConnection)␊ |
45 | ␊ |
46 | protected:␊ |
47 | /*! @field parentKnowsState␉true: parent knows state of its domain␊ |
48 | ␉␉␉␉␉used by child */␊ |
49 | bool␉␉stateKnown;␊ |
50 | /*! @field currentPowerFlags␉power flags which describe the current state of the power domain␊ |
51 | ␉␉␉␉␉used by child */␊ |
52 | IOPMPowerFlags ␉currentPowerFlags;␊ |
53 | /*! @field desiredDomainState␉state number which corresponds to the child's desire␊ |
54 | ␉␉␉␉␉used by parent */␊ |
55 | unsigned long␉desiredDomainState;␊ |
56 | ␊ |
57 | /*! @field requestFlag␉␉set to true when desiredDomainState is set */␊ |
58 | bool␉␉requestFlag;␊ |
59 | ␊ |
60 | /*! @field preventIdleSleepFlag␉true if child has this bit set in its desired state␊ |
61 | ␉␉␉␉␉used by parent */␊ |
62 | unsigned long␉preventIdleSleepFlag;␊ |
63 | ␊ |
64 | /*! @field preventSystemSleepFlag␉true if child has this bit set in its desired state␊ |
65 | ␉␉␉␉␉used by parent */␊ |
66 | unsigned long␉preventSystemSleepFlag;␊ |
67 | ␊ |
68 | /*! @field awaitingAck␉␉true if child has not yet acked our notification␊ |
69 | ␉␉␉␉␉used by parent */␊ |
70 | bool␉␉awaitingAck;␊ |
71 | ␊ |
72 | /*! @field readyFlag␉␉true if the child has been added as a power child␊ |
73 | ␉␉␉␉␉used by parent */␊ |
74 | ␉bool␉␉readyFlag;␊ |
75 | ␊ |
76 | public:␊ |
77 | /*! @function setParentKnowsState␊ |
78 | @abstract Sets the stateKnown variable.␊ |
79 | @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */␊ |
80 | void setParentKnowsState (bool );␊ |
81 | ␊ |
82 | /*! @function setParentCurrentPowerFlags␊ |
83 | @abstract Sets the currentPowerFlags variable.␊ |
84 | @discussion Called by the parent when the object is created and called by the child when it discovers that the parent state is changing. */␊ |
85 | void setParentCurrentPowerFlags (IOPMPowerFlags );␊ |
86 | ␊ |
87 | /*! @function parentKnowsState␊ |
88 | @abstract Returns the stateKnown variable. */␊ |
89 | bool parentKnowsState (void );␊ |
90 | ␊ |
91 | /*! @function parentCurrentPowerFlags␊ |
92 | @abstract Returns the currentPowerFlags variable. */␊ |
93 | IOPMPowerFlags parentCurrentPowerFlags (void );␊ |
94 | ␊ |
95 | /*! @function setDesiredDomainState␊ |
96 | @abstract Sets the desiredDomainState variable.␊ |
97 | @discussion Called by the parent. */␊ |
98 | void setDesiredDomainState (unsigned long );␊ |
99 | ␊ |
100 | /*! @function getDesiredDomainState␊ |
101 | @abstract Returns the desiredDomainState variable.␊ |
102 | @discussion Called by the parent. */␊ |
103 | unsigned long getDesiredDomainState ( void );␊ |
104 | ␊ |
105 | /*! @function setChildHasRequestedPower␊ |
106 | @abstract Set the flag that says that the child has called requestPowerDomainState.␊ |
107 | @discussion Called by the parent. */␊ |
108 | void setChildHasRequestedPower ( void );␊ |
109 | ␊ |
110 | ␊ |
111 | /*! @function childHasRequestedPower␊ |
112 | @abstract Return the flag that says whether the child has called requestPowerDomainState.␊ |
113 | @discussion Called by the PCI Aux Power Supply Driver to see if a device driver␊ |
114 | is power managed. */␊ |
115 | bool childHasRequestedPower ( void );␊ |
116 | ␊ |
117 | /*! @function setPreventIdleSleepFlag␊ |
118 | @abstract Sets the preventIdleSleepFlag variable.␊ |
119 | @discussion Called by the parent. */␊ |
120 | void setPreventIdleSleepFlag (unsigned long );␊ |
121 | ␊ |
122 | /*! @function getPreventIdleSleepFlag␊ |
123 | @abstract Returns the preventIdleSleepFlag variable.␊ |
124 | @discussion Called by the parent. */␊ |
125 | bool getPreventIdleSleepFlag ( void );␊ |
126 | ␊ |
127 | /*! @function setPreventSystemSleepFlag␊ |
128 | @abstract Sets the preventSystemSleepFlag variable.␊ |
129 | @discussion Called by the parent. */␊ |
130 | void setPreventSystemSleepFlag (unsigned long );␊ |
131 | ␊ |
132 | /*! @function getPreventSystemSleepFlag␊ |
133 | @abstract Returns the preventSystemSleepFlag variable.␊ |
134 | @discussion Called by the parent. */␊ |
135 | bool getPreventSystemSleepFlag ( void );␊ |
136 | ␊ |
137 | /*! @function setAwaitingAck␊ |
138 | @abstract Sets the awaitingAck variable.␊ |
139 | @discussion Called by the parent. */␊ |
140 | void setAwaitingAck ( bool );␊ |
141 | ␊ |
142 | /*! @function getAwaitingAck␊ |
143 | @abstract Returns the awaitingAck variable.␊ |
144 | @discussion Called by the parent. */␊ |
145 | bool getAwaitingAck ( void );␊ |
146 | ␊ |
147 | /*! @function setReadyFlag␊ |
148 | @abstract Sets the readyFlag variable.␊ |
149 | @discussion Called by the parent. */␊ |
150 | ␉void setReadyFlag( bool flag );␊ |
151 | ␊ |
152 | /*! @function getReadyFlag␊ |
153 | @abstract Returns the readyFlag variable.␊ |
154 | @discussion Called by the parent. */␊ |
155 | ␉bool getReadyFlag( void ) const;␊ |
156 | };␊ |
157 | ␊ |
158 | #endif /* ! _IOKIT_IOPOWERCONNECTION_H */␊ |
159 | ␊ |
160 |