use the builtin config also as a default one
[monky] / src / common.h
1 #ifndef COMMON_H_
2 #define COMMON_H_
3
4 int check_mount(char *s);
5 void update_diskio(void);
6 void prepare_update(void);
7 void update_uptime(void);
8 void update_meminfo(void);
9 void update_net_stats(void);
10 void update_cpu_usage(void);
11 void update_total_processes(void);
12 void update_running_processes(void);
13 void update_i8k(void);
14 char get_freq(char *, size_t, const char *, int, unsigned int);
15 void get_freq_dynamic(char *, size_t, const char *, int);
16 char get_voltage(char *, size_t, const char *, int, unsigned int);      /* ptarjan */
17 void update_load_average(void);
18 void update_top(void);
19 void free_all_processes(void);
20 struct process *get_first_process(void);
21 void get_cpu_count(void);
22
23 int open_sysfs_sensor(const char *dir, const char *dev, const char *type, int n,
24         int *divisor, char *devtype);
25
26 #define open_i2c_sensor(dev, type, n, divisor, devtype) \
27         open_sysfs_sensor("/sys/bus/i2c/devices/", dev, type, n, divisor, devtype)
28 #define open_platform_sensor(dev, type, n, divisor, devtype) \
29         open_sysfs_sensor("/sys/bus/platform/devices/", dev, type, n, divisor, devtype)
30 #define open_hwmon_sensor(dev, type, n, divisor, devtype) \
31         open_sysfs_sensor("/sys/class/hwmon/", dev, type, n, divisor, devtype)
32
33 double get_sysfs_info(int *fd, int arg, char *devtype, char *type);
34
35 void get_adt746x_cpu(char *, size_t);
36 void get_adt746x_fan(char *, size_t);
37 unsigned int get_diskio(void);
38
39 int open_acpi_temperature(const char *name);
40 double get_acpi_temperature(int fd);
41 void get_acpi_ac_adapter(char *, size_t);
42 void get_acpi_fan(char *, size_t);
43 void get_battery_stuff(char *buf, unsigned int n, const char *bat, int item);
44 int get_battery_perct(const char *bat);
45 int get_battery_perct_bar(const char *bat);
46
47 #endif /*COMMON_H_*/