Add vim modelines.
[monky] / src / apcupsd.h
1 /* apcupsd.h:  conky module for APC UPS daemon monitoring
2  *
3  * Copyright (C) 2009 Jaromir Smrcek <jaromir.smrcek@zoner.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
18  * USA.
19  *
20  * vim: ts=4 sw=4 noet ai cindent syntax=c
21  *
22  */
23
24 #ifndef APCUPSD_H_
25 #define APCUPSD_H_
26
27 enum _apcupsd_items {
28         APCUPSD_NAME,
29         APCUPSD_MODEL,
30         APCUPSD_UPSMODE,
31         APCUPSD_CABLE,
32         APCUPSD_STATUS,
33         APCUPSD_LINEV,
34         APCUPSD_LOAD,
35         APCUPSD_CHARGE,
36         APCUPSD_TIMELEFT,
37         APCUPSD_TEMP,
38         APCUPSD_LASTXFER,
39         _APCUPSD_COUNT,
40 };
41
42 /* type for data exchange with main thread */
43 #define APCUPSD_MAXSTR 32
44 typedef struct apcupsd_s {
45         char items[_APCUPSD_COUNT][APCUPSD_MAXSTR+1];   /* e.g. items[APCUPSD_STATUS] */
46         char host[64];
47         int  port;
48 } APCUPSD_S, *PAPCUPSD_S;
49
50 /* Service routine for the conky main thread */
51 void update_apcupsd(void);
52
53 /* fill in the default values */
54 void init_apcupsd(void);
55
56 #endif /*APCUPSD_H_*/