Saqib Khan | 5d53267 | 2017-08-09 10:44:50 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <experimental/filesystem> |
| 4 | #include "config.h" |
| 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace software |
| 9 | { |
| 10 | namespace updater |
| 11 | { |
| 12 | |
| 13 | namespace fs = std::experimental::filesystem; |
| 14 | |
| 15 | /** @brief Serialization function - stores activation information to file |
| 16 | * @param[in] versionId - The version for which to store information. |
| 17 | * @param[in] priority - RedundancyPriority value for that version. |
| 18 | **/ |
| 19 | void storeToFile(std::string versionId, uint8_t priority); |
| 20 | |
| 21 | /** @brief Serialization function - restores activation information from file |
| 22 | * @param[in] versionId - The version for which to retrieve information. |
| 23 | * @param[in] priority - RedundancyPriority reference for that version. |
Saqib Khan | 1eef62d | 2017-08-10 15:29:34 -0500 | [diff] [blame] | 24 | * @return true if restore was successful, false if not |
Saqib Khan | 5d53267 | 2017-08-09 10:44:50 -0500 | [diff] [blame] | 25 | **/ |
Saqib Khan | 1eef62d | 2017-08-10 15:29:34 -0500 | [diff] [blame] | 26 | bool restoreFromFile(std::string versionId, uint8_t& priority); |
Saqib Khan | 5d53267 | 2017-08-09 10:44:50 -0500 | [diff] [blame] | 27 | |
| 28 | /** @brief Removes the serial file for a given version. |
| 29 | * @param[in] versionId - The version for which to remove a file, if it exists. |
| 30 | **/ |
| 31 | void removeFile(std::string versionId); |
| 32 | |
| 33 | } // namespace phosphor |
| 34 | } // namespace software |
| 35 | } // namespace openpower |