Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Cezary Zwolak | a4e6761 | 2021-02-18 13:16:16 +0100 | [diff] [blame] | 3 | #include "interfaces/json_storage.hpp" |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 4 | #include "interfaces/trigger.hpp" |
| 5 | #include "interfaces/trigger_manager.hpp" |
| 6 | #include "interfaces/trigger_types.hpp" |
| 7 | |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 8 | #include <boost/asio/spawn.hpp> |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 9 | #include <sdbusplus/message/types.hpp> |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 10 | |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 11 | #include <memory> |
| 12 | #include <utility> |
| 13 | |
| 14 | namespace interfaces |
| 15 | { |
| 16 | |
| 17 | class TriggerFactory |
| 18 | { |
| 19 | public: |
| 20 | virtual ~TriggerFactory() = default; |
| 21 | |
| 22 | virtual std::unique_ptr<interfaces::Trigger> make( |
Cezary Zwolak | 4416fce | 2021-03-17 03:21:06 +0100 | [diff] [blame] | 23 | const std::string& name, bool isDiscrete, bool logToJournal, |
| 24 | bool logToRedfish, bool updateReport, |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 25 | const std::vector<std::string>& reportNames, |
Cezary Zwolak | a4e6761 | 2021-02-18 13:16:16 +0100 | [diff] [blame] | 26 | interfaces::TriggerManager& triggerManager, |
Cezary Zwolak | 4416fce | 2021-03-17 03:21:06 +0100 | [diff] [blame] | 27 | interfaces::JsonStorage& triggerStorage, |
| 28 | const LabeledTriggerThresholdParams& labeledThresholdParams, |
| 29 | const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const = 0; |
| 30 | |
| 31 | virtual std::vector<LabeledSensorInfo> |
| 32 | getLabeledSensorsInfo(boost::asio::yield_context& yield, |
| 33 | const SensorsInfo& sensorsInfo) const = 0; |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace interfaces |