1 #pragma once
2 
3 #include <sdbusplus/bus.hpp>
4 
5 namespace phosphor
6 {
7 namespace software
8 {
9 namespace 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  */
18 class Flash
19 {
20   public:
21     Flash() = default;
22     Flash(const Flash&) = delete;
23     Flash& operator=(const Flash&) = delete;
24     Flash(Flash&&) = default;
25     Flash& operator=(Flash&&) = delete;
26 
27     /* Destructor */
28     virtual ~Flash() = default;
29 
30     /**
31      * @brief Writes the image file(s) to flash
32      */
33     virtual void flashWrite() = 0;
34 
35     /**
36      * @brief Takes action when the state of the activation service file changes
37      */
38     virtual void onStateChanges(sdbusplus::message_t& msg) = 0;
39 };
40 
41 } // namespace updater
42 } // namespace software
43 } // namespace phosphor
44