1 #pragma once 2 3 #include "config.h" 4 5 #include "elog_watch.hpp" 6 7 #include <experimental/filesystem> 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 36