summaryrefslogtreecommitdiff
path: root/src/modules/battery.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/battery.h')
-rw-r--r--src/modules/battery.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modules/battery.h b/src/modules/battery.h
new file mode 100644
index 0000000..92489b5
--- /dev/null
+++ b/src/modules/battery.h
@@ -0,0 +1,22 @@
+#ifndef _DWXINFO_MODULES_BATTERY_H_
+#define _DWXINFO_MODULES_BATTERY_H_
+
+#include <stdio.h>
+#include <time.h>
+
+#define BATTERY_VALUE_SIZE 5
+
+struct battery {
+ int full;
+ int file_current;
+ time_t last_update;
+
+ char value[BATTERY_VALUE_SIZE];
+};
+
+struct battery * battery_new();
+void battery_free(struct battery *);
+
+void battery_update(struct battery *);
+
+#endif