blob: eadd850e87fa9aaa5515af9ba3de16816ce03e39 [file] [log] [blame]
Michael Tritz60bc20f2017-07-29 23:32:21 -05001#pragma once
2
Patrick Williamsb119dca2023-05-26 15:07:40 -05003#include <cstdint>
Gunnar Millsf6ed5892018-09-07 17:08:02 -05004#include <string>
5
Michael Tritz60bc20f2017-07-29 23:32:21 -05006namespace openpower
7{
8namespace software
9{
10namespace updater
11{
12
Michael Tritz60bc20f2017-07-29 23:32:21 -050013/** @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 YU1db9adf2019-03-05 16:02:31 +080017void storeToFile(const std::string& versionId, uint8_t priority);
Michael Tritz60bc20f2017-07-29 23:32:21 -050018
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 Tritz36417922017-08-04 14:00:29 -050022 * @return true if restore was successful, false if not
Michael Tritz60bc20f2017-07-29 23:32:21 -050023 */
Lei YU1db9adf2019-03-05 16:02:31 +080024bool restoreFromFile(const std::string& versionId, uint8_t& priority);
Michael Tritz60bc20f2017-07-29 23:32:21 -050025
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 YU1db9adf2019-03-05 16:02:31 +080029void removeFile(const std::string& versionId);
Michael Tritz60bc20f2017-07-29 23:32:21 -050030
31} // namespace updater
32} // namespace software
33} // namespace openpower