#include <tunedmanager.h>
|
| enum class | ServiceMethod { MethodEnable
, MethodDisable
, MethodReload
, MethodShutdown
} |
| |
Class for working with the Tuned service.
◆ ServiceMethod
Enum with IDs of service methods, used by various methods.
◆ TunedManager()
| TunedManager::TunedManager |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
◆ Disable()
| bool TunedManager::Disable |
( |
| ) |
const |
Disable the Tuned service.
- Returns
- Result of current operation.
- Return values
-
| true | Tuned was successfully disabled. |
| false | An error occurred when trying to disable the Tuned service. |
◆ Enable()
| bool TunedManager::Enable |
( |
| ) |
const |
Enable the Tuned service.
- Returns
- Result of current operation.
- Return values
-
| true | Tuned was successfully enabled. |
| false | An error occurred when trying to enable the Tuned service. |
◆ GetActiveProfile()
| QString TunedManager::GetActiveProfile |
( |
| ) |
const |
Get active Tuned profile.
- Returns
- Active Tuned profile.
◆ GetAvailableProfiles()
| QStringList TunedManager::GetAvailableProfiles |
( |
| ) |
const |
Get the list of available Tuned profiles.
- Returns
- Available Tuned profiles.
◆ GetAvailableProfiles2()
Get the list of available Tuned profiles with additional useful information like profile descriptions.
- Returns
- Available Tuned profiles.
◆ GetProfileMode()
Get current Tuned mode: manual or auto.
- Returns
- Current Tuned mode.
◆ IsProfileEmpty()
| bool TunedManager::IsProfileEmpty |
( |
| ) |
const |
Check whether the Tuned profile is empty.
- Returns
- Whether the Tuned profile is empty.
- Return values
-
| true | The Tuned profile is empty. |
| false | The Tuned profile is not empty. |
◆ IsProfileModeAuto()
| bool TunedManager::IsProfileModeAuto |
( |
| ) |
const |
Check if the Tuned is working in automatic mode.
- Returns
- Automatic mode on/off.
- Return values
-
| true | Tuned is working in automatic mode. |
| false | Tuned is working in manual mode. |
◆ IsProfileRunning()
| bool TunedManager::IsProfileRunning |
( |
| ) |
const |
Check whether the Tuned profile is running.
- Returns
- Whether the Tuned profile is running.
- Return values
-
| true | The Tuned profile is running. |
| false | The Tuned profile is not running. |
◆ IsRunning()
| bool TunedManager::IsRunning |
( |
| ) |
const |
Check whether the Tuned service is running.
- Returns
- Whether the Tuned sevice is running.
- Return values
-
| true | The Tuned sevice is running. |
| false | The Tuned sevice is not running. |
◆ ProfileChangedEvent
| void TunedManager::ProfileChangedEvent |
( |
const QString & | NewProfile, |
|
|
const bool | SwitchResult, |
|
|
const QString & | ResultMessage ) |
|
privateslot |
Tuned profile changed event slot.
- Parameters
-
| NewProfile | Recently switched profile name. |
| SwitchResult | Switch result: true - success; false - failure. |
| ResultMessage | Result message (OK on success). |
◆ ProfileChangedSignal
| void TunedManager::ProfileChangedSignal |
( |
const QString & | , |
|
|
const bool | , |
|
|
const QString & | ) |
|
signal |
Tuned profile changed event signal.
◆ Reload()
| bool TunedManager::Reload |
( |
| ) |
const |
Reload the Tuned service configuration.
- Returns
- Result of current operation.
- Return values
-
| true | Tuned service configuration was reloaded. |
| false | An error occurred when trying to reload the Tuned service configuration. |
◆ RunServiceMethod()
| bool TunedManager::RunServiceMethod |
( |
const ServiceMethod | method | ) |
const |
Run the specified service control method.
- Parameters
-
| method | Service control method name. |
- Returns
- Result of the requested service control operation.
- Return values
-
| true | The requested service control operation completed successfully. |
| false | An error occurred when trying to perform the requested operation. |
◆ SetActiveProfile()
| QTunedResult TunedManager::SetActiveProfile |
( |
const QString & | Profile | ) |
const |
Switch Tuned to the the specified profile.
- Parameters
-
| Profile | New Tuned profile name. |
- Returns
- Result of current operation.
◆ SetProfileModeAuto()
Switch Tuned to automatic mode.
- Returns
- Result of current operation.
◆ Shutdown()
| bool TunedManager::Shutdown |
( |
| ) |
const |
Shutdown the Tuned service and disable all configurations.
- Returns
- Result of current operation.
- Return values
-
| true | Tuned service configuration was shut down and configurations disabled. |
| false | An error occurred when trying to shut down the Tuned service and disable configurations. |
◆ DBusInstance
| QDBusConnection TunedManager::DBusInstance = QDBusConnection::systemBus() |
|
private |
◆ TunedBusInterface
| const QString TunedManager::TunedBusInterface = QStringLiteral("com.redhat.tuned.control") |
|
private |
Stores the Tuned DBus interface.
◆ TunedBusMethodNameActiveProfile
| const QString TunedManager::TunedBusMethodNameActiveProfile = QStringLiteral("active_profile") |
|
private |
Stores the Tuned DBus ActiveProfile method name.
◆ TunedBusMethodNameAutoProfile
| const QString TunedManager::TunedBusMethodNameAutoProfile = QStringLiteral("auto_profile") |
|
private |
Stores the Tuned DBus AutoProfile method name.
◆ TunedBusMethodNameDisable
| const QString TunedManager::TunedBusMethodNameDisable = QStringLiteral("disable") |
|
private |
Stores the Tuned DBus Disable method name.
◆ TunedBusMethodNameIsRunning
| const QString TunedManager::TunedBusMethodNameIsRunning = QStringLiteral("is_running") |
|
private |
Stores the Tuned DBus IsRunning method name.
◆ TunedBusMethodNameProfileMode
| const QString TunedManager::TunedBusMethodNameProfileMode = QStringLiteral("profile_mode") |
|
private |
Stores the Tuned DBus SetProfileMode method name.
◆ TunedBusMethodNameProfiles
| const QString TunedManager::TunedBusMethodNameProfiles = QStringLiteral("profiles") |
|
private |
Stores the Tuned DBus AvailableProfiles method name.
◆ TunedBusMethodNameProfiles2
| const QString TunedManager::TunedBusMethodNameProfiles2 = QStringLiteral("profiles2") |
|
private |
Stores the Tuned DBus AvailableProfiles2 method name.
◆ TunedBusMethodNameReload
| const QString TunedManager::TunedBusMethodNameReload = QStringLiteral("reload") |
|
private |
Stores the Tuned DBus Reload method name.
◆ TunedBusMethodNameStart
| const QString TunedManager::TunedBusMethodNameStart = QStringLiteral("start") |
|
private |
Stores the Tuned DBus Start method name.
◆ TunedBusMethodNameStop
| const QString TunedManager::TunedBusMethodNameStop = QStringLiteral("stop") |
|
private |
Stores the Tuned DBus Stop method name.
◆ TunedBusMethodNameSwitchProfile
| const QString TunedManager::TunedBusMethodNameSwitchProfile = QStringLiteral("switch_profile") |
|
private |
Stores the Tuned DBus SwitchProfile method name.
◆ TunedBusName
| const QString TunedManager::TunedBusName = QStringLiteral("com.redhat.tuned") |
|
private |
Stores the Tuned DBus interface name.
◆ TunedBusPath
| const QString TunedManager::TunedBusPath = QStringLiteral("/Tuned") |
|
private |
Stores the Tuned DBus object path.
◆ TunedBusSignalNameProfileChanged
| const QString TunedManager::TunedBusSignalNameProfileChanged = QStringLiteral("profile_changed") |
|
private |
Stores the Tuned DBus ProfileChanged signal name.
◆ TunedBusValueAutoProfile
| const QString TunedManager::TunedBusValueAutoProfile = QStringLiteral("auto") |
|
private |
Stores the Tuned DBus AutoProfile value.
The documentation for this class was generated from the following files: