1 #pragma once 2 3 #include "interfaces/json_storage.hpp" 4 #include "interfaces/trigger.hpp" 5 #include "interfaces/trigger_manager.hpp" 6 #include "interfaces/trigger_types.hpp" 7 8 #include <boost/asio/spawn.hpp> 9 #include <sdbusplus/message/types.hpp> 10 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( 23 boost::asio::yield_context& yield, const std::string& name, 24 bool isDiscrete, bool logToJournal, bool logToRedfish, 25 bool updateReport, 26 const std::vector< 27 std::pair<sdbusplus::message::object_path, std::string>>& sensors, 28 const std::vector<std::string>& reportNames, 29 const TriggerThresholdParams& thresholdParams, 30 interfaces::TriggerManager& triggerManager, 31 interfaces::JsonStorage& triggerStorage) const = 0; 32 }; 33 34 } // namespace interfaces 35