wmail: bumped to 2.1.
[dockapps.git] / wmfu / system.h
blob2e82b79c0221e5a4825510e3ff2a7b2cc881b228
1 /*
2 * Copyright (c) 2007 Daniel Borca All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef SYSTEM_GET_H_included
21 #define SYSTEM_GET_H_included
23 typedef struct {
24 int used;
25 int old_idle;
26 int old_total;
27 } CPUSTAT;
29 typedef struct {
30 char name[32]; /* IFNAMSIZ */
31 char essid[32]; /* IW_ESSID_MAX_SIZE */
32 int ipv4;
33 int wlink;
34 } IFSTAT;
36 typedef struct {
37 char name[8];
38 int temp;
39 int max;
40 } TEMPSTAT;
42 typedef struct {
43 char name[8];
44 int full_cap;
45 int curr_cap;
46 int rate;
47 } BATSTAT;
49 int system_get_uptime (int *days, int *hours, int *mins);
50 int system_get_cpu_load (int num, CPUSTAT *avg, CPUSTAT load[]);
51 int system_get_cpu_speed (int num, int speed[]);
52 int system_get_cpu_gov (int cpu, int max, char *out);
53 int system_get_mem_stat (int *mem_free, int *mem_total, int *swp_free, int *swp_total);
54 int system_get_max_temp (SENSOR *list, int *temp, int *crit);
55 int system_get_temperature (SENSOR *list, int num, TEMPSTAT temp[]);
56 int system_get_best_wifi (int *wifi);
57 int system_get_ac_adapter (SENSOR *list);
58 int system_get_battery (SENSOR *list, int num, BATSTAT *total, BATSTAT batt[]);
59 int system_get_netif (int num, IFSTAT *ifaces);
61 #endif