Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
upssvc.h
00001 /* 00002 * upssvc.h 00003 * 00004 * UPS service interface 00005 * 00006 * This file is part of the w32api package. 00007 * 00008 * Contributors: 00009 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net> 00010 * 00011 * THIS SOFTWARE IS NOT COPYRIGHTED 00012 * 00013 * This source code is offered for use in the public domain. You may 00014 * use, modify or distribute it freely. 00015 * 00016 * This code is distributed in the hope that it will be useful but 00017 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 00018 * DISCLAIMED. This includes but is not limited to warranties of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00020 * 00021 */ 00022 00023 #ifndef __UPSSVC_H 00024 #define __UPSSVC_H 00025 00026 #if __GNUC__ >= 3 00027 #pragma GCC system_header 00028 #endif 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif 00033 00034 #include "ntddk.h" 00035 00036 #if defined(_APCUPS_) 00037 #define UPSAPI DECLSPEC_EXPORT 00038 #else 00039 #define UPSAPI DECLSPEC_IMPORT 00040 #endif 00041 00042 00043 #define UPS_ONLINE 1 00044 #define UPS_ONBATTERY 2 00045 #define UPS_LOWBATTERY 4 00046 #define UPS_NOCOMM 8 00047 #define UPS_CRITICAL 16 00048 00049 UPSAPI 00050 VOID 00051 DDKAPI 00052 UPSCancelWait(VOID); 00053 00054 UPSAPI 00055 DWORD 00056 DDKAPI 00057 UPSGetState(VOID); 00058 00059 #define UPS_INITUNKNOWNERROR 0 00060 #define UPS_INITOK 1 00061 #define UPS_INITNOSUCHDRIVER 2 00062 #define UPS_INITBADINTERFACE 3 00063 #define UPS_INITREGISTRYERROR 4 00064 #define UPS_INITCOMMOPENERROR 5 00065 #define UPS_INITCOMMSETUPERROR 6 00066 00067 UPSAPI 00068 DWORD 00069 DDKAPI 00070 UPSInit(VOID); 00071 00072 UPSAPI 00073 VOID 00074 DDKAPI 00075 UPSStop(VOID); 00076 00077 UPSAPI 00078 VOID 00079 DDKAPI 00080 UPSTurnOff( 00081 /*IN*/ DWORD aTurnOffDelay); 00082 00083 UPSAPI 00084 VOID 00085 DDKAPI 00086 UPSWaitForStateChange( 00087 /*IN*/ DWORD aCurrentState, 00088 /*IN*/ DWORD anInterval); 00089 00090 #ifdef __cplusplus 00091 } 00092 #endif 00093 00094 #endif /* __UPSSVC_H */
Generated on Tue Jul 12 2022 19:59:55 by
