]>
git.saurik.com Git - apple/xnu.git/blob - iokit/Kernel/IOPowerConnection.cpp
b8c7c21dfdbedc2dbdf164a3785f0ce326f507c1
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #include <IOKit/pwr_mgt/IOPowerConnection.h>
26 #define super IOService
27 OSDefineMetaClassAndStructors(IOPowerConnection
,IOService
)
30 // **********************************************************************************
31 // setDesiredDomainState
33 // Parent of the connection calls here to save the childs desire
34 // **********************************************************************************
35 void IOPowerConnection::setDesiredDomainState (unsigned long stateNumber
)
37 desiredDomainState
= stateNumber
;
41 // **********************************************************************************
42 // getDesiredDomainState
44 // **********************************************************************************
45 unsigned long IOPowerConnection::getDesiredDomainState ( void )
47 return desiredDomainState
;
51 // **********************************************************************************
52 // setChildHasRequestedPower
54 // Parent of the connection calls here when the child requests power
55 // **********************************************************************************
56 void IOPowerConnection::setChildHasRequestedPower ( void )
61 // **********************************************************************************
62 // childHasRequestedPower
64 // Parent of the connection calls here when the child requests power
65 // **********************************************************************************
66 bool IOPowerConnection::childHasRequestedPower ( void )
72 // **********************************************************************************
73 // setPreventIdleSleepFlag
75 // **********************************************************************************
76 void IOPowerConnection::setPreventIdleSleepFlag ( unsigned long flag
)
78 preventIdleSleepFlag
= (flag
!= 0);
82 // **********************************************************************************
83 // getPreventIdleSleepFlag
85 // **********************************************************************************
86 bool IOPowerConnection::getPreventIdleSleepFlag ( void )
88 return preventIdleSleepFlag
;
92 // **********************************************************************************
93 // setPreventSystemSleepFlag
95 // **********************************************************************************
96 void IOPowerConnection::setPreventSystemSleepFlag ( unsigned long flag
)
98 preventSystemSleepFlag
= (flag
!= 0);
102 // **********************************************************************************
103 // getPreventSystemSleepFlag
105 // **********************************************************************************
106 bool IOPowerConnection::getPreventSystemSleepFlag ( void )
108 return preventSystemSleepFlag
;
112 // **********************************************************************************
113 // setParentKnowsState
115 // Child of the connection calls here to set its reminder that the parent does
116 // or does not yet know the state if its domain.
117 // **********************************************************************************
118 void IOPowerConnection::setParentKnowsState (bool flag
)
124 // **********************************************************************************
125 // setParentCurrentPowerFlags
127 // Child of the connection calls here to save what the parent says
128 // is the state if its domain.
129 // **********************************************************************************
130 void IOPowerConnection::setParentCurrentPowerFlags (IOPMPowerFlags flags
)
132 currentPowerFlags
= flags
;
136 // **********************************************************************************
139 // **********************************************************************************
140 bool IOPowerConnection::parentKnowsState (void )
146 // **********************************************************************************
147 // parentCurrentPowerFlags
149 // **********************************************************************************
150 IOPMPowerFlags
IOPowerConnection::parentCurrentPowerFlags (void )
152 return currentPowerFlags
;
156 // **********************************************************************************
159 // **********************************************************************************
160 void IOPowerConnection::setAwaitingAck ( bool value
)
166 // **********************************************************************************
169 // **********************************************************************************
170 bool IOPowerConnection::getAwaitingAck ( void )