blob: 5198847fd50b9700440e1555cebe6e590b140b48 [file] [log] [blame]
Michael Tritz60bc20f2017-07-29 23:32:21 -05001#pragma once
2
Michael Tritz60bc20f2017-07-29 23:32:21 -05003namespace openpower
4{
5namespace software
6{
7namespace updater
8{
9
Michael Tritz60bc20f2017-07-29 23:32:21 -050010/** @brief Serialization function - stores activation information to file
11 * @param[in] versionId - The version for which to store information.
12 * @param[in] priority - RedundancyPriority value for that version.
13 */
14void storeToFile(std::string versionId, uint8_t priority);
15
16/** @brief Serialization function - restores activation information from file
17 * @param[in] versionId - The version for which to retrieve information.
18 * @param[in] priority - RedundancyPriority pointer for that version.
Michael Tritz36417922017-08-04 14:00:29 -050019 * @return true if restore was successful, false if not
Michael Tritz60bc20f2017-07-29 23:32:21 -050020 */
Michael Tritz36417922017-08-04 14:00:29 -050021bool restoreFromFile(std::string versionId, uint8_t& priority);
Michael Tritz60bc20f2017-07-29 23:32:21 -050022
23/** @brief Removes the serial file for a given version.
24 * @param[in] versionId - The version for which to remove a file, if it exists.
25 */
26void removeFile(std::string versionId);
27
28} // namespace updater
29} // namespace software
30} // namespace openpower