manager.hpp (acebece38c2c169177bb70e24141e099d873af30) manager.hpp (8bc117792fbf118dd74d015546c22612961ccc26)
1#pragma once
2
3#include <blobs-ipmid/blobs.hpp>
4#include <ctime>
5#include <ipmid/oemrouter.hpp>
6#include <memory>
7#include <string>
8#include <unordered_map>

--- 38 unchanged lines hidden (view full) ---

47
48 virtual uint32_t buildBlobList() = 0;
49
50 virtual std::string getBlobId(uint32_t index) = 0;
51
52 virtual bool open(uint16_t flags, const std::string& path,
53 uint16_t* session) = 0;
54
1#pragma once
2
3#include <blobs-ipmid/blobs.hpp>
4#include <ctime>
5#include <ipmid/oemrouter.hpp>
6#include <memory>
7#include <string>
8#include <unordered_map>

--- 38 unchanged lines hidden (view full) ---

47
48 virtual uint32_t buildBlobList() = 0;
49
50 virtual std::string getBlobId(uint32_t index) = 0;
51
52 virtual bool open(uint16_t flags, const std::string& path,
53 uint16_t* session) = 0;
54
55 virtual bool stat(const std::string& path, struct BlobMeta* meta) = 0;
55 virtual bool stat(const std::string& path, BlobMeta* meta) = 0;
56
56
57 virtual bool stat(uint16_t session, struct BlobMeta* meta) = 0;
57 virtual bool stat(uint16_t session, BlobMeta* meta) = 0;
58
59 virtual bool commit(uint16_t session, const std::vector<uint8_t>& data) = 0;
60
61 virtual bool close(uint16_t session) = 0;
62
63 virtual std::vector<uint8_t> read(uint16_t session, uint32_t offset,
64 uint32_t requestedSize) = 0;
65

--- 64 unchanged lines hidden (view full) ---

130
131 /**
132 * Attempts to retrieve a BlobMeta for the specified path.
133 *
134 * @param[in] path - the file path for stat().
135 * @param[in,out] meta - a pointer to store the metadata.
136 * @return bool - true if able to retrieve the information.
137 */
58
59 virtual bool commit(uint16_t session, const std::vector<uint8_t>& data) = 0;
60
61 virtual bool close(uint16_t session) = 0;
62
63 virtual std::vector<uint8_t> read(uint16_t session, uint32_t offset,
64 uint32_t requestedSize) = 0;
65

--- 64 unchanged lines hidden (view full) ---

130
131 /**
132 * Attempts to retrieve a BlobMeta for the specified path.
133 *
134 * @param[in] path - the file path for stat().
135 * @param[in,out] meta - a pointer to store the metadata.
136 * @return bool - true if able to retrieve the information.
137 */
138 bool stat(const std::string& path, struct BlobMeta* meta) override;
138 bool stat(const std::string& path, BlobMeta* meta) override;
139
140 /**
141 * Attempts to retrieve a BlobMeta for a given session.
142 *
143 * @param[in] session - the session for this command.
144 * @param[in,out] meta - a pointer to store the metadata.
145 * @return bool - true if able to retrieve the information.
146 */
139
140 /**
141 * Attempts to retrieve a BlobMeta for a given session.
142 *
143 * @param[in] session - the session for this command.
144 * @param[in,out] meta - a pointer to store the metadata.
145 * @return bool - true if able to retrieve the information.
146 */
147 bool stat(uint16_t session, struct BlobMeta* meta) override;
147 bool stat(uint16_t session, BlobMeta* meta) override;
148
149 /**
150 * Attempt to commit a blob for a given session.
151 *
152 * @param[in] session - the session for this command.
153 * @param[in] data - an optional commit blob.
154 * @return bool - true if the commit succeeds.
155 */

--- 131 unchanged lines hidden ---
148
149 /**
150 * Attempt to commit a blob for a given session.
151 *
152 * @param[in] session - the session for this command.
153 * @param[in] data - an optional commit blob.
154 * @return bool - true if the commit succeeds.
155 */

--- 131 unchanged lines hidden ---