| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "../igpuinfo.h" |
| 7 | #include "core/idatasource.h" |
| 8 | #include <filesystem> |
| 9 | #include <memory> |
| 10 | #include <string> |
| 11 | |
| 12 | class GPUInfoRevision final : public IGPUInfo::IProvider |
| 13 | { |
| 14 | public: |
| 15 | GPUInfoRevision( |
| 16 | std::unique_ptr<IDataSource<std::string, std::filesystem::path const>> |
| 17 | &&dataSource) noexcept; |
| 18 | |
| 19 | std::vector<std::pair<std::string, std::string>> |
| 20 | provideInfo(Vendor vendor, int gpuIndex, IGPUInfo::Path const &path, |
| 21 | IHWIDTranslator const &hwIDTranslator) const override; |
| 22 | |
| 23 | std::vector<std::string> |
| 24 | provideCapabilities(Vendor vendor, int, |
| 25 | IGPUInfo::Path const &path) const override; |
| 26 | |
| 27 | private: |
| 28 | std::unique_ptr<IDataSource<std::string, std::filesystem::path const>> const |
| 29 | dataSource_; |
| 30 | static bool registered_; |
| 31 | }; |