ReactOS 0.4.16-dev-1255-g6dd0406
powrprof.h
Go to the documentation of this file.
1#ifndef _POWRPROF_H
2#define _POWRPROF_H
3
4#ifndef __WINE_WINTERNL_H
5/* FIXME: Include this, so NTSTATUS gets defined.
6 Not very clean, but I can't get the hacH^H^H^override used
7 by official PSDK to work. */
8#include <ntsecapi.h>
9#endif
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#ifdef __REACTOS__
16#define NEWSCHEME (UINT)-1
17
18typedef enum _POWER_PLATFORM_ROLE {
29} POWER_PLATFORM_ROLE, *PPOWER_PLATFORM_ROLE;
30#endif
31
32#define EnableSysTrayBatteryMeter 0x01
33#define EnableMultiBatteryDisplay 0x02
34#define EnablePasswordLogon 0x04
35#define EnableWakeOnRing 0x08
36#define EnableVideoDimDisplay 0x10
37
45
58
59typedef struct _GLOBAL_POWER_POLICY {
64
65typedef struct _MACHINE_POWER_POLICY {
82
89
90typedef struct _USER_POWER_POLICY {
115
116typedef struct _POWER_POLICY {
121
152
155
173DWORD WINAPI PowerWriteACValueIndex(HKEY, const GUID *, const GUID *, const GUID *, DWORD);
183
184/* Power scheme */
186
187#ifdef __cplusplus
188}
189#endif
190
191#endif /* _POWRPROF_H */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define CALLBACK
Definition: compat.h:35
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define DWORD
Definition: nt_native.h:44
enum _POWER_INFORMATION_LEVEL POWER_INFORMATION_LEVEL
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
#define NUM_DISCHARGE_POLICIES
Definition: ntpoapi.h:432
#define BOOLEAN
Definition: pedump.c:73
DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD, HANDLE, PHPOWERNOTIFY)
Definition: powrprof.c:554
struct _POWER_POLICY * PPOWER_POLICY
struct _GLOBAL_MACHINE_POWER_POLICY GLOBAL_MACHINE_POWER_POLICY
BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY)
Definition: powrprof.c:721
BOOLEAN WINAPI DeletePwrScheme(UINT)
Definition: powrprof.c:99
BOOLEAN WINAPI IsPwrHibernateAllowed(VOID)
Definition: powrprof.c:450
BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM)
Definition: powrprof.c:219
BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY)
Definition: powrprof.c:632
BOOLEAN WINAPI IsPwrShutdownAllowed(VOID)
Definition: powrprof.c:469
DWORD WINAPI PowerEnumerate(HKEY, const GUID *, const GUID *, POWER_DATA_ACCESSOR, ULONG, UCHAR *, DWORD *)
Definition: powrprof.c:546
BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY)
Definition: powrprof.c:801
_POWER_DATA_ACCESSOR
Definition: powrprof.h:122
@ ACCESS_POSSIBLE_POWER_SETTING_DESCRIPTION
Definition: powrprof.h:129
@ ACCESS_POSSIBLE_POWER_SETTING_FRIENDLY_NAME
Definition: powrprof.h:128
@ ACCESS_FRIENDLY_NAME
Definition: powrprof.h:125
@ ACCESS_ACTIVE_SCHEME
Definition: powrprof.h:142
@ ACCESS_AC_POWER_SETTING_MAX
Definition: powrprof.h:144
@ ACCESS_DC_POWER_SETTING_MIN
Definition: powrprof.h:147
@ ACCESS_PROFILE
Definition: powrprof.h:148
@ ACCESS_POSSIBLE_POWER_SETTING
Definition: powrprof.h:127
@ ACCESS_DEFAULT_AC_POWER_SETTING
Definition: powrprof.h:130
@ ACCESS_AC_POWER_SETTING_MIN
Definition: powrprof.h:146
@ ACCESS_ATTRIBUTES
Definition: powrprof.h:138
@ ACCESS_CREATE_SCHEME
Definition: powrprof.h:143
@ ACCESS_DEFAULT_SECURITY_DESCRIPTOR
Definition: powrprof.h:137
@ ACCESS_INDIVIDUAL_SETTING
Definition: powrprof.h:141
@ ACCESS_DESCRIPTION
Definition: powrprof.h:126
@ ACCESS_DEFAULT_DC_POWER_SETTING
Definition: powrprof.h:131
@ ACCESS_SCHEME
Definition: powrprof.h:139
@ ACCESS_AC_POWER_SETTING_INDEX
Definition: powrprof.h:123
@ ACCESS_POSSIBLE_VALUE_INCREMENT
Definition: powrprof.h:134
@ ACCESS_POSSIBLE_VALUE_MAX
Definition: powrprof.h:133
@ ACCESS_ACTIVE_OVERLAY_SCHEME
Definition: powrprof.h:150
@ ACCESS_ICON_RESOURCE
Definition: powrprof.h:136
@ ACCESS_DC_POWER_SETTING_MAX
Definition: powrprof.h:145
@ ACCESS_DC_POWER_SETTING_INDEX
Definition: powrprof.h:124
@ ACCESS_POSSIBLE_VALUE_MIN
Definition: powrprof.h:132
@ ACCESS_SUBGROUP
Definition: powrprof.h:140
@ ACCESS_POSSIBLE_VALUE_UNITS
Definition: powrprof.h:135
@ ACCESS_OVERLAY_SCHEME
Definition: powrprof.h:149
BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT, PUINT)
Definition: powrprof.c:381
PVOID * PHPOWERNOTIFY
Definition: powrprof.h:154
enum _POWER_DATA_ACCESSOR * PPOWER_DATA_ACCESSOR
struct _GLOBAL_POWER_POLICY * PGLOBAL_POWER_POLICY
BOOLEAN WINAPI WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY)
Definition: powrprof.c:843
BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN)
Definition: powrprof.c:792
struct _USER_POWER_POLICY USER_POWER_POLICY
BOOLEAN(CALLBACK * PWRSCHEMESENUMPROC)(UINT, DWORD, LPWSTR, DWORD, LPWSTR, PPOWER_POLICY, LPARAM)
Definition: powrprof.h:153
BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES)
Definition: powrprof.c:358
BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY)
Definition: powrprof.c:321
struct _GLOBAL_POWER_POLICY GLOBAL_POWER_POLICY
struct _GLOBAL_MACHINE_POWER_POLICY * PGLOBAL_MACHINE_POWER_POLICY
struct _USER_POWER_POLICY * PUSER_POWER_POLICY
BOOLEAN WINAPI CanUserWritePwrScheme(VOID)
Definition: powrprof.c:79
struct _GLOBAL_USER_POWER_POLICY * PGLOBAL_USER_POWER_POLICY
BOOLEAN WINAPI ValidatePowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY)
Definition: powrprof.c:1128
POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRole(void)
Definition: powrprof.c:534
NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG)
Definition: powrprof.c:59
PVOID HPOWERNOTIFY
Definition: powrprof.h:154
DWORD WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY)
Definition: powrprof.c:561
struct _GLOBAL_USER_POWER_POLICY GLOBAL_USER_POWER_POLICY
BOOLEAN WINAPI WritePwrScheme(PUINT, LPWSTR, LPWSTR, PPOWER_POLICY)
Definition: powrprof.c:877
struct _MACHINE_POWER_POLICY * PMACHINE_POWER_POLICY
BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY)
Definition: powrprof.c:443
BOOLEAN WINAPI GetActivePwrScheme(PUINT)
Definition: powrprof.c:285
BOOLEAN WINAPI SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY)
Definition: powrprof.c:753
DWORD WINAPI PowerSettingUnregisterNotification(HPOWERNOTIFY)
Definition: powrprof.c:574
struct _MACHINE_POWER_POLICY MACHINE_POWER_POLICY
BOOLEAN WINAPI IsPwrSuspendAllowed(VOID)
Definition: powrprof.c:488
enum _POWER_DATA_ACCESSOR POWER_DATA_ACCESSOR
struct _MACHINE_PROCESSOR_POWER_POLICY * PMACHINE_PROCESSOR_POWER_POLICY
BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY)
Definition: powrprof.c:695
struct _MACHINE_PROCESSOR_POWER_POLICY MACHINE_PROCESSOR_POWER_POLICY
struct _POWER_POLICY POWER_POLICY
DWORD WINAPI PowerWriteACValueIndex(HKEY, const GUID *, const GUID *, const GUID *, DWORD)
Definition: powrprof.c:580
DWORD WINAPI PowerSettingRegisterNotification(const GUID *, DWORD, HANDLE, PHPOWERNOTIFY)
Definition: powrprof.c:567
SYSTEM_POWER_STATE LidOpenWakeDc
Definition: powrprof.h:41
SYSTEM_POWER_STATE LidOpenWakeAc
Definition: powrprof.h:40
GLOBAL_USER_POWER_POLICY user
Definition: powrprof.h:60
GLOBAL_MACHINE_POWER_POLICY mach
Definition: powrprof.h:61
SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES]
Definition: powrprof.h:54
POWER_ACTION_POLICY PowerButtonDc
Definition: powrprof.h:49
POWER_ACTION_POLICY LidCloseDc
Definition: powrprof.h:53
POWER_ACTION_POLICY SleepButtonDc
Definition: powrprof.h:51
POWER_ACTION_POLICY PowerButtonAc
Definition: powrprof.h:48
POWER_ACTION_POLICY SleepButtonAc
Definition: powrprof.h:50
POWER_ACTION_POLICY LidCloseAc
Definition: powrprof.h:52
SYSTEM_POWER_STATE MinSleepAc
Definition: powrprof.h:67
SYSTEM_POWER_STATE ReducedLatencySleepDc
Definition: powrprof.h:70
POWER_ACTION_POLICY OverThrottledDc
Definition: powrprof.h:79
SYSTEM_POWER_STATE ReducedLatencySleepAc
Definition: powrprof.h:69
POWER_ACTION_POLICY OverThrottledAc
Definition: powrprof.h:78
SYSTEM_POWER_STATE MinSleepDc
Definition: powrprof.h:68
PROCESSOR_POWER_POLICY ProcessorPolicyDc
Definition: powrprof.h:86
PROCESSOR_POWER_POLICY ProcessorPolicyAc
Definition: powrprof.h:85
MACHINE_POWER_POLICY mach
Definition: powrprof.h:118
USER_POWER_POLICY user
Definition: powrprof.h:117
SYSTEM_POWER_STATE MaxSleepAc
Definition: powrprof.h:100
ULONG VideoTimeoutDc
Definition: powrprof.h:104
SYSTEM_POWER_STATE MaxSleepDc
Definition: powrprof.h:101
POWER_ACTION_POLICY IdleAc
Definition: powrprof.h:92
UCHAR FanThrottleToleranceDc
Definition: powrprof.h:110
UCHAR ThrottlePolicyAc
Definition: powrprof.h:98
ULONG SpindownTimeoutAc
Definition: powrprof.h:105
UCHAR FanThrottleToleranceAc
Definition: powrprof.h:109
UCHAR IdleSensitivityDc
Definition: powrprof.h:97
ULONG SpindownTimeoutDc
Definition: powrprof.h:106
ULONG IdleTimeoutAc
Definition: powrprof.h:94
BOOLEAN OptimizeForPowerDc
Definition: powrprof.h:108
UCHAR ForcedThrottleAc
Definition: powrprof.h:111
UCHAR ForcedThrottleDc
Definition: powrprof.h:112
POWER_ACTION_POLICY IdleDc
Definition: powrprof.h:93
UCHAR ThrottlePolicyDc
Definition: powrprof.h:99
UCHAR IdleSensitivityAc
Definition: powrprof.h:96
ULONG IdleTimeoutDc
Definition: powrprof.h:95
BOOLEAN OptimizeForPowerAc
Definition: powrprof.h:107
ULONG VideoTimeoutAc
Definition: powrprof.h:103
uint32_t ULONG
Definition: typedefs.h:59
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
_POWER_PLATFORM_ROLE
Definition: potypes.h:292
@ PlatformRolePerformanceServer
Definition: potypes.h:300
@ PlatformRoleAppliancePC
Definition: potypes.h:299
@ PlatformRoleMaximum
Definition: potypes.h:302
@ PlatformRoleEnterpriseServer
Definition: potypes.h:297
@ PlatformRoleUnspecified
Definition: potypes.h:293
@ PlatformRoleMobile
Definition: potypes.h:295
@ PlatformRoleSlate
Definition: potypes.h:301
@ PlatformRoleSOHOServer
Definition: potypes.h:298
@ PlatformRoleDesktop
Definition: potypes.h:294
@ PlatformRoleWorkstation
Definition: potypes.h:296
enum _POWER_PLATFORM_ROLE POWER_PLATFORM_ROLE
unsigned char UCHAR
Definition: xmlstorage.h:181
WCHAR * LPWSTR
Definition: xmlstorage.h:184