UPS: apcupsd clean sources
[tomato.git] / release / src / router / apcupsd / src / drivers / apcsmart / apcsmart.h
blob456c652c425b7ab433c01a83cca0e4be96eb5869
1 /*
2 * apcsmart.h
4 * Public header file for the APC Smart protocol driver
5 */
7 /*
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General
10 * Public License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public
18 * License along with this program; if not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20 * MA 02111-1307, USA.
23 #ifndef _APCSMART_H
24 #define _APCSMART_H
26 /* Private data structure */
27 typedef struct s_smart_data {
28 struct termios oldtio;
29 struct termios newtio;
30 } SMART_DATA;
34 * Function Prototypes
37 extern int apcsmart_ups_get_capabilities(UPSINFO *ups);
38 extern int apcsmart_ups_read_volatile_data(UPSINFO *ups);
39 extern int apcsmart_ups_read_static_data(UPSINFO *ups);
40 extern int apcsmart_ups_kill_power(UPSINFO *ups);
41 extern int apcsmart_ups_shutdown(UPSINFO *ups);
42 extern int apcsmart_ups_check_state(UPSINFO *ups);
43 extern int apcsmart_ups_open(UPSINFO *ups);
44 extern int apcsmart_ups_close(UPSINFO *ups);
45 extern int apcsmart_ups_setup(UPSINFO *ups);
46 extern int apcsmart_ups_program_eeprom(UPSINFO *ups, int command, const char *data);
47 extern int apcsmart_ups_entry_point(UPSINFO *ups, int command, void *data);
49 extern int apcsmart_ups_shutdown_with_delay(UPSINFO *ups, int shutdown_delay);
50 extern int apcsmart_ups_get_shutdown_delay(UPSINFO *ups);
51 extern void apcsmart_ups_warn_shutdown(UPSINFO *ups, int shutdown_delay);
53 #endif /* _APCSMART_H */