| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "core/isyscomponent.h" |
| 7 | #include <string_view> |
| 8 | |
| 9 | class ICPUInfo; |
| 10 | class ISensor; |
| 11 | |
| 12 | class ICPU : public ISysComponent |
| 13 | { |
| 14 | public: |
| 15 | static constexpr std::string_view ItemID{"CPU"}; |
| 16 | |
| 17 | class Exporter : public ISysComponent::Exporter |
| 18 | { |
| 19 | public: |
| 20 | virtual void takeInfo(ICPUInfo const &info) = 0; |
| 21 | virtual void takeSensor(ISensor const &sensor) = 0; |
| 22 | }; |
| 23 | |
| 24 | virtual ICPUInfo const &info() const = 0; |
| 25 | |
| 26 | virtual ~ICPU() = default; |
| 27 | }; |