blob: e5fefadbde17ce2802268fe86467dac9ee454f20 [file] [log] [blame]
Michael Tritz60bc20f2017-07-29 23:32:21 -05001#pragma once
2
Gunnar Millsf6ed5892018-09-07 17:08:02 -05003#include <string>
4
Michael Tritz60bc20f2017-07-29 23:32:21 -05005namespace openpower
6{
7namespace software
8{
9namespace updater
10{
11
Michael Tritz60bc20f2017-07-29 23:32:21 -050012/** @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 */
Lei YU1db9adf2019-03-05 16:02:31 +080016void storeToFile(const std::string& versionId, uint8_t priority);
Michael Tritz60bc20f2017-07-29 23:32:21 -050017
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 Tritz36417922017-08-04 14:00:29 -050021 * @return true if restore was successful, false if not
Michael Tritz60bc20f2017-07-29 23:32:21 -050022 */
Lei YU1db9adf2019-03-05 16:02:31 +080023bool restoreFromFile(const std::string& versionId, uint8_t& priority);
Michael Tritz60bc20f2017-07-29 23:32:21 -050024
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 */
Lei YU1db9adf2019-03-05 16:02:31 +080028void removeFile(const std::string& versionId);
Michael Tritz60bc20f2017-07-29 23:32:21 -050029
30} // namespace updater
31} // namespace software
32} // namespace openpower