1 |
|
---|
2 | /*
|
---|
3 | *@@sourcefile acpih.h:
|
---|
4 | * header file for acpih.c.
|
---|
5 | *
|
---|
6 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
7 | * numbering.
|
---|
8 | *
|
---|
9 | *@@include #include <os2.h>
|
---|
10 | *@@include #include "helpers\acpih.h"
|
---|
11 | */
|
---|
12 |
|
---|
13 | /* Copyright (C) 2006-2014 Paul Ratcliffe.
|
---|
14 | * This file is part of the "XWorkplace helpers" source package.
|
---|
15 | * This is free software; you can redistribute it and/or modify
|
---|
16 | * it under the terms of the GNU General Public License as published
|
---|
17 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
18 | * "COPYING" file of the XWorkplace main distribution.
|
---|
19 | * This program is distributed in the hope that it will be useful,
|
---|
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
22 | * GNU General Public License for more details.
|
---|
23 | */
|
---|
24 |
|
---|
25 | #if __cplusplus
|
---|
26 | extern "C" {
|
---|
27 | #endif
|
---|
28 |
|
---|
29 | // @@changed V1.0.9 (2012-02-20) [slevine]: sync with current ACPI toolkit, code by David Azarewicz
|
---|
30 |
|
---|
31 | #ifndef ACPIH_HEADER_INCLUDED
|
---|
32 | #define ACPIH_HEADER_INCLUDED
|
---|
33 |
|
---|
34 | #pragma pack(4)
|
---|
35 | #include <acpi.h>
|
---|
36 | #include <acpiapi.h>
|
---|
37 | #pragma pack()
|
---|
38 | /*
|
---|
39 | * Power state values
|
---|
40 | */
|
---|
41 |
|
---|
42 | // Extracted from acpi.h actype.h etc.
|
---|
43 | typedef APIRET APIENTRY ACPITKSTARTAPI(ACPI_API_HANDLE *);
|
---|
44 | typedef ACPITKSTARTAPI *PACPITKSTARTAPI;
|
---|
45 |
|
---|
46 | typedef APIRET APIENTRY ACPITKENDAPI(ACPI_API_HANDLE *);
|
---|
47 | typedef ACPITKENDAPI *PACPITKENDAPI;
|
---|
48 |
|
---|
49 | typedef APIRET APIENTRY ACPITKGOTOSLEEP(ACPI_API_HANDLE *, UCHAR);
|
---|
50 | typedef ACPITKGOTOSLEEP *PACPITKGOTOSLEEP;
|
---|
51 |
|
---|
52 | // @@added V1.0.9 (2012-12-10) [slevine]: sync with current ACPI toolkit
|
---|
53 | typedef ACPI_STATUS APIENTRY ACPITKPREPARETOSLEEP(UINT8);
|
---|
54 | typedef ACPITKPREPARETOSLEEP *PACPITKPREPARETOSLEEP;
|
---|
55 |
|
---|
56 | //@changed V1.0.10 (2014-08-30) [dazarewicz]: change prototype
|
---|
57 | typedef APIRET APIENTRY ACPITKGETOBJECTINFOALLOC(ACPI_HANDLE, ACPI_DEVICE_INFO **);
|
---|
58 | typedef APIRET APIENTRY ACPITKGETHANDLE(ACPI_HANDLE, ACPI_STRING, ACPI_HANDLE *);
|
---|
59 | typedef APIRET APIENTRY ACPITKOSFREE(PVOID);
|
---|
60 | typedef APIRET APIENTRY ACPITKWALKNAMESPACE(ACPI_OBJECT_TYPE, ACPI_HANDLE, UINT32,ACPI_WALK_CALLBACK, PVOID, void **);
|
---|
61 | typedef APIRET APIENTRY ACPITKEVALUATEOBJECT(ACPI_HANDLE, ACPI_STRING, ACPI_OBJECT_LIST *, ACPI_BUFFER *);
|
---|
62 |
|
---|
63 | APIRET APIENTRY acpihOpen(ACPI_API_HANDLE *phACPI);
|
---|
64 | typedef APIRET APIENTRY ACPIHOPEN(ACPI_API_HANDLE *);
|
---|
65 | typedef ACPIHOPEN *PACPIHOPEN;
|
---|
66 |
|
---|
67 | VOID APIENTRY acpihClose(ACPI_API_HANDLE *phACPI);
|
---|
68 | typedef APIRET APIENTRY ACPIHCLOSE(ACPI_API_HANDLE *phACPI);
|
---|
69 | typedef ACPIHCLOSE *PACPIHCLOSE;
|
---|
70 |
|
---|
71 | //@added V1.0.10 (2014-08-30) [dazarewicz]
|
---|
72 | VOID acpihPrepareToSleep(UCHAR ucState);
|
---|
73 | APIRET APIENTRY acpihGoToSleep(ACPI_API_HANDLE *phACPI, UCHAR ucState);
|
---|
74 |
|
---|
75 | APIRET APIENTRY acpihGetPowerStatus(PAPM, PBOOL);
|
---|
76 | typedef APIRET APIENTRY ACPIHGETPOWERSTATUS(PAPM, PBOOL);
|
---|
77 | typedef ACPIHGETPOWERSTATUS *PACPIHGETPOWERSTATUS;
|
---|
78 |
|
---|
79 | ULONG APIENTRY acpihGetCpuTemp(ACPI_API_HANDLE *phACPI);
|
---|
80 | typedef ULONG APIENTRY ACPIHGETCPUTEMP(ACPI_API_HANDLE *phACPI);
|
---|
81 | typedef ACPIHGETCPUTEMP *PACPIHGETCPUTEMP;
|
---|
82 |
|
---|
83 | BOOL acpihHasBattery(VOID);
|
---|
84 |
|
---|
85 | #define ORD_ACPITKSTARTAPI 67
|
---|
86 | #define ORD_ACPITKENDAPI 68
|
---|
87 | #define ORD_ACPITKGOTOSLEEP 70
|
---|
88 | #define ORD_ACPITKGETOBJECTINFOALLOC3 35
|
---|
89 | #define ORD_ACPITKGETHANDLE 65
|
---|
90 | #define ORD_ACPITKOSFREE 66
|
---|
91 | #define ORD_ACPITKWALKNAMESPACE 56
|
---|
92 | #define ORD_ACPITKEVALUATEOBJECT 50
|
---|
93 | // @@added V1.0.9 (2012-12-10) [slevine]: sync with current ACPI toolkit
|
---|
94 | #define ORD_ACPITKPREPARETOSLEEP 89
|
---|
95 | #endif
|
---|
96 |
|
---|
97 | #if __cplusplus
|
---|
98 | }
|
---|
99 | #endif
|
---|
100 |
|
---|