2
KSysGuard, the KDE System Guard
4
Copyright (c) 1999 - 2001 Chris Schlaeger <cs@kde.org>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
#include "ksysguardd.h"
27
typedef void (*cmdExecutor)(const char*);
30
Set this flag to '1' to request a rescan of the available sensors
33
extern int ReconfigureFlag;
36
Has nearly the same meaning like the above flag ;)
38
extern int CheckSetupFlag;
41
* Delivers the message to the front end
43
void output( const char *fmt, ...)
45
__attribute__ ( ( format ( printf, 1, 2 ) ) )
50
Delivers the error message to the front end.
52
void print_error( const char*, ... )
54
__attribute__ ( ( format ( printf, 1, 2 ) ) )
59
Writes the error message to the syslog daemon.
61
void log_error( const char*, ... )
63
__attribute__ ( ( format ( printf, 1, 2 ) ) )
70
Use this function to register a command with the name
71
@ref command and the function pointer @ref ex.
73
void registerCommand( const char* command, cmdExecutor ex );
76
Use this function to remove a command with the name
79
void removeCommand( const char* command );
82
Use this function to add a new monitior with the name @ref monitor
83
from the type @ref type.
84
@ref ex is a pointer to the function that is called to get a value
85
and @ref iq is a pointer to the function that returns information
87
@ref sm is a parameter to the sensor module object that is passed by
90
void registerAnyMonitor( const char* monitor, const char* type, cmdExecutor ex,
91
cmdExecutor iq, struct SensorModul* sm, int isLegacy );
94
Use this function to add a new monitior with the name @ref monitor
95
from the type @ref type.
96
It will be marked as non-legacy.
97
@ref ex is a pointer to the function that is called to get a value
98
and @ref iq is a pointer to the function that returns information
100
@ref sm is a parameter to the sensor module object that is passed by
103
void registerMonitor( const char* monitor, const char* type, cmdExecutor ex,
104
cmdExecutor iq, struct SensorModul* sm );
107
Use this function to add a new monitior with the name @ref monitor
108
from the type @ref type. This monitor will be flagged as legacy,
109
which will forbid it from being listed by the 'modules' command.
110
The command will continue to function normally otherwise.
111
@ref ex is a pointer to the function that is called to get a value
112
and @ref iq is a pointer to the function that returns information
114
@ref sm is a parameter to the sensor module object that is passed by
117
void registerLegacyMonitor( const char* monitor, const char* type, cmdExecutor ex,
118
cmdExecutor iq, struct SensorModul* sm );
121
Use this function to remove the monitior with the name @ref monitor.
123
void removeMonitor( const char* monitor );
129
void executeCommand( const char* command );
131
void initCommand( void );
132
void exitCommand( void );
134
void printMonitors( const char* cmd );
135
void printTest( const char* cmd );
137
void exQuit( const char* cmd );