1 | /* |
2 | KSysGuard, the KDE System Guard |
3 | |
4 | Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org> |
5 | |
6 | This program is free software; you can redistribute it and/or |
7 | modify it under the terms of version 2 of the GNU General Public |
8 | License as published by the Free Software Foundation. |
9 | |
10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
18 | |
19 | */ |
20 | |
21 | #ifndef KSG_KSYSGUARDD_H |
22 | #define KSG_KSYSGUARDD_H |
23 | |
24 | #include <stdio.h> |
25 | #include <time.h> |
26 | |
27 | /* This is the official ksysguardd port assigned by IANA. */ |
28 | #define PORT_NUMBER 3112 |
29 | |
30 | /* Timer interval in centi-seconds (1/10th of a second) for running updateCommand on modules that support it */ |
31 | #define UPDATEINTERVAL 1 |
32 | |
33 | extern int RunAsDaemon; |
34 | extern int QuitApp; |
35 | |
36 | /* This pointer give you access to the client which made the request */ |
37 | extern FILE* CurrentClient; |
38 | |
39 | struct SensorModul { |
40 | const char *configName; |
41 | void (*initCommand)( struct SensorModul* ); |
42 | void (*exitCommand)( void ); |
43 | int (*updateCommand)( void ); |
44 | void (*checkCommand)( void ); |
45 | int available; |
46 | unsigned long long timeCentiSeconds; |
47 | }; |
48 | |
49 | char* escapeString( char* string ); |
50 | |
51 | #endif |
52 | |