summaryrefslogtreecommitdiff
path: root/src/modules/battery.h
blob: 92489b5500b6e9669ae2e4ccecd681054a154d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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