- Sync up Mm interface with WinLdr branch (introduce the concept of a memory type...
[reactos.git] / reactos / include / ddk / upssvc.h
1 /*
2 * upssvc.h
3 *
4 * UPS service 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 __UPSSVC_H
24 #define __UPSSVC_H
25
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #if defined(_APCUPS_)
35 #define UPSAPI DECLSPEC_EXPORT
36 #else
37 #define UPSAPI DECLSPEC_IMPORT
38 #endif
39
40
41 #define UPS_ONLINE 1
42 #define UPS_ONBATTERY 2
43 #define UPS_LOWBATTERY 4
44 #define UPS_NOCOMM 8
45 #define UPS_CRITICAL 16
46
47 UPSAPI
48 VOID
49 DDKAPI
50 UPSCancelWait(VOID);
51
52 UPSAPI
53 DWORD
54 DDKAPI
55 UPSGetState(VOID);
56
57 #define UPS_INITUNKNOWNERROR 0
58 #define UPS_INITOK 1
59 #define UPS_INITNOSUCHDRIVER 2
60 #define UPS_INITBADINTERFACE 3
61 #define UPS_INITREGISTRYERROR 4
62 #define UPS_INITCOMMOPENERROR 5
63 #define UPS_INITCOMMSETUPERROR 6
64
65 UPSAPI
66 DWORD
67 DDKAPI
68 UPSInit(VOID);
69
70 UPSAPI
71 VOID
72 DDKAPI
73 UPSStop(VOID);
74
75 UPSAPI
76 VOID
77 DDKAPI
78 UPSTurnOff(
79 IN DWORD aTurnOffDelay);
80
81 UPSAPI
82 VOID
83 DDKAPI
84 UPSWaitForStateChange(
85 IN DWORD aCurrentState,
86 IN DWORD anInterval);
87
88 #ifdef __cplusplus
89 }
90 #endif
91
92 #endif /* __UPSSVC_H */