blob: e8860f32c9f1544367fedeba7daaabfc6bdaba49 [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 */
16void 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 Tritz36417922017-08-04 14:00:29 -050021 * @return true if restore was successful, false if not
Michael Tritz60bc20f2017-07-29 23:32:21 -050022 */
Michael Tritz36417922017-08-04 14:00:29 -050023bool restoreFromFile(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 */
28void removeFile(std::string versionId);
29
30} // namespace updater
31} // namespace software
32} // namespace openpower