home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / cwin / c.exe / $INSTDIR / include / ddk / upssvc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-12-15  |  1.7 KB  |  99 lines

  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. #pragma pack(push,4)
  35.  
  36. #include "ntddk.h"
  37.  
  38. #if defined(_APCUPS_)
  39.   #define UPSAPI DECLSPEC_EXPORT
  40. #else
  41.   #define UPSAPI DECLSPEC_IMPORT
  42. #endif
  43.  
  44.  
  45. #define UPS_ONLINE                        1
  46. #define UPS_ONBATTERY                     2
  47. #define UPS_LOWBATTERY                    4
  48. #define UPS_NOCOMM                        8
  49. #define UPS_CRITICAL                      16
  50.  
  51. UPSAPI
  52. VOID
  53. DDKAPI
  54. UPSCancelWait(VOID);
  55.  
  56. UPSAPI
  57. DWORD
  58. DDKAPI
  59. UPSGetState(VOID);
  60.  
  61. #define UPS_INITUNKNOWNERROR              0
  62. #define UPS_INITOK                        1
  63. #define UPS_INITNOSUCHDRIVER              2
  64. #define UPS_INITBADINTERFACE              3
  65. #define UPS_INITREGISTRYERROR             4
  66. #define UPS_INITCOMMOPENERROR             5
  67. #define UPS_INITCOMMSETUPERROR            6
  68.  
  69. UPSAPI
  70. DWORD
  71. DDKAPI
  72. UPSInit(VOID);
  73.  
  74. UPSAPI
  75. VOID
  76. DDKAPI
  77. UPSStop(VOID);
  78.  
  79. UPSAPI
  80. VOID
  81. DDKAPI
  82. UPSTurnOff(
  83.   IN DWORD  aTurnOffDelay);
  84.  
  85. UPSAPI
  86. VOID
  87. DDKAPI
  88. UPSWaitForStateChange(
  89.   IN DWORD  aCurrentState,
  90.   IN DWORD  anInterval);
  91.  
  92. #pragma pack(pop)
  93.  
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97.  
  98. #endif /* __UPSSVC_H */
  99.