玉兔远程控制 0.0.31
载入中...
搜索中...
未找到
PluginServiceRabbitVNC.cpp
1// Author: Kang Lin <kl222@126.com>
2
3#include "PluginServiceRabbitVNC.h"
4#include "RabbitCommonDir.h"
5#include <QDebug>
6#include <QApplication>
7#include <rfb/LogWriter.h>
8#include <rfb/Logger_stdio.h>
9#include "ServiceRabbitVNC.h"
10#include <QLoggingCategory>
11
12Q_LOGGING_CATEGORY(RabbitVNC, "RabbitVNC")
13
15 : CPluginServiceThread(parent)
16{
17 //rfb::SecurityClient::setDefaults();
18
19 rfb::initStdIOLoggers();
20#ifdef WIN32
21 rfb::initFileLogger("C:\\temp\\vncviewer.log");
22#else
23 rfb::initFileLogger("/tmp/vncviewer.log");
24#endif
25 rfb::LogWriter::setLogParams("*:stderr:100");
26
27}
28
29CPluginServiceRabbitVNC::~CPluginServiceRabbitVNC()
30{
31 qDebug(RabbitVNC) << "CPluginServiceRabbitVNC::~CPluginServiceRabbitVNC()";
32}
33
35{
36 return "RFB";
37}
38
39const QString CPluginServiceRabbitVNC::Name() const
40{
41 return "RabbitVNC";
42}
43
45{
46 return tr("RabbitVNC");
47}
48
50{
51 return tr("VNC(Virtual Network Console): Access remote desktops such as unix/linux, windows, etc.") + "\n"
52 + tr("VNC is a set of programs using the RFB (Remote Frame Buffer) protocol.");
53}
54
virtual const QString Description() const override
插件描述
virtual const QString DisplayName() const override
The plugin display name
virtual const QString Name() const override
插件名,这个名一定要与工程名(${PROJECT_NAME})相同。 翻译文件(${PROJECT_NAME}_*.ts))名与其相关。
virtual const QString Protocol() const override
Plugin Protocol
virtual CService * NewService() override
New service
服务插件接口。默认为每个插件启动一个线程进行处理。此接口仅由插件实现。
服务接口。由具体的协议实现。此接口仅由插件实现。 支持非Qt事件循环。详见: Init() 、 slotProcess() 如果不启用非Qt事件循环。则 OnInit() 返回 > 0
Definition Service.h:38