xref: /reactos/sdk/include/ddk/upssvc.h (revision c2c66aff)
1*c2c66affSColin Finck /*
2*c2c66affSColin Finck  * upssvc.h
3*c2c66affSColin Finck  *
4*c2c66affSColin Finck  * UPS service interface
5*c2c66affSColin Finck  *
6*c2c66affSColin Finck  * This file is part of the w32api package.
7*c2c66affSColin Finck  *
8*c2c66affSColin Finck  * Contributors:
9*c2c66affSColin Finck  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10*c2c66affSColin Finck  *
11*c2c66affSColin Finck  * THIS SOFTWARE IS NOT COPYRIGHTED
12*c2c66affSColin Finck  *
13*c2c66affSColin Finck  * This source code is offered for use in the public domain. You may
14*c2c66affSColin Finck  * use, modify or distribute it freely.
15*c2c66affSColin Finck  *
16*c2c66affSColin Finck  * This code is distributed in the hope that it will be useful but
17*c2c66affSColin Finck  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18*c2c66affSColin Finck  * DISCLAIMED. This includes but is not limited to warranties of
19*c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20*c2c66affSColin Finck  *
21*c2c66affSColin Finck  */
22*c2c66affSColin Finck 
23*c2c66affSColin Finck #ifndef __UPSSVC_H
24*c2c66affSColin Finck #define __UPSSVC_H
25*c2c66affSColin Finck 
26*c2c66affSColin Finck #ifdef __cplusplus
27*c2c66affSColin Finck extern "C" {
28*c2c66affSColin Finck #endif
29*c2c66affSColin Finck 
30*c2c66affSColin Finck #if defined(_APCUPS_)
31*c2c66affSColin Finck #define UPSAPI
32*c2c66affSColin Finck #else
33*c2c66affSColin Finck #define UPSAPI DECLSPEC_IMPORT
34*c2c66affSColin Finck #endif
35*c2c66affSColin Finck 
36*c2c66affSColin Finck 
37*c2c66affSColin Finck #define UPS_ONLINE                        1
38*c2c66affSColin Finck #define UPS_ONBATTERY                     2
39*c2c66affSColin Finck #define UPS_LOWBATTERY                    4
40*c2c66affSColin Finck #define UPS_NOCOMM                        8
41*c2c66affSColin Finck #define UPS_CRITICAL                      16
42*c2c66affSColin Finck 
43*c2c66affSColin Finck UPSAPI
44*c2c66affSColin Finck VOID
45*c2c66affSColin Finck NTAPI
46*c2c66affSColin Finck UPSCancelWait(VOID);
47*c2c66affSColin Finck 
48*c2c66affSColin Finck UPSAPI
49*c2c66affSColin Finck DWORD
50*c2c66affSColin Finck NTAPI
51*c2c66affSColin Finck UPSGetState(VOID);
52*c2c66affSColin Finck 
53*c2c66affSColin Finck #define UPS_INITUNKNOWNERROR              0
54*c2c66affSColin Finck #define UPS_INITOK                        1
55*c2c66affSColin Finck #define UPS_INITNOSUCHDRIVER              2
56*c2c66affSColin Finck #define UPS_INITBADINTERFACE              3
57*c2c66affSColin Finck #define UPS_INITREGISTRYERROR             4
58*c2c66affSColin Finck #define UPS_INITCOMMOPENERROR             5
59*c2c66affSColin Finck #define UPS_INITCOMMSETUPERROR            6
60*c2c66affSColin Finck 
61*c2c66affSColin Finck UPSAPI
62*c2c66affSColin Finck DWORD
63*c2c66affSColin Finck NTAPI
64*c2c66affSColin Finck UPSInit(VOID);
65*c2c66affSColin Finck 
66*c2c66affSColin Finck UPSAPI
67*c2c66affSColin Finck VOID
68*c2c66affSColin Finck NTAPI
69*c2c66affSColin Finck UPSStop(VOID);
70*c2c66affSColin Finck 
71*c2c66affSColin Finck UPSAPI
72*c2c66affSColin Finck VOID
73*c2c66affSColin Finck NTAPI
74*c2c66affSColin Finck UPSTurnOff(
75*c2c66affSColin Finck   IN DWORD aTurnOffDelay);
76*c2c66affSColin Finck 
77*c2c66affSColin Finck UPSAPI
78*c2c66affSColin Finck VOID
79*c2c66affSColin Finck NTAPI
80*c2c66affSColin Finck UPSWaitForStateChange(
81*c2c66affSColin Finck   IN DWORD aCurrentState,
82*c2c66affSColin Finck   IN DWORD anInterval);
83*c2c66affSColin Finck 
84*c2c66affSColin Finck #ifdef __cplusplus
85*c2c66affSColin Finck }
86*c2c66affSColin Finck #endif
87*c2c66affSColin Finck 
88*c2c66affSColin Finck #endif /* __UPSSVC_H */
89