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-2013 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 ACPISTARTAPI(ACPI_API_HANDLE *);
|
---|
44 | typedef ACPISTARTAPI *PACPISTARTAPI;
|
---|
45 |
|
---|
46 | typedef APIRET APIENTRY ACPIENDAPI(ACPI_API_HANDLE *);
|
---|
47 | typedef ACPIENDAPI *PACPIENDAPI;
|
---|
48 |
|
---|
49 | typedef APIRET APIENTRY ACPIGOTOSLEEP(ACPI_API_HANDLE *, UCHAR);
|
---|
50 | typedef ACPIGOTOSLEEP *PACPIGOTOSLEEP;
|
---|
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 | typedef APIRET APIENTRY ACPITKGETOBJECTINFOALLOC(ACPI_HANDLE *, PVOID);
|
---|
57 | typedef APIRET APIENTRY ACPITKGETHANDLE(ACPI_HANDLE, ACPI_STRING, ACPI_HANDLE *);
|
---|
58 | typedef APIRET APIENTRY ACPITKOSFREE(PVOID);
|
---|
59 | typedef APIRET APIENTRY ACPITKWALKNAMESPACE(ACPI_OBJECT_TYPE, ACPI_HANDLE, UINT32,ACPI_WALK_CALLBACK, PVOID, void **);
|
---|
60 | typedef APIRET APIENTRY ACPITKEVALUATEOBJECT(ACPI_HANDLE, ACPI_STRING, ACPI_OBJECT_LIST *, ACPI_BUFFER *);
|
---|
61 |
|
---|
62 | APIRET APIENTRY acpihOpen(ACPI_API_HANDLE *phACPI);
|
---|
63 | typedef APIRET APIENTRY ACPIHOPEN(ACPI_API_HANDLE *);
|
---|
64 | typedef ACPIHOPEN *PACPIHOPEN;
|
---|
65 |
|
---|
66 | VOID APIENTRY acpihClose(ACPI_API_HANDLE *phACPI);
|
---|
67 |
|
---|
68 | APIRET APIENTRY acpihGoToSleep(ACPI_API_HANDLE *phACPI, UCHAR ucState);
|
---|
69 |
|
---|
70 | APIRET APIENTRY acpihGetPowerStatus(PAPM, PBOOL);
|
---|
71 | typedef APIRET APIENTRY ACPIHGETPOWERSTATUS(PAPM, PBOOL);
|
---|
72 | typedef ACPIHGETPOWERSTATUS *PACPIHGETPOWERSTATUS;
|
---|
73 |
|
---|
74 | BOOL acpihHasBattery(VOID);
|
---|
75 |
|
---|
76 | #define ORD_ACPISTARTAPI 16
|
---|
77 | #define ORD_ACPIENDAPI 17
|
---|
78 | #define ORD_ACPIGOTOSLEEP 19
|
---|
79 | #define ORD_ACPITKGETOBJECTINFOALLOC 85
|
---|
80 | #define ORD_ACPITKGETHANDLE 65
|
---|
81 | #define ORD_ACPITKOSFREE 66
|
---|
82 | #define ORD_ACPITKWALKNAMESPACE 56
|
---|
83 | #define ORD_ACPITKEVALUATEOBJECT 50
|
---|
84 | // @@added V1.0.9 (2012-12-10) [slevine]: sync with current ACPI toolkit
|
---|
85 | #define ORD_ACPITKPREPARETOSLEEP 89
|
---|
86 |
|
---|
87 | #endif
|
---|
88 |
|
---|
89 | #if __cplusplus
|
---|
90 | }
|
---|
91 | #endif
|
---|
92 |
|
---|