blob: 65fcfc85f2d8d1ed9f10b0132680fb1832c30259 [file] [log] [blame]
Patrick Ventured53d60a2020-04-07 09:01:34 -07001#pragma once
2
3#include "status.hpp"
4
5#include <memory>
6
7namespace ipmi_flash
8{
9
10// This type will just return success upon trigger(), and even before calling
11// trigger.
12class SkipAction : public TriggerableActionInterface
13{
14 public:
15 static std::unique_ptr<TriggerableActionInterface> CreateSkipAction();
16
17 SkipAction() = default;
18 ~SkipAction() = default;
19
20 // Disallow copy and assign.
21 SkipAction(const SkipAction&) = delete;
22 SkipAction& operator=(const SkipAction&) = delete;
23 SkipAction(SkipAction&&) = default;
24 SkipAction& operator=(SkipAction&&) = default;
25
26 bool trigger() override
27 {
28 return true;
29 }
30 void abort() override
Patrick Venture9b37b092020-05-28 20:58:57 -070031 {}
Patrick Ventured53d60a2020-04-07 09:01:34 -070032 ActionStatus status() override
33 {
34 return ActionStatus::success;
35 }
36};
37
38} // namespace ipmi_flash