Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "interfaces/trigger.hpp" |
| 4 | #include "interfaces/trigger_manager.hpp" |
| 5 | #include "interfaces/trigger_types.hpp" |
| 6 | |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame^] | 7 | #include <boost/asio/spawn.hpp> |
| 8 | |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 9 | #include <memory> |
| 10 | #include <utility> |
| 11 | |
| 12 | namespace interfaces |
| 13 | { |
| 14 | |
| 15 | class TriggerFactory |
| 16 | { |
| 17 | public: |
| 18 | virtual ~TriggerFactory() = default; |
| 19 | |
| 20 | virtual std::unique_ptr<interfaces::Trigger> make( |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame^] | 21 | boost::asio::yield_context& yield, const std::string& name, |
| 22 | bool isDiscrete, bool logToJournal, bool logToRedfish, |
| 23 | bool updateReport, |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 24 | const std::vector< |
| 25 | std::pair<sdbusplus::message::object_path, std::string>>& sensors, |
| 26 | const std::vector<std::string>& reportNames, |
| 27 | const TriggerThresholdParams& thresholdParams, |
| 28 | interfaces::TriggerManager& triggerManager) const = 0; |
| 29 | }; |
| 30 | |
| 31 | } // namespace interfaces |