Patronum
Loading...
Searching...
No Matches
IPService.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef ISERVICE_H
9#define ISERVICE_H
10
11#include <QList>
12#include "Patronum_global.h"
13
14namespace Patronum {
15
16class Feature;
17
22{
23public:
24 IService();
25 virtual ~IService() = default;
26
32 virtual void handleReceiveData(const QHash<QString, Feature>& data) = 0;
33
43 virtual bool handleReceive(const Feature &data) = 0;
44
50 virtual QSet<Feature> supportedFeatures() = 0;
51
56 virtual bool onStart() = 0;
57
61 virtual void onStop() = 0;
62
66 virtual void onResume() = 0;
67
71 virtual void onPause() = 0;
72};
73}
74#endif // ISERVICE_H
#define PATRONUM_LIBRARYSHARED_EXPORT
The Feature class it is atomic type for describe service command.
Definition PFeature.h:22
The IService class is base interface of the service.
Definition IPService.h:22
virtual bool handleReceive(const Feature &data)=0
handleReceive This method invoked when service receive a request from terminal. Override this method ...
virtual void onResume()=0
onResume This method invoked when service receive resume command from the terminal.
virtual void onPause()=0
onPause This method invoked when service receive pause command from the terminal.
virtual void handleReceiveData(const QHash< QString, Feature > &data)=0
handleReceiveData This method get all received commnads and process its. For each command will invoke...
virtual void onStop()=0
onStop This method invoked when service receive stop command from the terminal.
virtual ~IService()=default
virtual bool onStart()=0
onStart This method invoked when service is started successful.
virtual QSet< Feature > supportedFeatures()=0
supportedFeatures This method should be return the list of the supported fetures. Override this metho...
The Patronum namespace - It is main name space of Patronum Library. The Patronum library support the ...