-
Notifications
You must be signed in to change notification settings - Fork 24
/
flash.hpp
43 lines (36 loc) · 864 Bytes
/
flash.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include <sdbusplus/bus.hpp>
namespace phosphor
{
namespace software
{
namespace updater
{
/**
* @class Flash
* @brief Contains flash management functions.
* @details The software class that contains functions to interact
* with the flash.
*/
class Flash
{
public:
Flash() = default;
Flash(const Flash&) = delete;
Flash& operator=(const Flash&) = delete;
Flash(Flash&&) = default;
Flash& operator=(Flash&&) = delete;
/* Destructor */
virtual ~Flash() = default;
/**
* @brief Writes the image file(s) to flash
*/
virtual void flashWrite() = 0;
/**
* @brief Takes action when the state of the activation service file changes
*/
virtual void onStateChanges(sdbusplus::message_t& msg) = 0;
};
} // namespace updater
} // namespace software
} // namespace phosphor