adapated for Maemo
[shermanaquarium] / sherman-aquarium / shermans / status.h
1
2 /* 
3
4    The linux part is complete and the other OS's parts are more or less non-existing.
5
6    If you use another OS like *BSD, OS X or some unix and are
7    interested to make this work on your machine look at status_<your_os>.c and see what is
8    needed to be done, please mail me and we can try to make implement the missning parts.
9
10    
11 */
12 #include <gai/gai.h>
13 #include "defines.h"
14 #include "../config.h"
15
16 #ifdef LINUX
17 #include "status_linux.h"
18 #endif
19
20 #ifdef FREEBSD
21 #include "status_freebsd.h"
22 #endif
23
24 #ifdef DARWIN
25 #include "status_darwin.h"
26 #endif
27
28
29 #define SENSORS_TEMP1 1
30 #define SENSORS_TEMP2 2
31 #define SENSORS_TEMP3 3
32 #define SENSORS_TEMP4 4
33 #define SENSORS_FAN1 5
34 #define SENSORS_FAN2 6
35 #define SENSORS_FAN3 7
36
37
38 #define SENSORS_CURRENT 1
39 #define SENSORS_LIMIT 2
40 #define SENSORS_HYSTERESIS 3
41
42 #define NET_RECV 0
43 #define NET_SENT 1
44
45 #define NET_LO 0
46 #define NET_ETH0 1
47 #define NET_ETH1 2
48 #define NET_PPP0 3
49
50 #define NET_X NET_SENT+1
51 #define NET_Y NET_PPP0+1
52
53 /* Init status */
54 void status_init(void);
55
56 /* Frees and such stuff done by init */
57 void status_exit(void);
58
59 /* Reports status of Fans, Thermometers and such stuff */
60 int status_sensors(int);
61
62 /* Swap disk usage in % */
63 int status_swap(void);
64
65 /* Disc space usage in % */
66 int status_disc(char *);
67
68 /* CPU load in % - Smoothed down */
69 int status_cpu(void);
70
71 /* Memory usage in % */
72 int status_mem(void);
73
74 /* Network devices usage. Returned is the bytes transfered betwen this and the 
75    measurement before.*/
76 int status_net(int, int);