Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
ServiceRabbitVNC.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CSERVICETIGERVNC_H
4#define CSERVICETIGERVNC_H
5
6#pragma once
7
8#include "Service.h"
9#include <QSharedPointer>
10#include <QTcpServer>
11
12#ifdef HAVE_ICE
13 #include "ICE/IceSignal.h"
14#endif
15
16class CConnection;
17class CServiceRabbitVNC : public CService//, rfb::SDesktop
18{
19 Q_OBJECT
20public:
21 explicit CServiceRabbitVNC(CPluginService *plugin);
22 virtual ~CServiceRabbitVNC();
23
24#ifdef HAVE_GUI
25 virtual QWidget* GetParameterWidget(QWidget* parent = nullptr) override;
26#endif
27
28 // CService interface
29protected:
30 virtual int OnInit() override;
31 virtual int OnClean() override;
32
33private Q_SLOTS:
34 void slotNewConnection();
35 void slotDisconnected();
36 void slotError(int nErr, QString szErr);
37
38private:
39 QTcpServer m_Lister;
40 QList<QSharedPointer<CConnection> > m_lstConnection;
41
42#ifdef HAVE_ICE
43private Q_SLOTS:
44 void slotSignalConnected();
45 void slotSignalDisConnected();
46 void slotSignalError(int nErr, const QString& szErr);
47 void slotSignalOffer(const QString& fromUser,
48 const QString& toUser,
49 const QString& channelId,
50 const QString& type,
51 const QString& sdp);
52
53private:
54 QSharedPointer<CIceSignal> m_Signal;
55#endif
56};
57
58#endif // CSERVICETIGERVNC_H
The service plugin interface.
virtual int OnInit() override
Init service.
virtual int OnClean() override
Clean service.
The service interface.
Definition Service.h:38