]>
git.saurik.com Git - apple/xnu.git/blob - iokit/Kernel/IOPowerConnection.cpp
cc324276544ee0690de328bcd11ea4374aa44a5b
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 #include <IOKit/pwr_mgt/IOPowerConnection.h>
25 #define super IOService
26 OSDefineMetaClassAndStructors(IOPowerConnection
,IOService
)
29 // **********************************************************************************
30 // setDesiredDomainState
32 // Parent of the connection calls here to save the childs desire
33 // **********************************************************************************
34 void IOPowerConnection::setDesiredDomainState (unsigned long stateNumber
)
36 desiredDomainState
= stateNumber
;
40 // **********************************************************************************
41 // getDesiredDomainState
43 // **********************************************************************************
44 unsigned long IOPowerConnection::getDesiredDomainState ( void )
46 return desiredDomainState
;
50 // **********************************************************************************
51 // setChildHasRequestedPower
53 // Parent of the connection calls here when the child requests power
54 // **********************************************************************************
55 void IOPowerConnection::setChildHasRequestedPower ( void )
60 // **********************************************************************************
61 // childHasRequestedPower
63 // Parent of the connection calls here when the child requests power
64 // **********************************************************************************
65 bool IOPowerConnection::childHasRequestedPower ( void )
71 // **********************************************************************************
72 // setPreventIdleSleepFlag
74 // **********************************************************************************
75 void IOPowerConnection::setPreventIdleSleepFlag ( unsigned long flag
)
77 preventIdleSleepFlag
= (flag
!= 0);
81 // **********************************************************************************
82 // getPreventIdleSleepFlag
84 // **********************************************************************************
85 bool IOPowerConnection::getPreventIdleSleepFlag ( void )
87 return preventIdleSleepFlag
;
91 // **********************************************************************************
92 // setPreventSystemSleepFlag
94 // **********************************************************************************
95 void IOPowerConnection::setPreventSystemSleepFlag ( unsigned long flag
)
97 preventSystemSleepFlag
= (flag
!= 0);
101 // **********************************************************************************
102 // getPreventSystemSleepFlag
104 // **********************************************************************************
105 bool IOPowerConnection::getPreventSystemSleepFlag ( void )
107 return preventSystemSleepFlag
;
111 // **********************************************************************************
112 // setParentKnowsState
114 // Child of the connection calls here to set its reminder that the parent does
115 // or does not yet know the state if its domain.
116 // **********************************************************************************
117 void IOPowerConnection::setParentKnowsState (bool flag
)
123 // **********************************************************************************
124 // setParentCurrentPowerFlags
126 // Child of the connection calls here to save what the parent says
127 // is the state if its domain.
128 // **********************************************************************************
129 void IOPowerConnection::setParentCurrentPowerFlags (IOPMPowerFlags flags
)
131 currentPowerFlags
= flags
;
135 // **********************************************************************************
138 // **********************************************************************************
139 bool IOPowerConnection::parentKnowsState (void )
145 // **********************************************************************************
146 // parentCurrentPowerFlags
148 // **********************************************************************************
149 IOPMPowerFlags
IOPowerConnection::parentCurrentPowerFlags (void )
151 return currentPowerFlags
;
155 // **********************************************************************************
158 // **********************************************************************************
159 void IOPowerConnection::setAwaitingAck ( bool value
)
165 // **********************************************************************************
168 // **********************************************************************************
169 bool IOPowerConnection::getAwaitingAck ( void )