setupapi: Fixed returns values and added a test for SetupDiOpenClassRegKeyExW.
[wine] / include / powrprof.h
1 /*
2  * Copyright (C) 2005 Benjamin Cutler
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef __WINE_POWRPROF_H
20 #define __WINE_POWRPROF_H 1
21
22 #define EnableSysTrayBatteryMeter       0x01
23 #define EnableMultiBatteryDisplay       0x02
24 #define EnablePasswordLogon             0x04
25 #define EnableWakeOnRing                0x08
26 #define EnableVideoDimDisplay           0x10
27
28 typedef struct _GLOBAL_MACHINE_POWER_POLICY {
29         ULONG Revision;
30         SYSTEM_POWER_STATE LidOpenWakeAc;
31         SYSTEM_POWER_STATE LidOpenWakeDc;
32         ULONG BroadcastCapacityResolution;
33 } GLOBAL_MACHINE_POWER_POLICY, 
34 *PGLOBAL_MACHINE_POWER_POLICY;
35
36 typedef struct _GLOBAL_USER_POWER_POLICY {
37         ULONG Revision;
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];
45         ULONG GlobalFlags;
46 } GLOBAL_USER_POWER_POLICY, 
47 *PGLOBAL_USER_POWER_POLICY;
48
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;
54
55 typedef struct _MACHINE_POWER_POLICY {
56         ULONG Revision;
57         SYSTEM_POWER_STATE MinSleepAc;
58         SYSTEM_POWER_STATE MinSleepDc;
59         SYSTEM_POWER_STATE ReducedLatencySleepAc;
60         SYSTEM_POWER_STATE ReducedLatencySleepDc;
61         ULONG DozeTimeoutAc;
62         ULONG DozeTimeoutDc;
63         ULONG DozeS4TimeoutAc;
64         ULONG DozeS4TimeoutDc;
65         UCHAR MinThrottleAc;
66         UCHAR MinThrottleDc;
67         UCHAR pad1[2];
68         POWER_ACTION_POLICY OverThrottledAc;
69         POWER_ACTION_POLICY OverThrottledDc;
70 } MACHINE_POWER_POLICY, 
71 *PMACHINE_POWER_POLICY;
72
73 typedef struct _MACHINE_PROCESSOR_POWER_POLICY {
74         ULONG Revision;
75         PROCESSOR_POWER_POLICY ProcessorPolicyAc;
76         PROCESSOR_POWER_POLICY ProcessorPolicyDc;
77 } MACHINE_PROCESSOR_POWER_POLICY, 
78 *PMACHINE_PROCESSOR_POWER_POLICY;
79
80 typedef struct _USER_POWER_POLICY {
81         ULONG Revision;
82         POWER_ACTION_POLICY IdleAc;
83         POWER_ACTION_POLICY IdleDc;
84         ULONG IdleTimeoutAc;
85         ULONG IdleTimeoutDc;
86         UCHAR IdleSensitivityAc;
87         UCHAR IdleSensitivityDc;
88         UCHAR ThrottlePolicyAc;
89         UCHAR ThrottlePolicyDc;
90         SYSTEM_POWER_STATE MaxSleepAc;
91         SYSTEM_POWER_STATE MaxSleepDc;
92         ULONG Reserved[2];
93         ULONG VideoTimeoutAc;
94         ULONG VideoTimeoutDc;
95         ULONG SpindownTimeoutAc;
96         ULONG SpindownTimeoutDc;
97         BOOLEAN OptimizeForPowerAc;
98         BOOLEAN OptimizeForPowerDc;
99         UCHAR FanThrottleToleranceAc;
100         UCHAR FanThrottleToleranceDc;
101         UCHAR ForcedThrottleAc;
102         UCHAR ForcedThrottleDc;
103 } USER_POWER_POLICY, 
104 *PUSER_POWER_POLICY;
105
106 typedef struct _POWER_POLICY {
107         USER_POWER_POLICY user;
108         MACHINE_POWER_POLICY mach;
109 } POWER_POLICY, 
110 *PPOWER_POLICY;
111
112 typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(UINT, DWORD, LPWSTR, DWORD, LPWSTR, PPOWER_POLICY, LPARAM);
113
114 NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
115 BOOLEAN WINAPI CanUserWritePwrScheme(VOID);
116 BOOLEAN WINAPI DeletePwrScheme(UINT);
117 BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM);
118 BOOLEAN WINAPI GetActivePwrScheme(PUINT);
119 BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
120 BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES);
121 BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT, PUINT);
122 BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY);
123 BOOLEAN WINAPI IsPwrHibernateAllowed(VOID);
124 BOOLEAN WINAPI IsPwrShutdownAllowed(VOID);
125 BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
126 BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
127 BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
128 BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);
129 BOOLEAN WINAPI SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY);
130 BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN);
131 BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
132 BOOLEAN WINAPI WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
133 BOOLEAN WINAPI WritePwrScheme(PUINT, LPWSTR, LPWSTR, PPOWER_POLICY);
134
135 #endif /* _POWRPROF_H */