Jayanth Othayoth | 2496482 | 2017-09-04 22:07:06 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Jayanth Othayoth | cb65ffc | 2018-10-16 08:29:32 -0500 | [diff] [blame] | 3 | #include "config.h" |
Jayanth Othayoth | 2496482 | 2017-09-04 22:07:06 -0500 | [diff] [blame] | 4 | |
| 5 | #include "elog_watch.hpp" |
Jayanth Othayoth | cb65ffc | 2018-10-16 08:29:32 -0500 | [diff] [blame] | 6 | |
| 7 | #include <experimental/filesystem> |
Jayanth Othayoth | 2496482 | 2017-09-04 22:07:06 -0500 | [diff] [blame] | 8 | |
| 9 | namespace phosphor |
| 10 | { |
| 11 | namespace dump |
| 12 | { |
| 13 | namespace elog |
| 14 | { |
| 15 | |
| 16 | namespace fs = std::experimental::filesystem; |
| 17 | |
| 18 | /** @brief Serialize and persist list of ids. |
| 19 | * @param[in] list - elog id list. |
| 20 | * @param[in] dir - pathname of file where the serialized elog id's will |
| 21 | * be placed. |
| 22 | */ |
| 23 | void serialize(const ElogList& list, |
| 24 | const fs::path& dir = fs::path(ELOG_ID_PERSIST_PATH)); |
| 25 | |
| 26 | /** @brief Deserialze a persisted list of ids into list |
| 27 | * @param[in] path - pathname of persisted error file |
| 28 | * @param[out] list - elog id list |
| 29 | * @return bool - true if the deserialization was successful, false otherwise. |
| 30 | */ |
| 31 | bool deserialize(const fs::path& path, ElogList& list); |
| 32 | |
| 33 | } // namespace elog |
| 34 | } // namespace dump |
| 35 | } // namespace phosphor |