Patronum
Loading...
Searching...
No Matches
Patronum::IService Class Referenceabstract

The IService class is base interface of the service. More...

#include <IPService.h>

Inheritance diagram for Patronum::IService:
Inheritance graph
Collaboration diagram for Patronum::IService:
Collaboration graph

Public Member Functions

 IService ()
 
virtual ~IService ()=default
 
virtual void handleReceiveData (const QHash< QString, Feature > &data)=0
 handleReceiveData This method get all received commnads and process its. For each command will invoke the IService::handleReceive method.
 
virtual bool handleReceive (const Feature &data)=0
 handleReceive This method invoked when service receive a request from terminal. Override this method for work your service.
 
virtual QSet< FeaturesupportedFeatures ()=0
 supportedFeatures This method should be return the list of the supported fetures. Override this method for add your features for the service.
 
virtual bool onStart ()=0
 onStart This method invoked when service is started successful.
 
virtual void onStop ()=0
 onStop This method invoked when service receive stop command from the terminal.
 
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.
 

Detailed Description

The IService class is base interface of the service.

Definition at line 21 of file IPService.h.

Constructor & Destructor Documentation

◆ IService()

Patronum::IService::IService ( )

Definition at line 11 of file IPService.cpp.

◆ ~IService()

virtual Patronum::IService::~IService ( )
virtualdefault

Member Function Documentation

◆ handleReceive()

virtual bool Patronum::IService::handleReceive ( const Feature data)
pure virtual

handleReceive This method invoked when service receive a request from terminal. Override this method for work your service.

Parameters
dataThis is input data.
Returns
This method should be return true if the data command is supported and processed successful. IF you return false then a negative message will be sent to a terminal app.
See also
ServiceBase::handleReceiveData
Here is the caller graph for this function:

◆ handleReceiveData()

virtual void Patronum::IService::handleReceiveData ( const QHash< QString, Feature > &  data)
pure virtual

handleReceiveData This method get all received commnads and process its. For each command will invoke the IService::handleReceive method.

Parameters
dataThis is array of the incomming requests (commands)

Implemented in Patronum::ServiceBase.

◆ onPause()

virtual void Patronum::IService::onPause ( )
pure virtual

onPause This method invoked when service receive pause command from the terminal.

Implemented in Patronum::ServiceBase.

◆ onResume()

virtual void Patronum::IService::onResume ( )
pure virtual

onResume This method invoked when service receive resume command from the terminal.

Implemented in Patronum::ServiceBase.

◆ onStart()

virtual bool Patronum::IService::onStart ( )
pure virtual

onStart This method invoked when service is started successful.

Returns
true if service started successful

Implemented in Patronum::ServiceBase.

◆ onStop()

virtual void Patronum::IService::onStop ( )
pure virtual

onStop This method invoked when service receive stop command from the terminal.

Implemented in Patronum::ServiceBase.

◆ supportedFeatures()

virtual QSet< Feature > Patronum::IService::supportedFeatures ( )
pure virtual

supportedFeatures This method should be return the list of the supported fetures. Override this method for add your features for the service.

Returns
should be return a set of supported features.

Implemented in Patronum::ServiceBase.


The documentation for this class was generated from the following files: