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