Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <string> |
| 4 | #include <vector> |
| 5 | |
Patrick Venture | 0bf8bf0 | 2018-12-12 20:43:25 -0800 | [diff] [blame^] | 6 | struct StatResponse |
| 7 | { |
| 8 | std::uint16_t blob_state; |
| 9 | std::uint32_t size; |
| 10 | std::vector<std::uint8_t> metadata; |
| 11 | }; |
| 12 | |
Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 13 | class BlobInterface |
| 14 | { |
Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 15 | public: |
| 16 | virtual ~BlobInterface() = default; |
| 17 | |
| 18 | /** |
| 19 | * Get a list of the blob_ids provided by the BMC. |
| 20 | * |
| 21 | * @return list of strings, each representing a blob_id returned. |
| 22 | */ |
| 23 | virtual std::vector<std::string> getBlobList() = 0; |
Patrick Venture | 0bf8bf0 | 2018-12-12 20:43:25 -0800 | [diff] [blame^] | 24 | |
| 25 | /** |
| 26 | * Get the stat() on the blob_id. |
| 27 | * |
| 28 | * @param[in] id - the blob_id. |
| 29 | * @return metadata structure. |
| 30 | */ |
| 31 | virtual StatResponse getStat(const std::string& id) = 0; |
Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 32 | }; |