| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/components/controls/cpu/cpufreqprofilepart.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "core/profilepart.h"cxx . . $ `<file>/src/core/profilepart.h`/ |
| 7 | #include "cpufreq.h"cxx . . $ `<file>/src/core/components/controls/cpu/cpufreq.h`/ |
| 8 | #include <optional> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | class CPUFreqProfilePartcxx . . $ CPUFreqProfilePart# final |
| 13 | : public ProfilePartcxx . . $ ProfilePart# |
| 14 | , public CPUFreqcxx . . $ CPUFreq#::Importercxx . . $ CPUFreq#Importer# |
| 15 | { |
| 16 | public: |
| 17 | class Importercxx . . $ CPUFreqProfilePart#Importer# : public IProfilePartcxx . . $ IProfilePart#::Importercxx . . $ IProfilePart#Importer# |
| 18 | { |
| 19 | public: |
| 20 | virtual stdcxx . . $ std/::stringcxx . . $ std/string# const &provideCPUFreqScalingGovernorcxx . . $ CPUFreqProfilePart#Importer#provideCPUFreqScalingGovernor(f4fff0029955a25f).() const = 0; |
| 21 | virtual stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> const &provideCPUFreqEPPHintcxx . . $ CPUFreqProfilePart#Importer#provideCPUFreqEPPHint(f34183478aa9387b).() const = 0; |
| 22 | }; |
| 23 | |
| 24 | class Exportercxx . . $ CPUFreqProfilePart#Exporter# : public IProfilePartcxx . . $ IProfilePart#::Exportercxx . . $ IProfilePart#Exporter# |
| 25 | { |
| 26 | public: |
| 27 | virtual void takeCPUFreqScalingGovernorcxx . . $ CPUFreqProfilePart#Exporter#takeCPUFreqScalingGovernor(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &governor) = 0; |
| 28 | virtual void takeCPUFreqEPPHintcxx . . $ CPUFreqProfilePart#Exporter#takeCPUFreqEPPHint(d049417f242f31d7).(stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> const &hint) = 0; |
| 29 | }; |
| 30 | |
| 31 | CPUFreqProfilePartcxx . . $ CPUFreqProfilePart#CPUFreqProfilePart(ced63f7c635d850d).() noexcept; |
| 32 | |
| 33 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> |
| 34 | factorycxx . . $ CPUFreqProfilePart#factory(af48dc8d4887b70c).(IProfilePartProvidercxx . . $ IProfilePartProvider# const &profilePartProvider) override; |
| 35 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Exportablecxx . . $ Exportable#::Exportercxx . . $ Exportable#Exporter#> initializercxx . . $ CPUFreqProfilePart#initializer(6b4e1016740e578).() override; |
| 36 | |
| 37 | stdcxx . . $ std/::stringcxx . . $ std/string# const &IDcxx . . $ CPUFreqProfilePart#ID(f4fff0029955a25f).() const final override; |
| 38 | |
| 39 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer#>> |
| 40 | provideImportercxx . . $ CPUFreqProfilePart#provideImporter(c13a3bcac0db4745).(Itemcxx . . $ Item# const &i) override; |
| 41 | |
| 42 | bool provideActivecxx . . $ CPUFreqProfilePart#provideActive(50ce9a9e25b4a850).() const override; |
| 43 | stdcxx . . $ std/::stringcxx . . $ std/string# const &provideCPUFreqScalingGovernorcxx . . $ CPUFreqProfilePart#provideCPUFreqScalingGovernor(f4fff0029955a25f).() const override; |
| 44 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> const &provideCPUFreqEPPHintcxx . . $ CPUFreqProfilePart#provideCPUFreqEPPHint(f34183478aa9387b).() const override; |
| 45 | |
| 46 | protected: |
| 47 | void importProfilePartcxx . . $ CPUFreqProfilePart#importProfilePart(d62b6a6dfe9fe695).(IProfilePartcxx . . $ IProfilePart#::Importercxx . . $ IProfilePart#Importer# &i) override; |
| 48 | void exportProfilePartcxx . . $ CPUFreqProfilePart#exportProfilePart(702e13e8794d0da4).(IProfilePartcxx . . $ IProfilePart#::Exportercxx . . $ IProfilePart#Exporter# &e) const override; |
| 49 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilePartcxx . . $ IProfilePart#> cloneProfilePartcxx . . $ CPUFreqProfilePart#cloneProfilePart(1378fcc1caef3e7b).() const override; |
| 50 | |
| 51 | private: |
| 52 | void governorcxx . . $ CPUFreqProfilePart#governor(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &governor); |
| 53 | void eppHintcxx . . $ CPUFreqProfilePart#eppHint(d049417f242f31d7).(stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> const &hint); |
| 54 | |
| 55 | class Initializercxx . . $ CPUFreqProfilePart#Initializer#; |
| 56 | |
| 57 | stdcxx . . $ std/::stringcxx . . $ std/string# const id_cxx . . $ CPUFreqProfilePart#id_.; |
| 58 | stdcxx . . $ std/::stringcxx . . $ std/string# governor_cxx . . $ CPUFreqProfilePart#governor_.; |
| 59 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> governors_cxx . . $ CPUFreqProfilePart#governors_.; |
| 60 | |
| 61 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::stringcxx . . $ std/string#> eppHint_cxx . . $ CPUFreqProfilePart#eppHint_.; |
| 62 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#>> eppHints_cxx . . $ CPUFreqProfilePart#eppHints_.; |
| 63 | |
| 64 | static bool const registered_cxx . . $ CPUFreqProfilePart#registered_.; |
| 65 | }; |