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