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