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