blob: 7b6461fa4d1e2501f69d318e9fd3c1adb5cc689c [file] [log] [blame]
Saqib Khan5d532672017-08-09 10:44:50 -05001#pragma once
2
3#include <experimental/filesystem>
4#include "config.h"
5
6namespace phosphor
7{
8namespace software
9{
10namespace updater
11{
12
13namespace fs = std::experimental::filesystem;
14
15/** @brief Serialization function - stores activation information to file
16 * @param[in] versionId - The version for which to store information.
17 * @param[in] priority - RedundancyPriority value for that version.
18 **/
19void storeToFile(std::string versionId, uint8_t priority);
20
21/** @brief Serialization function - restores activation information from file
22 * @param[in] versionId - The version for which to retrieve information.
23 * @param[in] priority - RedundancyPriority reference for that version.
24 **/
25void restoreFromFile(std::string versionId, uint8_t& priority);
26
27/** @brief Removes the serial file for a given version.
28 * @param[in] versionId - The version for which to remove a file, if it exists.
29 **/
30void removeFile(std::string versionId);
31
32} // namespace phosphor
33} // namespace software
34} // namespace openpower