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 #include <sdbusplus/message/types.hpp> 9 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( 22 boost::asio::yield_context& yield, const std::string& name, 23 bool isDiscrete, bool logToJournal, bool logToRedfish, 24 bool updateReport, 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 33