Kuiying Wang | ce75d9e | 2020-12-15 16:17:05 +0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "manager.hpp" |
| 4 | |
| 5 | #include <filesystem> |
| 6 | |
| 7 | namespace 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 | */ |
| 16 | void 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 | */ |
| 26 | bool deserialize(const fs::path& path, Manager& entry); |
| 27 | |
Tom Joseph | f1101df | 2020-11-06 08:23:34 +0530 | [diff] [blame] | 28 | } // namespace bios_config |