]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/pwr_mgt/RootDomain.h
xnu-344.34.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / RootDomain.h
index 28d95a059e0a838f9355589d68f23ace053fa629..acbb27fc5f4990a0ca24195bc55f5adda076ed2e 100644 (file)
@@ -27,6 +27,8 @@
 
 class RootDomainUserClient;
 
+#define kRootDomainSupportedFeatures "Supported Features"
+
 enum {
     kRootDomainSleepNotSupported       = 0x00000000,
     kRootDomainSleepSupported          = 0x00000001,
@@ -44,6 +46,7 @@ extern "C"
         IOReturn rootDomainShutdown ( void );
 }
 
+#define IOPM_ROOTDOMAIN_REV            2
 
 class IOPMrootDomain: public IOService
 {
@@ -59,6 +62,7 @@ public:
     virtual IOReturn setAggressiveness ( unsigned long, unsigned long );
     virtual IOReturn youAreRoot ( void );
     virtual IOReturn sleepSystem ( void );
+    virtual IOReturn setProperties ( OSObject * );
     IOReturn shutdownSystem ( void );
     IOReturn restartSystem ( void );
     virtual IOReturn receivePowerNotification (UInt32 msg);
@@ -66,7 +70,14 @@ public:
     virtual IOOptionBits getSleepSupported();
     virtual IOReturn requestPowerDomainState ( IOPMPowerFlags, IOPowerConnection *, unsigned long );
     virtual void handleSleepTimerExpiration ( void );
+    void stopIgnoringClamshellEventsDuringWakeup ( void );
     void wakeFromDoze( void );
+    void broadcast_it (unsigned long, unsigned long );
+    void publishFeature( const char *feature );
+
+    // Override of these methods for logging purposes.
+    virtual IOReturn changePowerStateTo ( unsigned long ordinal );
+    virtual IOReturn changePowerStateToPriv ( unsigned long ordinal );
 
 private:
 
@@ -75,7 +86,8 @@ private:
     long               longestNonSleepSlider;          // pref: longest of other idle times
     long               extraSleepDelay;                // sleepSlider - longestNonSleepSlider
     thread_call_t      extraSleepTimer;                // used to wait between say display idle and system idle
-
+    thread_call_t   clamshellWakeupIgnore;   // Used to ignore clamshell close events while we're waking from sleep
+    
     virtual void powerChangeDone ( unsigned long );
     virtual void command_received ( void *, void * , void * , void *);
     virtual bool tellChangeDown ( unsigned long stateNum);
@@ -98,6 +110,7 @@ private:
     void adjustPowerState( void );
     void restoreUserSpinDownTimeout ( void );
 
+    
     unsigned int user_spindown;       // User's selected disk spindown value
 
     unsigned int systemBooting:1;
@@ -107,8 +120,13 @@ private:
     unsigned int canSleep:1;
     unsigned int idleSleepPending:1;
     unsigned int sleepASAP:1;
-    unsigned int reservedA:1;
-    unsigned int reservedB[2];
+    unsigned int desktopMode:1;
+
+    unsigned int acAdaptorConnect:1;
+    unsigned int ignoringClamshellDuringWakeup:1;
+    unsigned int reservedA:6;
+    unsigned char reservedB[3];
+
     thread_call_t diskSyncCalloutEntry;
     IOOptionBits platformSleepSupport;
 };