Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
ConnectLibVNCServer.h
1#ifndef CCONNECTLIBVNC_H
2#define CCONNECTLIBVNC_H
3
4#pragma once
5
6#include "ConnectDesktop.h"
7#include "rfb/rfbclient.h"
8#include <QTcpSocket>
9#include <QTcpServer>
10#include "ConnecterLibVNCServer.h"
11#include "Event.h"
12
13#ifdef HAVE_LIBSSH
14#include "SSHTunnelThread.h"
15#endif
16
18{
19 Q_OBJECT
20
21public:
22 explicit CConnectLibVNCServer(CConnecterLibVNCServer* pConnecter);
23 virtual ~CConnectLibVNCServer() override;
24
25 static rfbBool cb_resize(rfbClient* client);
26 static void cb_update (rfbClient *client, int x, int y, int w, int h);
27 static void cb_kbd_leds(rfbClient* client, int value, int pad);
28 static void cb_bell(struct _rfbClient* client);
29 static void cb_text_chat(rfbClient* client, int value, char *text);
30 static void cb_got_selection(rfbClient *client, const char *text, int len);
31 static rfbCredential* cb_get_credential(rfbClient* cl, int credentialType);
32 static char* cb_get_password(rfbClient* client);
33 static rfbBool cb_cursor_pos(rfbClient* client, int x, int y);
34 static void cb_got_cursor_shape(rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel);
35
36public Q_SLOTS:
37 virtual void slotClipBoardChanged() override;
38 virtual void mousePressEvent(QMouseEvent* event) override;
39 virtual void mouseReleaseEvent(QMouseEvent* event) override;
40 virtual void mouseMoveEvent(QMouseEvent* event) override;
41 virtual void wheelEvent(QWheelEvent* event) override;
42 virtual void keyPressEvent(QKeyEvent *event) override;
43 virtual void keyReleaseEvent(QKeyEvent *event) override;
44
45 void slotConnectProxyServer(QString szHost, quint16 nPort);
46#if defined(HAVE_UNIX_DOMAIN_SOCKET) && defined(Q_OS_UNIX)
47 void slotConnectProxyServer(QString szFile);
48#endif
49
50private:
51 virtual OnInitReturnValue OnInit() override;
52 virtual int OnClean() override;
53 virtual int OnProcess() override;
54 virtual int WakeUp() override;
55
56 int OnSize();
57
58private:
59 rfbClient* m_pClient;
60 QImage m_Image;
61
62private:
63 CParameterLibVNCServer* m_pParameter;
64 QTcpSocket m_tcpSocket;
65 QTcpServer m_Server;
66 QTcpSocket* m_pConnect;
67
68 Channel::CEvent m_Event;
69#ifdef HAVE_LIBSSH
70 CSSHTunnelThread* m_pThread;
71#endif
72};
73
74#endif // CCONNECTLIBVNC_H
Remote desktop connect interface.
void slotConnectProxyServer(QString szHost, quint16 nPort)
[connect local socket server]
virtual int OnProcess() override
Specific operation processing of plug-in connection.
virtual int WakeUp() override
Wake up Connect thread(background thread)
virtual OnInitReturnValue OnInit() override
Specific plug-in realizes connection initialization.
virtual int OnClean() override
Clean.
Data is forwarded over a local socket and SSH tunnel.