[XDK]
[reactos.git] / include / xdk / potypes.h
1 /******************************************************************************
2 * Power Management Support Types *
3 ******************************************************************************/
4
5 #ifndef _PO_DDK_
6 #define _PO_DDK_
7
8 /* Power States/Levels */
9 typedef enum _SYSTEM_POWER_STATE {
10 PowerSystemUnspecified,
11 PowerSystemWorking,
12 PowerSystemSleeping1,
13 PowerSystemSleeping2,
14 PowerSystemSleeping3,
15 PowerSystemHibernate,
16 PowerSystemShutdown,
17 PowerSystemMaximum
18 } SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
19
20 #define POWER_SYSTEM_MAXIMUM PowerSystemMaximum
21
22 typedef enum _POWER_INFORMATION_LEVEL {
23 SystemPowerPolicyAc,
24 SystemPowerPolicyDc,
25 VerifySystemPolicyAc,
26 VerifySystemPolicyDc,
27 SystemPowerCapabilities,
28 SystemBatteryState,
29 SystemPowerStateHandler,
30 ProcessorStateHandler,
31 SystemPowerPolicyCurrent,
32 AdministratorPowerPolicy,
33 SystemReserveHiberFile,
34 ProcessorInformation,
35 SystemPowerInformation,
36 ProcessorStateHandler2,
37 LastWakeTime,
38 LastSleepTime,
39 SystemExecutionState,
40 SystemPowerStateNotifyHandler,
41 ProcessorPowerPolicyAc,
42 ProcessorPowerPolicyDc,
43 VerifyProcessorPowerPolicyAc,
44 VerifyProcessorPowerPolicyDc,
45 ProcessorPowerPolicyCurrent,
46 SystemPowerStateLogging,
47 SystemPowerLoggingEntry,
48 SetPowerSettingValue,
49 NotifyUserPowerSetting,
50 PowerInformationLevelUnused0,
51 PowerInformationLevelUnused1,
52 SystemVideoState,
53 TraceApplicationPowerMessage,
54 TraceApplicationPowerMessageEnd,
55 ProcessorPerfStates,
56 ProcessorIdleStates,
57 ProcessorCap,
58 SystemWakeSource,
59 SystemHiberFileInformation,
60 TraceServicePowerMessage,
61 ProcessorLoad,
62 PowerShutdownNotification,
63 MonitorCapabilities,
64 SessionPowerInit,
65 SessionDisplayState,
66 PowerRequestCreate,
67 PowerRequestAction,
68 GetPowerRequestList,
69 ProcessorInformationEx,
70 NotifyUserModeLegacyPowerEvent,
71 GroupPark,
72 ProcessorIdleDomains,
73 WakeTimerList,
74 SystemHiberFileSize,
75 PowerInformationLevelMaximum
76 } POWER_INFORMATION_LEVEL;
77
78 typedef enum {
79 PowerActionNone,
80 PowerActionReserved,
81 PowerActionSleep,
82 PowerActionHibernate,
83 PowerActionShutdown,
84 PowerActionShutdownReset,
85 PowerActionShutdownOff,
86 PowerActionWarmEject
87 } POWER_ACTION, *PPOWER_ACTION;
88
89 typedef enum _DEVICE_POWER_STATE {
90 PowerDeviceUnspecified,
91 PowerDeviceD0,
92 PowerDeviceD1,
93 PowerDeviceD2,
94 PowerDeviceD3,
95 PowerDeviceMaximum
96 } DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
97
98 typedef union _POWER_STATE {
99 SYSTEM_POWER_STATE SystemState;
100 DEVICE_POWER_STATE DeviceState;
101 } POWER_STATE, *PPOWER_STATE;
102
103 typedef enum _POWER_STATE_TYPE {
104 SystemPowerState = 0,
105 DevicePowerState
106 } POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
107
108 #if (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_)
109 typedef struct {
110 ULONG Granularity;
111 ULONG Capacity;
112 } BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
113 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_) */
114
115 #endif /* !_PO_DDK_ */
116
117 typedef VOID
118 (NTAPI *PREQUEST_POWER_COMPLETE)(
119 IN struct _DEVICE_OBJECT *DeviceObject,
120 IN UCHAR MinorFunction,
121 IN POWER_STATE PowerState,
122 IN PVOID Context,
123 IN struct _IO_STATUS_BLOCK *IoStatus);
124
125 typedef
126 NTSTATUS
127 (NTAPI *PPOWER_SETTING_CALLBACK)(
128 IN LPCGUID SettingGuid,
129 IN PVOID Value,
130 IN ULONG ValueLength,
131 IN OUT PVOID Context OPTIONAL);
132
133