[1046] | 1 | #ifndef _POWRPROF_H
|
---|
| 2 | #define _POWRPROF_H
|
---|
| 3 | #if __GNUC__ >= 3
|
---|
| 4 | #pragma GCC system_header
|
---|
| 5 | #endif
|
---|
| 6 |
|
---|
| 7 | #ifdef __cplusplus
|
---|
| 8 | extern "C" {
|
---|
| 9 | #endif
|
---|
| 10 |
|
---|
| 11 | #define EnableMultiBatteryDisplay 2
|
---|
| 12 | #define EnablePasswordLogon 4
|
---|
| 13 | #define EnableSysTrayBatteryMeter 1
|
---|
| 14 | #define EnableWakeOnRing 8
|
---|
| 15 | #define EnableVideoDimDisplay 16
|
---|
| 16 | #define NEWSCHEME (UINT)-1
|
---|
| 17 |
|
---|
| 18 | #ifndef RC_INVOKED
|
---|
| 19 | #include <ntdef.h> /* for NTSTATUS */
|
---|
| 20 | typedef struct _GLOBAL_MACHINE_POWER_POLICY{
|
---|
| 21 | ULONG Revision;
|
---|
| 22 | SYSTEM_POWER_STATE LidOpenWakeAc;
|
---|
| 23 | SYSTEM_POWER_STATE LidOpenWakeDc;
|
---|
| 24 | ULONG BroadcastCapacityResolution;
|
---|
| 25 | } GLOBAL_MACHINE_POWER_POLICY, *PGLOBAL_MACHINE_POWER_POLICY;
|
---|
| 26 | typedef struct _GLOBAL_USER_POWER_POLICY{
|
---|
| 27 | ULONG Revision;
|
---|
| 28 | POWER_ACTION_POLICY PowerButtonAc;
|
---|
| 29 | POWER_ACTION_POLICY PowerButtonDc;
|
---|
| 30 | POWER_ACTION_POLICY SleepButtonAc;
|
---|
| 31 | POWER_ACTION_POLICY SleepButtonDc;
|
---|
| 32 | POWER_ACTION_POLICY LidCloseAc;
|
---|
| 33 | POWER_ACTION_POLICY LidCloseDc;
|
---|
| 34 | SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
|
---|
| 35 | ULONG GlobalFlags;
|
---|
| 36 | } GLOBAL_USER_POWER_POLICY, *PGLOBAL_USER_POWER_POLICY;
|
---|
| 37 | typedef struct _GLOBAL_POWER_POLICY{
|
---|
| 38 | GLOBAL_USER_POWER_POLICY user;
|
---|
| 39 | GLOBAL_MACHINE_POWER_POLICY mach;
|
---|
| 40 | } GLOBAL_POWER_POLICY, *PGLOBAL_POWER_POLICY;
|
---|
| 41 | typedef struct _MACHINE_POWER_POLICY{
|
---|
| 42 | ULONG Revision;
|
---|
| 43 | SYSTEM_POWER_STATE MinSleepAc;
|
---|
| 44 | SYSTEM_POWER_STATE MinSleepDc;
|
---|
| 45 | SYSTEM_POWER_STATE ReducedLatencySleepAc;
|
---|
| 46 | SYSTEM_POWER_STATE ReducedLatencySleepDc;
|
---|
| 47 | ULONG DozeTimeoutAc;
|
---|
| 48 | ULONG DozeTimeoutDc;
|
---|
| 49 | ULONG DozeS4TimeoutAc;
|
---|
| 50 | ULONG DozeS4TimeoutDc;
|
---|
| 51 | UCHAR MinThrottleAc;
|
---|
| 52 | UCHAR MinThrottleDc;
|
---|
| 53 | UCHAR pad1[2];
|
---|
| 54 | POWER_ACTION_POLICY OverThrottledAc;
|
---|
| 55 | POWER_ACTION_POLICY OverThrottledDc;
|
---|
| 56 | } MACHINE_POWER_POLICY, *PMACHINE_POWER_POLICY;
|
---|
| 57 | typedef struct _MACHINE_PROCESSOR_POWER_POLICY {
|
---|
| 58 | ULONG Revision;
|
---|
| 59 | PROCESSOR_POWER_POLICY ProcessorPolicyAc;
|
---|
| 60 | PROCESSOR_POWER_POLICY ProcessorPolicyDc;
|
---|
| 61 | } MACHINE_PROCESSOR_POWER_POLICY, *PMACHINE_PROCESSOR_POWER_POLICY;
|
---|
| 62 | typedef struct _USER_POWER_POLICY{
|
---|
| 63 | ULONG Revision;
|
---|
| 64 | POWER_ACTION_POLICY IdleAc;
|
---|
| 65 | POWER_ACTION_POLICY IdleDc;
|
---|
| 66 | ULONG IdleTimeoutAc;
|
---|
| 67 | ULONG IdleTimeoutDc;
|
---|
| 68 | UCHAR IdleSensitivityAc;
|
---|
| 69 | UCHAR IdleSensitivityDc;
|
---|
| 70 | UCHAR ThrottlePolicyAc;
|
---|
| 71 | UCHAR ThrottlePolicyDc;
|
---|
| 72 | SYSTEM_POWER_STATE MaxSleepAc;
|
---|
| 73 | SYSTEM_POWER_STATE MaxSleepDc;
|
---|
| 74 | ULONG Reserved[2];
|
---|
| 75 | ULONG VideoTimeoutAc;
|
---|
| 76 | ULONG VideoTimeoutDc;
|
---|
| 77 | ULONG SpindownTimeoutAc;
|
---|
| 78 | ULONG SpindownTimeoutDc;
|
---|
| 79 | BOOLEAN OptimizeForPowerAc;
|
---|
| 80 | BOOLEAN OptimizeForPowerDc;
|
---|
| 81 | UCHAR FanThrottleToleranceAc;
|
---|
| 82 | UCHAR FanThrottleToleranceDc;
|
---|
| 83 | UCHAR ForcedThrottleAc;
|
---|
| 84 | UCHAR ForcedThrottleDc;
|
---|
| 85 | } USER_POWER_POLICY, *PUSER_POWER_POLICY;
|
---|
| 86 | typedef struct _POWER_POLICY{
|
---|
| 87 | USER_POWER_POLICY user;
|
---|
| 88 | MACHINE_POWER_POLICY mach;
|
---|
| 89 | } POWER_POLICY, *PPOWER_POLICY;
|
---|
| 90 | typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(UINT, DWORD, LPTSTR, DWORD, LPTSTR, PPOWER_POLICY, LPARAM);
|
---|
| 91 | typedef BOOLEAN (CALLBACK* PFNNTINITIATEPWRACTION)(POWER_ACTION, SYSTEM_POWER_STATE, ULONG, BOOLEAN);
|
---|
| 92 | NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
|
---|
| 93 | BOOLEAN WINAPI CanUserWritePwrScheme(VOID);
|
---|
| 94 | BOOLEAN WINAPI DeletePwrScheme(UINT);
|
---|
| 95 | BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM);
|
---|
| 96 | BOOLEAN WINAPI GetActivePwrScheme(PUINT);
|
---|
| 97 | BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
|
---|
| 98 | BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES);
|
---|
| 99 | BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT, PUINT);
|
---|
| 100 | BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY);
|
---|
| 101 | BOOLEAN WINAPI IsPwrHibernateAllowed(VOID);
|
---|
| 102 | BOOLEAN WINAPI IsPwrShutdownAllowed(VOID);
|
---|
| 103 | BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
|
---|
| 104 | BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
|
---|
| 105 | BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
|
---|
| 106 | BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);
|
---|
| 107 | BOOLEAN WINAPI SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY);
|
---|
| 108 | BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN);
|
---|
| 109 | BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
|
---|
| 110 | BOOLEAN WINAPI WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
|
---|
| 111 | BOOLEAN WINAPI ValidatePowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
|
---|
| 112 | BOOLEAN WINAPI WritePwrScheme(PUINT, LPTSTR, LPTSTR, PPOWER_POLICY);
|
---|
| 113 |
|
---|
| 114 | #endif /* RC_INVOKED */
|
---|
| 115 |
|
---|
| 116 | #ifdef __cplusplus
|
---|
| 117 | }
|
---|
| 118 | #endif
|
---|
| 119 |
|
---|
| 120 | #endif /* _POWRPROF_H */
|
---|