1 #pragma once 2 3 #include "interfaces/trigger.hpp" 4 #include "interfaces/trigger_manager.hpp" 5 #include "interfaces/trigger_types.hpp" 6 7 #include <boost/asio/spawn.hpp> 8 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( 21 boost::asio::yield_context& yield, const std::string& name, 22 bool isDiscrete, bool logToJournal, bool logToRedfish, 23 bool updateReport, 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 32