* do not add a KStandardAction manually to actionCollection()
[kdenetwork.git] / krfb / connectioncontroller.h
blob4fb27c4b216806163b15ba70541d6fe453a96025
1 /* This file is part of the KDE project
2 Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8 */
10 #ifndef CONNECTIONCONTROLLER_H
11 #define CONNECTIONCONTROLLER_H
13 #include <QObject>
15 #include <rfb/rfb.h>
17 class KrfbServer;
19 /**
20 @author Alessandro Praduroux <pradu@pradu.it>
22 class ConnectionController : public QObject
24 Q_OBJECT
25 public:
26 ConnectionController(struct _rfbClientRec *_cl, KrfbServer *parent);
28 ~ConnectionController();
30 bool handleCheckPassword(rfbClientPtr cl, const char *response, int len);
31 void handleNegotiationFinished(struct _rfbClientRec *cl);
33 void handleKeyEvent(bool down , rfbKeySym keySym );
34 void handlePointerEvent( int bm, int x, int y);
35 void handleClientGone();
36 void clipboardToServer(const QString &);
38 enum rfbNewClientAction handleNewClient();
40 void setControlEnabled(bool enable);
42 Q_SIGNALS:
43 void sessionEstablished(QString);
44 void notification(QString, QString);
45 void clientDisconnected(ConnectionController *);
47 protected Q_SLOTS:
48 void dialogAccepted();
49 void dialogRejected();
51 private:
52 QString remoteIp;
53 struct _rfbClientRec *cl;
54 bool controlEnabled;
56 int fd;
57 KrfbServer *server;
58 rfbScreenInfoPtr screen;
59 rfbClientPtr client;
60 QTcpSocket *tcpConn;
64 #endif