blob: c276017af3a459f65606f30b6bec439c963fd46b [file] [log] [blame]
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -05001#pragma once
2
3#include <sdbusplus/bus.hpp>
4
5namespace phosphor
6{
7namespace software
8{
9namespace updater
10{
11
12/**
13 * @class Flash
14 * @brief Contains flash management functions.
15 * @details The software class that contains functions to interact
16 * with the flash.
17 */
18class Flash
19{
20 public:
Adriana Kobylak292159f2020-05-05 09:25:55 -050021 /* Destructor */
22 virtual ~Flash() = default;
23
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -050024 /**
25 * @brief Writes the image file(s) to flash
26 */
27 virtual void flashWrite() = 0;
Adriana Kobylak3ce563a2018-06-06 16:41:15 -050028
29 /**
30 * @brief Takes action when the state of the activation service file changes
31 */
32 virtual void onStateChanges(sdbusplus::message::message& msg) = 0;
Adriana Kobylak9f89e2e2018-05-30 13:16:20 -050033};
34
35} // namespace updater
36} // namespace software
37} // namespace phosphor