2007-03-29 21:07:43 +00:00
|
|
|
/* This file is part of the KDE project
|
|
|
|
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public
|
2007-11-08 18:50:58 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-03-29 21:07:43 +00:00
|
|
|
*/
|
|
|
|
|
2007-03-29 20:54:53 +00:00
|
|
|
#ifndef KRFBSERVER_H
|
|
|
|
#define KRFBSERVER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2007-04-06 21:45:19 +00:00
|
|
|
#include <rfb/rfb.h>
|
2007-03-29 20:54:53 +00:00
|
|
|
|
2007-04-15 15:53:18 +00:00
|
|
|
class ConnectionController;
|
2007-03-29 20:54:53 +00:00
|
|
|
/**
|
|
|
|
This class implements the listening server for the RFB protocol.
|
|
|
|
|
|
|
|
@author Alessandro Praduroux <pradu@pradu.it>
|
|
|
|
*/
|
|
|
|
class KrfbServer : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2007-09-15 13:11:12 +00:00
|
|
|
friend class KrfbServerPrivate;
|
2007-03-29 20:54:53 +00:00
|
|
|
public:
|
2007-04-04 14:57:27 +00:00
|
|
|
|
|
|
|
static KrfbServer *self();
|
2007-03-29 20:54:53 +00:00
|
|
|
|
|
|
|
~KrfbServer();
|
|
|
|
|
2007-04-06 21:45:19 +00:00
|
|
|
enum rfbNewClientAction handleNewClient(struct _rfbClientRec *cl);
|
2007-04-12 16:12:37 +00:00
|
|
|
bool checkX11Capabilities();
|
2007-04-06 21:45:19 +00:00
|
|
|
|
2007-03-29 20:54:53 +00:00
|
|
|
signals:
|
2007-04-04 14:57:27 +00:00
|
|
|
void sessionEstablished(QString);
|
2007-03-29 20:54:53 +00:00
|
|
|
void sessionFinished();
|
|
|
|
void desktopControlSettingChanged(bool);
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
|
|
|
|
void startListening();
|
2008-10-28 23:58:35 +00:00
|
|
|
void processRfbEvents();
|
|
|
|
void shutdown();
|
2007-03-29 20:54:53 +00:00
|
|
|
void enableDesktopControl(bool);
|
2007-04-10 20:40:44 +00:00
|
|
|
void updateSettings();
|
|
|
|
void updatePassword();
|
2007-04-15 15:53:18 +00:00
|
|
|
void clientDisconnected(ConnectionController *);
|
2007-03-29 20:54:53 +00:00
|
|
|
|
|
|
|
private:
|
2007-04-04 14:57:27 +00:00
|
|
|
KrfbServer();
|
|
|
|
static KrfbServer *_self;
|
2007-03-29 20:54:53 +00:00
|
|
|
|
2007-04-10 20:40:44 +00:00
|
|
|
class KrfbServerP;
|
|
|
|
KrfbServerP * const d;
|
2007-04-06 21:45:19 +00:00
|
|
|
|
2007-03-29 20:54:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|