blob: 815874f8a3806ebf1c39fc5b61b1bfddd1a7a40f [file] [log] [blame]
Patrick Venture00887592018-12-11 10:57:06 -08001#pragma once
2
Patrick Venture7871b452018-12-13 08:53:14 -08003#include <cstdint>
Patrick Venture00887592018-12-11 10:57:06 -08004#include <string>
5#include <vector>
6
Patrick Venture0bf8bf02018-12-12 20:43:25 -08007struct StatResponse
8{
9 std::uint16_t blob_state;
10 std::uint32_t size;
11 std::vector<std::uint8_t> metadata;
12};
13
Patrick Venture00887592018-12-11 10:57:06 -080014class BlobInterface
15{
Patrick Venture00887592018-12-11 10:57:06 -080016 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 Venture0bf8bf02018-12-12 20:43:25 -080025
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 Venture00887592018-12-11 10:57:06 -080033};