1 #pragma once 2 3 #include "interfaces/trigger_factory.hpp" 4 5 #include <sdbusplus/asio/object_server.hpp> 6 7 class TriggerFactory : public interfaces::TriggerFactory 8 { 9 public: 10 TriggerFactory(std::shared_ptr<sdbusplus::asio::connection> bus, 11 std::shared_ptr<sdbusplus::asio::object_server> objServer); 12 13 std::unique_ptr<interfaces::Trigger> make( 14 const std::string& name, bool isDiscrete, bool logToJournal, 15 bool logToRedfish, bool updateReport, 16 const std::vector< 17 std::pair<sdbusplus::message::object_path, std::string>>& sensors, 18 const std::vector<std::string>& reportNames, 19 const TriggerThresholdParams& thresholdParams, 20 interfaces::TriggerManager& triggerManager) const override; 21 22 private: 23 std::shared_ptr<sdbusplus::asio::connection> bus; 24 std::shared_ptr<sdbusplus::asio::object_server> objServer; 25 }; 26