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 * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
30 #ifndef _IOKIT_IOPOWERCONNECTION_H
31 #define _IOKIT_IOPOWERCONNECTION_H
33 #include <IOKit/IOService.h>
34 #include <IOKit/pwr_mgt/IOPM.h>
36 class IOPowerConnection
: public IOService
38 OSDeclareDefaultStructors(IOPowerConnection
)
41 /*! @field parentKnowsState true: parent knows state of its domain
44 /*! @field currentPowerFlags power flags which describe the current state of the power domain
46 IOPMPowerFlags currentPowerFlags
;
47 /*! @field desiredDomainState state number which corresponds to the child's desire
49 unsigned long desiredDomainState
;
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 );
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
);
62 /*! @function parentKnowsState
63 @abstract Returns the stateKnown variable. */
64 bool parentKnowsState (void );
66 /*! @function parentCurrentPowerFlags
67 @abstract Returns the currentPowerFlags variable. */
68 IOPMPowerFlags
parentCurrentPowerFlags (void );
70 /*! @function setDesiredDomainState
71 @abstract Sets the desiredDomainState variable.
72 @discussion Called by the child. */
73 void setDesiredDomainState (unsigned long );
75 /*! @function getDesiredDomainState
76 @abstract Returns the desiredDomainState variable.
77 @discussion Called by the child. */
78 unsigned long getDesiredDomainState ( void );
81 #endif /* ! _IOKIT_IOPOWERCONNECTION_H */