aboutsummaryrefslogtreecommitdiffstats
path: root/inc/jo_lowbat.hpp
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-06 22:41:33 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-06 22:41:33 +0200
commit5f1fdd425ad147efd33b54b39deb1d50459185c2 (patch)
tree408ca975011c6e7d62826891189d3a69da870d7f /inc/jo_lowbat.hpp
parentCanceled system() remplacement for libnotify as it leaks a lot (diff)
downloadlowbat-gnu-5f1fdd425ad147efd33b54b39deb1d50459185c2.tar.gz
lowbat-gnu-5f1fdd425ad147efd33b54b39deb1d50459185c2.tar.bz2
lowbat-gnu-5f1fdd425ad147efd33b54b39deb1d50459185c2.tar.xz
lowbat-gnu-5f1fdd425ad147efd33b54b39deb1d50459185c2.tar.zst
lowbat-gnu-5f1fdd425ad147efd33b54b39deb1d50459185c2.zip
ACPI is not required anymore
Diffstat (limited to 'inc/jo_lowbat.hpp')
-rw-r--r--inc/jo_lowbat.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/inc/jo_lowbat.hpp b/inc/jo_lowbat.hpp
index 7428c86..db7658d 100644
--- a/inc/jo_lowbat.hpp
+++ b/inc/jo_lowbat.hpp
@@ -6,21 +6,27 @@
using namespace std;
+enum retvals {
+ JO_RET_FINE,
+ JO_RET_MISS_DEP,
+ JO_RET_OPEN_FAILED,
+ JO_RET_NOTIFY_FAILED
+};
+
class Lowbat {
public:
- uint8_t jo_testAcpi(void);
uint8_t jo_testNotifySend(void);
uint8_t jo_testEspeak(void);
int jo_fetchBatlvl(void);
- int jo_fetchAcstat(void);
+ uint8_t jo_fetchAcstat(void);
int jo_notify(void);
int jo_speak(void);
- void jo_setMsg(const char *msg);
- static string jo_exec(const char*);
+ void jo_setMsg(const char *);
+ void jo_delMsg(void);
private:
string m_batlvl;
- string m_msg;
+ string *m_msg;
};
#endif