blob: 9b0ff7d17b52fa4877dcd728fda4a96465f65ea0 [file] [log] [blame]
Patrick Venture00887592018-12-11 10:57:06 -08001#pragma once
2
3#include <string>
4#include <vector>
5
Patrick Venture0bf8bf02018-12-12 20:43:25 -08006struct StatResponse
7{
8 std::uint16_t blob_state;
9 std::uint32_t size;
10 std::vector<std::uint8_t> metadata;
11};
12
Patrick Venture00887592018-12-11 10:57:06 -080013class BlobInterface
14{
Patrick Venture00887592018-12-11 10:57:06 -080015 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 Venture0bf8bf02018-12-12 20:43:25 -080024
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 Venture00887592018-12-11 10:57:06 -080032};