Rabbit Remote Control
0.1.0-bate16
Toggle main menu visibility
Loading...
Searching...
No Matches
Plugins
LibVNCServer
Client
BackendLibVNCServer.h
1
#ifndef CCONNECTLIBVNC_H
2
#define CCONNECTLIBVNC_H
3
4
#pragma once
5
6
#include "BackendDesktop.h"
7
#include "rfb/rfbclient.h"
8
#include <QTcpSocket>
9
#include <QTcpServer>
10
#include "OperateLibVNCServer.h"
11
#include "Event.h"
12
13
#ifdef HAVE_LIBSSH
14
#include "SSHTunnelThread.h"
15
#endif
16
17
class
CBackendLibVNCServer :
public
CBackendDesktop
18
{
19
Q_OBJECT
20
21
public
:
22
explicit
CBackendLibVNCServer(
COperateLibVNCServer
* pOperate);
23
virtual
~CBackendLibVNCServer()
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
36
protected
:
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
virtual
void
InputMethodEvent(QInputMethodEvent *event)
override
;
45
46
protected
Q_SLOTS:
47
void
slotConnectProxyServer
(QString szHost, quint16 nPort);
48
#if defined(HAVE_UNIX_DOMAIN_SOCKET) && defined(Q_OS_UNIX)
49
void
slotConnectProxyServer
(QString szFile);
50
#endif
51
52
private
:
53
virtual
OnStartReturnValue
OnStart
()
override
;
54
virtual
int
OnStop
()
override
;
55
virtual
int
OnProcess
()
override
;
56
virtual
int
WakeUp
()
override
;
57
58
int
OnSize();
59
60
private
:
61
rfbClient* m_pClient;
62
QImage m_Image;
63
64
private
:
65
CParameterLibVNCServer
* m_pParameter;
66
QTcpSocket m_tcpSocket;
67
QTcpServer m_Server;
68
QTcpSocket* m_pConnect;
69
70
Channel::CEvent
m_Event;
71
#ifdef HAVE_LIBSSH
72
CSSHTunnelThread
* m_pThread;
73
#endif
74
75
CSecurityLevel::Levels m_SecurityLevel;
76
};
77
78
#endif
// CCONNECTLIBVNC_H
CBackendLibVNCServer::OnStart
virtual OnStartReturnValue OnStart() override
Definition
BackendLibVNCServer.cpp:75
CBackendLibVNCServer::slotConnectProxyServer
void slotConnectProxyServer(QString szHost, quint16 nPort)
[connect local socket server]
Definition
BackendLibVNCServer.cpp:697
CBackendLibVNCServer::WakeUp
virtual int WakeUp() override
Wake up backend thread(background thread).
Definition
BackendLibVNCServer.cpp:367
CBackendLibVNCServer::OnStop
virtual int OnStop() override
Clean.
Definition
BackendLibVNCServer.cpp:275
CBackendLibVNCServer::slotClipBoardChanged
virtual void slotClipBoardChanged() override
Be called when the clip board change.
Definition
BackendLibVNCServer.cpp:372
CBackendLibVNCServer::OnProcess
virtual int OnProcess() override
Specific operation processing of plug-in connection.
Definition
BackendLibVNCServer.cpp:310
COperateLibVNCServer
Definition
OperateLibVNCServer.h:9
CParameterLibVNCServer
Definition
ParameterLibVNCServer.h:9
CSSHTunnelThread
Data is forwarded over a local socket and SSH tunnel.
Definition
SSHTunnelThread.h:26
Channel::CEvent
Definition
Event.h:19
Author: Kang Lin (kl222@126.com)
Copyright (c) Kang Lin Studios All Rights Reserved