Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
PluginTigerVnc.cpp
1// Author: Kang Lin <kl222@126.com>
2
3#include "PluginTigerVnc.h"
4#include "ConnecterVnc.h"
5#include "RabbitCommonDir.h"
6
7#ifdef HAVE_LIBSSH
8 #include "ChannelSSHTunnel.h"
9#endif
10
11#include <QLoggingCategory>
12static Q_LOGGING_CATEGORY(log, "VNC.Plugin.Tiger")
13
14CPluginTigerVnc::CPluginTigerVnc(QObject *parent)
15 : CPluginClient(parent)
16{
17 qDebug(log) << "CPluginTigerVnc::CPluginTigerVnc()";
18}
19
20CPluginTigerVnc::~CPluginTigerVnc()
21{
22 qDebug(log) << "CPluginTigerVnc::~CPluginTigerVnc()";
23}
24
25const QString CPluginTigerVnc::Name() const
26{
27 return "TigerVNC";
28}
29
30const QString CPluginTigerVnc::DisplayName() const
31{
32 return tr("TigerVNC");
33}
34
35const QString CPluginTigerVnc::Description() const
36{
37 return tr("VNC(Virtual Network Console): Access remote desktops such as unix/linux, windows, etc.") + "\n"
38 + tr("VNC is a set of programs using the RFB (Remote Frame Buffer) protocol.") + "\n"
39 + tr("The plugin is used TigerVNC");
40}
41
42const QString CPluginTigerVnc::Protocol() const
43{
44 return "RFB";
45}
46
47const QIcon CPluginTigerVnc::Icon() const
48{
49 return QIcon::fromTheme("vnc");
50}
51
52const QString CPluginTigerVnc::Version() const
53{
54 return PluginTigerVNC_VERSION;
55}
56
57const QString CPluginTigerVnc::Details() const
58{
59 QString szDetails;
60#ifdef HAVE_LIBSSH
61 QSharedPointer<CParameterChannelSSH> parameter(new CParameterChannelSSH());
62 CChannelSSHTunnel channel(parameter);
63 szDetails += channel.GetDetails();
64#endif
65 return szDetails;
66}
67
69{
70 if(Id() == szID)
71 {
72 return new CConnecterVnc(this);
73 }
74 return nullptr;
75}
ssh tunnel class
Connecter interface.
Definition Connecter.h:62
The plugin interface.
virtual const QString Id() const
ID. Default: Protocol() + ":" + Name()
virtual const QString Protocol() const override
Plugin Protocol.
virtual const QString Name() const override
This name must be the same as the project name (${PROJECT_NAME}). The translation file (${PROJECT_NAM...
virtual CConnecter * CreateConnecter(const QString &szID) override
New CConnecter instance.
virtual const QString DisplayName() const override
The plugin display name.
virtual const QString Description() const override
Plugin description.
virtual const QString Version() const
Version.
virtual const QString Details() const override
Display more information in About dialog or log.