tuned-switcher 1.1.0
Performance profile manager
Loading...
Searching...
No Matches
ServiceManager Class Referenceabstract

#include <servicemanager.h>

Inheritance diagram for ServiceManager:
Collaboration diagram for ServiceManager:

Public Member Functions

virtual ~ServiceManager ()=default
 
virtual bool IsSupported () const =0
 
virtual bool IsRunning () const =0
 
virtual bool Start () const =0
 
virtual bool Stop () const =0
 

Static Public Member Functions

static ServiceManagerCreate (QObject *parent=nullptr)
 

Protected Member Functions

 ServiceManager (QObject *parent=nullptr)
 

Detailed Description

Class for working with the system service manager.

Constructor & Destructor Documentation

◆ ~ServiceManager()

virtual ServiceManager::~ServiceManager ( )
virtualdefault

Destructor of the ServiceManager class.

◆ ServiceManager()

ServiceManager::ServiceManager ( QObject * parent = nullptr)
explicitprotected

Main constructor of the ServiceManager class. Cannot be called directly. A special factory method Create() should be used instead.

Parameters
parentParent.

Member Function Documentation

◆ Create()

ServiceManager * ServiceManager::Create ( QObject * parent = nullptr)
static

Create an instance of the ServiceManager class. Factory method.

Parameters
parentParent.
Returns
Instance of the ServiceManager class.

◆ IsRunning()

virtual bool ServiceManager::IsRunning ( ) const
pure virtual

Check whether the Tuned service is running.

Returns
Whether the Tuned sevice is running.
Return values
trueThe Tuned service is running.
falseThe Tuned servic is not running.

Implemented in DummyService, and SystemdService.

◆ IsSupported()

virtual bool ServiceManager::IsSupported ( ) const
pure virtual

Check whether the service control feature is supported on running platform.

Returns
Whether the service control feature is supported on running platform.
Return values
trueThe service control feature is supported on running platform.
falseThe service control feature is not supported on running platform.

Implemented in DummyService, and SystemdService.

◆ Start()

virtual bool ServiceManager::Start ( ) const
pure virtual

Start the Tuned service.

Returns
Result of the requested operation.
Return values
trueThe Tuned service was successfully started.
falseAn error occurred when trying to start the Tuned service.

Implemented in DummyService, and SystemdService.

◆ Stop()

virtual bool ServiceManager::Stop ( ) const
pure virtual

Stop the Tuned service.

Returns
Result of the requested operation.
Return values
trueThe Tuned service was successfully stopped.
falseAn error occurred when trying to stop the Tuned service.

Implemented in DummyService, and SystemdService.


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