blob: 452c3fa4bccb06acf4f442be80ef05163ceb92d0 [file] [log] [blame]
Kuiying Wangce75d9e2020-12-15 16:17:05 +08001#pragma once
2
3#include "manager.hpp"
4
5#include <filesystem>
6
7namespace bios_config
8{
9
10/** @brief Serialize and persist the bios manager object
11 *
12 * @param[in] obj - bios manager object
13 * @param[in] path - path to the file where the bios manager object
14 * is to be serialized
15 */
16void serialize(const Manager& obj, const fs::path& path);
17
18/** @brief Deserialize the persisted data and populate the bios manager object
19 *
20 * @param[in] path - path to the persisted file
21 * @param[in/out] entry - reference to the bios manager object which is the
22 * target of deserialization.
23 *
24 * @return bool - true if the deserialization was successful, false otherwise.
25 */
26bool deserialize(const fs::path& path, Manager& entry);
27
Patrick Williamsf19e2712023-05-10 07:51:20 -050028} // namespace bios_config