blob: 2de5ae8d4759432c62bfcde8d30aa6fe6c99799d [file] [log] [blame]
Wludzik, Jozef76833cb2020-12-21 14:42:41 +01001#pragma once
2
3#include "interfaces/trigger.hpp"
4#include "interfaces/trigger_manager.hpp"
5#include "interfaces/trigger_types.hpp"
6
Wludzik, Jozef1477fe62021-01-02 11:56:10 +01007#include <boost/asio/spawn.hpp>
8
Wludzik, Jozef76833cb2020-12-21 14:42:41 +01009#include <memory>
10#include <utility>
11
12namespace interfaces
13{
14
15class TriggerFactory
16{
17 public:
18 virtual ~TriggerFactory() = default;
19
20 virtual std::unique_ptr<interfaces::Trigger> make(
Wludzik, Jozef1477fe62021-01-02 11:56:10 +010021 boost::asio::yield_context& yield, const std::string& name,
22 bool isDiscrete, bool logToJournal, bool logToRedfish,
23 bool updateReport,
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010024 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