Michael Tritz | 60bc20f | 2017-07-29 23:32:21 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Gunnar Mills | f6ed589 | 2018-09-07 17:08:02 -0500 | [diff] [blame] | 3 | #include <string> |
| 4 | |
Michael Tritz | 60bc20f | 2017-07-29 23:32:21 -0500 | [diff] [blame] | 5 | namespace openpower |
| 6 | { |
| 7 | namespace software |
| 8 | { |
| 9 | namespace updater |
| 10 | { |
| 11 | |
Michael Tritz | 60bc20f | 2017-07-29 23:32:21 -0500 | [diff] [blame] | 12 | /** @brief Serialization function - stores activation information to file |
| 13 | * @param[in] versionId - The version for which to store information. |
| 14 | * @param[in] priority - RedundancyPriority value for that version. |
| 15 | */ |
| 16 | void storeToFile(std::string versionId, uint8_t priority); |
| 17 | |
| 18 | /** @brief Serialization function - restores activation information from file |
| 19 | * @param[in] versionId - The version for which to retrieve information. |
| 20 | * @param[in] priority - RedundancyPriority pointer for that version. |
Michael Tritz | 3641792 | 2017-08-04 14:00:29 -0500 | [diff] [blame] | 21 | * @return true if restore was successful, false if not |
Michael Tritz | 60bc20f | 2017-07-29 23:32:21 -0500 | [diff] [blame] | 22 | */ |
Michael Tritz | 3641792 | 2017-08-04 14:00:29 -0500 | [diff] [blame] | 23 | bool restoreFromFile(std::string versionId, uint8_t& priority); |
Michael Tritz | 60bc20f | 2017-07-29 23:32:21 -0500 | [diff] [blame] | 24 | |
| 25 | /** @brief Removes the serial file for a given version. |
| 26 | * @param[in] versionId - The version for which to remove a file, if it exists. |
| 27 | */ |
| 28 | void removeFile(std::string versionId); |
| 29 | |
| 30 | } // namespace updater |
| 31 | } // namespace software |
| 32 | } // namespace openpower |