krfb
connectioncontroller.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 */ 00009 00010 #ifndef CONNECTIONCONTROLLER_H 00011 #define CONNECTIONCONTROLLER_H 00012 00013 #include <QObject> 00014 00015 #include <rfb/rfb.h> 00016 00017 class KrfbServer; 00018 00022 class ConnectionController : public QObject 00023 { 00024 Q_OBJECT 00025 public: 00026 ConnectionController(struct _rfbClientRec *_cl, KrfbServer *parent); 00027 00028 ~ConnectionController(); 00029 00030 bool handleCheckPassword(rfbClientPtr cl, const char *response, int len); 00031 void handleNegotiationFinished(struct _rfbClientRec *cl); 00032 00033 void handleKeyEvent(bool down , rfbKeySym keySym ); 00034 void handlePointerEvent( int bm, int x, int y); 00035 void handleClientGone(); 00036 void clipboardToServer(const QString &); 00037 00038 enum rfbNewClientAction handleNewClient(); 00039 00040 void setControlEnabled(bool enable); 00041 00042 Q_SIGNALS: 00043 void sessionEstablished(QString); 00044 void notification(QString, QString); 00045 void clientDisconnected(ConnectionController *); 00046 00047 protected Q_SLOTS: 00048 void dialogAccepted(); 00049 void dialogRejected(); 00050 00051 private: 00052 QString remoteIp; 00053 struct _rfbClientRec *cl; 00054 bool controlEnabled; 00055 /* 00056 int fd; 00057 KrfbServer *server; 00058 rfbScreenInfoPtr screen; 00059 rfbClientPtr client; 00060 QTcpSocket *tcpConn; 00061 */ 00062 }; 00063 00064 #endif
KDE 4.2 API Reference