blob: 6682617e3b0d924c1543192a4d2be902c4e7adb3 [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
Tom Josephf1101df2020-11-06 08:23:34 +053028} // namespace bios_config