2
KSysGuard, the KDE System Guard
4
Copyright (c) 1999, 2000 Chris Schlaeger <cs@kde.org>
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public
8
License version 2 or at your option version 3 as published by
9
the Free Software Foundation.
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
#ifndef KSG_SENSORSOCKETAGENT_H
23
#define KSG_SENSORSOCKETAGENT_H
25
#include <QtNetwork/QTcpSocket>
27
#include "SensorAgent.h"
35
The SensorSocketAgent connects to a ksysguardd via a TCP
36
connection. It keeps a list of pending requests that have not been
37
answered yet by ksysguard. The current implementation only allowes
38
one pending requests. Incoming requests are queued in an input
41
class SensorSocketAgent : public SensorAgent
46
explicit SensorSocketAgent( SensorManager *sm );
49
bool start( const QString &host, const QString &shell,
50
const QString &command = "", int port = -1 );
52
void hostInfo( QString &shell, QString &command, int &port ) const;
55
void connectionClosed();
58
void error( QAbstractSocket::SocketError );
61
bool writeMsg( const char *msg, int len );