]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/pwr_mgt/IOPowerConnection.h
xnu-123.5.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / IOPowerConnection.h
1 /*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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.
11 *
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
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
24 *
25 * HISTORY
26 *
27 */
28
29
30 #ifndef _IOKIT_IOPOWERCONNECTION_H
31 #define _IOKIT_IOPOWERCONNECTION_H
32
33 #include <IOKit/IOService.h>
34 #include <IOKit/pwr_mgt/IOPM.h>
35
36 class IOPowerConnection : public IOService
37 {
38 OSDeclareDefaultStructors(IOPowerConnection)
39
40 protected:
41 /*! @field parentKnowsState true: parent knows state of its domain
42 used by child */
43 bool stateKnown;
44 /*! @field currentPowerFlags power flags which describe the current state of the power domain
45 used by child */
46 IOPMPowerFlags currentPowerFlags;
47 /*! @field desiredDomainState state number which corresponds to the child's desire
48 used by parent */
49 unsigned long desiredDomainState;
50
51 public:
52 /*! @function setParentKnowsState
53 @abstract Sets the stateKnown variable.
54 @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. */
55 void setParentKnowsState (bool );
56
57 /*! @function setParentCurrentPowerFlags
58 @abstract Sets the currentPowerFlags variable.
59 @discussion Called by the parent when the object is created and called by the child when it discovers that the parent state is changing. */
60 void setParentCurrentPowerFlags (IOPMPowerFlags );
61
62 /*! @function parentKnowsState
63 @abstract Returns the stateKnown variable. */
64 bool parentKnowsState (void );
65
66 /*! @function parentCurrentPowerFlags
67 @abstract Returns the currentPowerFlags variable. */
68 IOPMPowerFlags parentCurrentPowerFlags (void );
69
70 /*! @function setDesiredDomainState
71 @abstract Sets the desiredDomainState variable.
72 @discussion Called by the child. */
73 void setDesiredDomainState (unsigned long );
74
75 /*! @function getDesiredDomainState
76 @abstract Returns the desiredDomainState variable.
77 @discussion Called by the child. */
78 unsigned long getDesiredDomainState ( void );
79 };
80
81 #endif /* ! _IOKIT_IOPOWERCONNECTION_H */
82