2 * Copyright (C) 2005 Benjamin Cutler
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_POWRPROF_H
20 #define __WINE_POWRPROF_H 1
22 #define EnableSysTrayBatteryMeter 0x01
23 #define EnableMultiBatteryDisplay 0x02
24 #define EnablePasswordLogon 0x04
25 #define EnableWakeOnRing 0x08
26 #define EnableVideoDimDisplay 0x10
28 typedef struct _GLOBAL_MACHINE_POWER_POLICY
{
30 SYSTEM_POWER_STATE LidOpenWakeAc
;
31 SYSTEM_POWER_STATE LidOpenWakeDc
;
32 ULONG BroadcastCapacityResolution
;
33 } GLOBAL_MACHINE_POWER_POLICY
,
34 *PGLOBAL_MACHINE_POWER_POLICY
;
36 typedef struct _GLOBAL_USER_POWER_POLICY
{
38 POWER_ACTION_POLICY PowerButtonAc
;
39 POWER_ACTION_POLICY PowerButtonDc
;
40 POWER_ACTION_POLICY SleepButtonAc
;
41 POWER_ACTION_POLICY SleepButtonDc
;
42 POWER_ACTION_POLICY LidCloseAc
;
43 POWER_ACTION_POLICY LidCloseDc
;
44 SYSTEM_POWER_LEVEL DischargePolicy
[NUM_DISCHARGE_POLICIES
];
46 } GLOBAL_USER_POWER_POLICY
,
47 *PGLOBAL_USER_POWER_POLICY
;
49 typedef struct _GLOBAL_POWER_POLICY
{
50 GLOBAL_USER_POWER_POLICY user
;
51 GLOBAL_MACHINE_POWER_POLICY mach
;
52 } GLOBAL_POWER_POLICY
,
53 *PGLOBAL_POWER_POLICY
;
55 typedef struct _MACHINE_POWER_POLICY
{
57 SYSTEM_POWER_STATE MinSleepAc
;
58 SYSTEM_POWER_STATE MinSleepDc
;
59 SYSTEM_POWER_STATE ReducedLatencySleepAc
;
60 SYSTEM_POWER_STATE ReducedLatencySleepDc
;
63 ULONG DozeS4TimeoutAc
;
64 ULONG DozeS4TimeoutDc
;
68 POWER_ACTION_POLICY OverThrottledAc
;
69 POWER_ACTION_POLICY OverThrottledDc
;
70 } MACHINE_POWER_POLICY
,
71 *PMACHINE_POWER_POLICY
;
73 typedef struct _MACHINE_PROCESSOR_POWER_POLICY
{
75 PROCESSOR_POWER_POLICY ProcessorPolicyAc
;
76 PROCESSOR_POWER_POLICY ProcessorPolicyDc
;
77 } MACHINE_PROCESSOR_POWER_POLICY
,
78 *PMACHINE_PROCESSOR_POWER_POLICY
;
80 typedef struct _USER_POWER_POLICY
{
82 POWER_ACTION_POLICY IdleAc
;
83 POWER_ACTION_POLICY IdleDc
;
86 UCHAR IdleSensitivityAc
;
87 UCHAR IdleSensitivityDc
;
88 UCHAR ThrottlePolicyAc
;
89 UCHAR ThrottlePolicyDc
;
90 SYSTEM_POWER_STATE MaxSleepAc
;
91 SYSTEM_POWER_STATE MaxSleepDc
;
95 ULONG SpindownTimeoutAc
;
96 ULONG SpindownTimeoutDc
;
97 BOOLEAN OptimizeForPowerAc
;
98 BOOLEAN OptimizeForPowerDc
;
99 UCHAR FanThrottleToleranceAc
;
100 UCHAR FanThrottleToleranceDc
;
101 UCHAR ForcedThrottleAc
;
102 UCHAR ForcedThrottleDc
;
106 typedef struct _POWER_POLICY
{
107 USER_POWER_POLICY user
;
108 MACHINE_POWER_POLICY mach
;
117 typedef BOOLEAN (CALLBACK
* PWRSCHEMESENUMPROC
)(UINT
, DWORD
, LPWSTR
, DWORD
, LPWSTR
, PPOWER_POLICY
, LPARAM
);
119 NTSTATUS WINAPI
CallNtPowerInformation(POWER_INFORMATION_LEVEL
, PVOID
, ULONG
, PVOID
, ULONG
);
120 BOOLEAN WINAPI
CanUserWritePwrScheme(VOID
);
121 BOOLEAN WINAPI
DeletePwrScheme(UINT
);
122 BOOLEAN WINAPI
EnumPwrSchemes(PWRSCHEMESENUMPROC
, LPARAM
);
123 BOOLEAN WINAPI
GetActivePwrScheme(PUINT
);
124 BOOLEAN WINAPI
GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY
, PPOWER_POLICY
);
125 BOOLEAN WINAPI
GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES
);
126 BOOLEAN WINAPI
GetPwrDiskSpindownRange(PUINT
, PUINT
);
127 BOOLEAN WINAPI
IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY
);
128 BOOLEAN WINAPI
IsPwrHibernateAllowed(VOID
);
129 BOOLEAN WINAPI
IsPwrShutdownAllowed(VOID
);
130 BOOLEAN WINAPI
IsPwrSuspendAllowed(VOID
);
131 BOOLEAN WINAPI
ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY
);
132 BOOLEAN WINAPI
ReadProcessorPwrScheme(UINT
, PMACHINE_PROCESSOR_POWER_POLICY
);
133 BOOLEAN WINAPI
ReadPwrScheme(UINT
, PPOWER_POLICY
);
134 BOOLEAN WINAPI
SetActivePwrScheme(UINT
, PGLOBAL_POWER_POLICY
, PPOWER_POLICY
);
135 BOOLEAN WINAPI
SetSuspendState(BOOLEAN
, BOOLEAN
, BOOLEAN
);
136 BOOLEAN WINAPI
WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY
);
137 BOOLEAN WINAPI
WriteProcessorPwrScheme(UINT
, PMACHINE_PROCESSOR_POWER_POLICY
);
138 BOOLEAN WINAPI
WritePwrScheme(PUINT
, LPWSTR
, LPWSTR
, PPOWER_POLICY
);
141 POWER_PLATFORM_ROLE WINAPI
PowerDeterminePlatformRole(void);
147 #endif /* _POWRPROF_H */