| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2022 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 | #include <string_view> |
| 12 | |
| 13 | namespace AMD { |
| 14 | |
| 15 | class GPUInfoUniqueID final : public IGPUInfo::IProvider |
| 16 | { |
| 17 | public: |
| 18 | GPUInfoUniqueID( |
| 19 | std::unique_ptr<IDataSource<std::string, std::filesystem::path const>> |
| 20 | &&dataSource) noexcept; |
| 21 | |
| 22 | std::vector<std::pair<std::string, std::string>> |
| 23 | provideInfo(Vendor vendor, int gpuIndex, IGPUInfo::Path const &path, |
| 24 | IHWIDTranslator const &hwIDTranslator) const override; |
| 25 | |
| 26 | std::vector<std::string> |
| 27 | provideCapabilities(Vendor vendor, int, |
| 28 | IGPUInfo::Path const &path) const override; |
| 29 | |
| 30 | private: |
| 31 | std::unique_ptr<IDataSource<std::string, std::filesystem::path const>> const |
| 32 | dataSource_; |
| 33 | static bool registered_; |
| 34 | }; |
| 35 | |
| 36 | } // namespace AMD |