2 // C++ Implementation: common
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
6 // Copyright: See COPYING file that comes with this distribution
14 string
readStringSysFile(const char * fileName
) {
18 inFile
.open(fileName
);
25 int readIntSysFile(const char * fileName
) {
29 inFile
.open(fileName
);
36 int toStatusInt(std::string status
) {
37 if (status
== "Discharging")
38 return UI_BATTERY_DISCHARGING
;
39 else if (status
== "Charging")
40 return UI_BATTERY_CHARGING
;
41 else if (status
== "Full")
42 return UI_BATTERY_FULL
;