Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
PluginService.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CPLUGINSERVICE_H
4#define CPLUGINSERVICE_H
5
6#include <QObject>
7#include <QTranslator>
8#include <QSharedPointer>
9
10#include "Service.h"
11#include "Screen.h"
12
13class CServiceThread;
14
26class SERVICE_EXPORT CPluginService : public QObject
27{
28 Q_OBJECT
29
30public:
31 explicit CPluginService(QObject *parent = nullptr);
32 virtual ~CPluginService();
33
35 virtual const QString Id() const;
37 virtual const QString Protocol() const = 0;
44 virtual const QString Name() const = 0;
46 virtual const QString DisplayName() const;
49 virtual const QString Description() const = 0;
50 virtual const QIcon Icon() const;
51
56 virtual void Start();
57 virtual void Stop();
58
60 virtual CService* NewService() = 0;
61
62 int InitTranslator();
63
64private:
65 QSharedPointer<CService> m_Service;
66 QTranslator m_Translator;
67};
68
69QT_BEGIN_NAMESPACE
70#define CPluginService_iid "KangLinStudio.Rabbit.RemoteControl.CPluginService"
71Q_DECLARE_INTERFACE(CPluginService, CPluginService_iid)
72QT_END_NAMESPACE
73
74#endif // CPLUGINSERVICE_H
The service plugin interface.
virtual CService * NewService()=0
New service.
virtual const QString Description() const =0
Plugin description.
virtual const QString Name() const =0
This name must be the same as the project name (${PROJECT_NAME}).
virtual const QString Protocol() const =0
Plugin Protocol.
The service interface.
Definition Service.h:38