1 | /*
|
---|
2 | * poclass.h
|
---|
3 | *
|
---|
4 | * Power policy driver interface
|
---|
5 | *
|
---|
6 | * This file is part of the w32api package.
|
---|
7 | *
|
---|
8 | * Contributors:
|
---|
9 | * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
---|
10 | *
|
---|
11 | * THIS SOFTWARE IS NOT COPYRIGHTED
|
---|
12 | *
|
---|
13 | * This source code is offered for use in the public domain. You may
|
---|
14 | * use, modify or distribute it freely.
|
---|
15 | *
|
---|
16 | * This code is distributed in the hope that it will be useful but
|
---|
17 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
---|
18 | * DISCLAIMED. This includes but is not limited to warranties of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
---|
20 | *
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef __POCLASS_H
|
---|
24 | #define __POCLASS_H
|
---|
25 |
|
---|
26 | #include "batclass.h"
|
---|
27 |
|
---|
28 | #ifdef __cplusplus
|
---|
29 | extern "C" {
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | DEFINE_GUID(GUID_CLASS_INPUT,
|
---|
33 | 0x4D1E55B2L, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);
|
---|
34 |
|
---|
35 | DEFINE_GUID(GUID_DEVICE_LID,
|
---|
36 | 0x4AFA3D52L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
|
---|
37 |
|
---|
38 | DEFINE_GUID(GUID_DEVICE_MEMORY,
|
---|
39 | 0x3fd0f03dL, 0x92e0, 0x45fb, 0xb7, 0x5c, 0x5e, 0xd8, 0xff, 0xb0, 0x10, 0x21);
|
---|
40 |
|
---|
41 | DEFINE_GUID(GUID_DEVICE_MESSAGE_INDICATOR,
|
---|
42 | 0XCD48A365L, 0xfa94, 0x4ce2, 0xa2, 0x32, 0xa1, 0xb7, 0x64, 0xe5, 0xd8, 0xb4);
|
---|
43 |
|
---|
44 | DEFINE_GUID(GUID_DEVICE_PROCESSOR,
|
---|
45 | 0x97fadb10L, 0x4e33, 0x40ae, 0x35, 0x9c, 0x8b, 0xef, 0x02, 0x9d, 0xbd, 0xd0);
|
---|
46 |
|
---|
47 | DEFINE_GUID(GUID_DEVICE_SYS_BUTTON,
|
---|
48 | 0x4AFA3D53L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
|
---|
49 |
|
---|
50 | DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE,
|
---|
51 | 0x4AFA3D51L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
|
---|
52 |
|
---|
53 |
|
---|
54 | #define IOCTL_GET_PROCESSOR_OBJ_INFO \
|
---|
55 | CTL_CODE(FILE_DEVICE_BATTERY, 0x60, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
56 |
|
---|
57 | #define IOCTL_GET_SYS_BUTTON_CAPS \
|
---|
58 | CTL_CODE(FILE_DEVICE_BATTERY, 0x50, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
59 |
|
---|
60 | #define IOCTL_GET_SYS_BUTTON_EVENT \
|
---|
61 | CTL_CODE(FILE_DEVICE_BATTERY, 0x51, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
62 |
|
---|
63 | #define IOCTL_SET_SYS_MESSAGE_INDICATOR \
|
---|
64 | CTL_CODE(FILE_DEVICE_BATTERY, 0x70, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
---|
65 |
|
---|
66 | #define IOCTL_NOTIFY_SWITCH_EVENT \
|
---|
67 | CTL_CODE(FILE_DEVICE_BATTERY, 0x40, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
68 |
|
---|
69 | #define IOCTL_THERMAL_QUERY_INFORMATION \
|
---|
70 | CTL_CODE(FILE_DEVICE_BATTERY, 0x20, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
71 |
|
---|
72 | #define IOCTL_THERMAL_SET_COOLING_POLICY \
|
---|
73 | CTL_CODE(FILE_DEVICE_BATTERY, 0x21, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
---|
74 |
|
---|
75 | #define IOCTL_QUERY_LID \
|
---|
76 | CTL_CODE(FILE_DEVICE_BATTERY, 0x30, METHOD_BUFFERED, FILE_READ_ACCESS)
|
---|
77 |
|
---|
78 | #define IOCTL_RUN_ACTIVE_COOLING_METHOD \
|
---|
79 | CTL_CODE(FILE_DEVICE_BATTERY, 0x22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
---|
80 |
|
---|
81 | #define SYS_BUTTON_POWER 0x00000001
|
---|
82 | #define SYS_BUTTON_SLEEP 0x00000002
|
---|
83 | #define SYS_BUTTON_LID 0x00000004
|
---|
84 | #define SYS_BUTTON_WAKE 0x80000000
|
---|
85 |
|
---|
86 | #define MAX_ACTIVE_COOLING_LEVELS 10
|
---|
87 | #define ACTIVE_COOLING 0
|
---|
88 | #define PASSIVE_COOLING 1
|
---|
89 |
|
---|
90 | typedef struct _THERMAL_INFORMATION {
|
---|
91 | ULONG ThermalStamp;
|
---|
92 | ULONG ThermalConstant1;
|
---|
93 | ULONG ThermalConstant2;
|
---|
94 | KAFFINITY Processors;
|
---|
95 | ULONG SamplingPeriod;
|
---|
96 | ULONG CurrentTemperature;
|
---|
97 | ULONG PassiveTripPoint;
|
---|
98 | ULONG CriticalTripPoint;
|
---|
99 | UCHAR ActiveTripPointCount;
|
---|
100 | ULONG ActiveTripPoint[MAX_ACTIVE_COOLING_LEVELS];
|
---|
101 | } THERMAL_INFORMATION, *PTHERMAL_INFORMATION;
|
---|
102 |
|
---|
103 | typedef struct _PROCESSOR_OBJECT_INFO {
|
---|
104 | ULONG PhysicalID;
|
---|
105 | ULONG PBlkAddress;
|
---|
106 | UCHAR PBlkLength;
|
---|
107 | } PROCESSOR_OBJECT_INFO, *PPROCESSOR_OBJECT_INFO;
|
---|
108 |
|
---|
109 | #ifdef __cplusplus
|
---|
110 | }
|
---|
111 | #endif
|
---|
112 |
|
---|
113 | #endif /* __POCLASS_H */
|
---|