Last change
on this file since 1047 was 1046, checked in by alloc, 8 years ago |
Daodan: Added Windows MinGW and build batch file
|
File size:
1.7 KB
|
Line | |
---|
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 | #include "ntddk.h"
|
---|
35 |
|
---|
36 | #if defined(_APCUPS_)
|
---|
37 | #define UPSAPI DECLSPEC_EXPORT
|
---|
38 | #else
|
---|
39 | #define UPSAPI DECLSPEC_IMPORT
|
---|
40 | #endif
|
---|
41 |
|
---|
42 |
|
---|
43 | #define UPS_ONLINE 1
|
---|
44 | #define UPS_ONBATTERY 2
|
---|
45 | #define UPS_LOWBATTERY 4
|
---|
46 | #define UPS_NOCOMM 8
|
---|
47 | #define UPS_CRITICAL 16
|
---|
48 |
|
---|
49 | UPSAPI
|
---|
50 | VOID
|
---|
51 | DDKAPI
|
---|
52 | UPSCancelWait(VOID);
|
---|
53 |
|
---|
54 | UPSAPI
|
---|
55 | DWORD
|
---|
56 | DDKAPI
|
---|
57 | UPSGetState(VOID);
|
---|
58 |
|
---|
59 | #define UPS_INITUNKNOWNERROR 0
|
---|
60 | #define UPS_INITOK 1
|
---|
61 | #define UPS_INITNOSUCHDRIVER 2
|
---|
62 | #define UPS_INITBADINTERFACE 3
|
---|
63 | #define UPS_INITREGISTRYERROR 4
|
---|
64 | #define UPS_INITCOMMOPENERROR 5
|
---|
65 | #define UPS_INITCOMMSETUPERROR 6
|
---|
66 |
|
---|
67 | UPSAPI
|
---|
68 | DWORD
|
---|
69 | DDKAPI
|
---|
70 | UPSInit(VOID);
|
---|
71 |
|
---|
72 | UPSAPI
|
---|
73 | VOID
|
---|
74 | DDKAPI
|
---|
75 | UPSStop(VOID);
|
---|
76 |
|
---|
77 | UPSAPI
|
---|
78 | VOID
|
---|
79 | DDKAPI
|
---|
80 | UPSTurnOff(
|
---|
81 | /*IN*/ DWORD aTurnOffDelay);
|
---|
82 |
|
---|
83 | UPSAPI
|
---|
84 | VOID
|
---|
85 | DDKAPI
|
---|
86 | UPSWaitForStateChange(
|
---|
87 | /*IN*/ DWORD aCurrentState,
|
---|
88 | /*IN*/ DWORD anInterval);
|
---|
89 |
|
---|
90 | #ifdef __cplusplus
|
---|
91 | }
|
---|
92 | #endif
|
---|
93 |
|
---|
94 | #endif /* __UPSSVC_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.