2 * Copyright (C) 2007 Adam Kropelin
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General
6 * Public License as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public
14 * License along with this program; if not, write to the Free
15 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
35 StatMgr(const char *host
, unsigned short port
);
39 astring
Get(const char* key
);
40 bool GetAll(alist
<astring
> &keys
, alist
<astring
> &values
);
41 bool GetEvents(alist
<astring
> &events
);
42 bool GetSummary(int &battstat
, astring
&statstr
, astring
&upsname
);
49 char *ltrim(char *str
);
50 void rtrim(char *str
);
51 char *trim(char *str
);
62 keyval m_stats
[MAX_STATS
];
64 unsigned short m_port
;