QtService  1.1.0
A platform independent library to easily create system services and use some of their features
serviceplugin.h
Go to the documentation of this file.
1 #ifndef QTSERVICE_SERVICEPLUGIN_H
2 #define QTSERVICE_SERVICEPLUGIN_H
3 
4 #include <QtCore/qobject.h>
5 
6 #include "QtService/qtservice_global.h"
7 
8 namespace QtService {
9 
10 class Service;
11 class ServiceBackend;
12 class ServiceControl;
14 class Q_SERVICE_EXPORT ServicePlugin
15 {
16  Q_DISABLE_COPY(ServicePlugin)
17 
18 public:
19  ServicePlugin();
20  virtual ~ServicePlugin();
21 
23  virtual QString currentServiceId() const = 0;
24 
26  virtual ServiceBackend *createServiceBackend(const QString &backend, Service *service) = 0;
28  virtual ServiceControl *createServiceControl(const QString &backend, QString &&serviceId, QObject *parent) = 0;
29 
30 protected:
32  QPair<QString, QString> detectNamedService(const QString &serviceId) const;
33 };
34 
35 }
36 
38 #define QtService_ServicePlugin_Iid "de.skycoder42.QtService.ServicePlugin"
40 
41 #endif // QTSERVICE_SERVICEPLUGIN_H
#define QtService_ServicePlugin_Iid
The IID to be used to create a service plugin.
Definition: serviceplugin.h:38
The main interface to implement to create a service.
Definition: service.h:37
The primary namespace of the QtService library.
A class to interact with the systems service manager.
The interface that needs to be implemented to provide the backend for the service engine...
The plugin interface to implement as primary interface of a servicebackend plugin.
Definition: serviceplugin.h:14