blob: 7d448d06e16acbdc0c484f1daed458937ff492a9 [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>
Wludzik, Jozefd960e1f2021-01-08 09:25:59 +01008#include <sdbusplus/message/types.hpp>
Wludzik, Jozef1477fe62021-01-02 11:56:10 +01009
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010010#include <memory>
11#include <utility>
12
13namespace interfaces
14{
15
16class TriggerFactory
17{
18 public:
19 virtual ~TriggerFactory() = default;
20
21 virtual std::unique_ptr<interfaces::Trigger> make(
Wludzik, Jozef1477fe62021-01-02 11:56:10 +010022 boost::asio::yield_context& yield, const std::string& name,
23 bool isDiscrete, bool logToJournal, bool logToRedfish,
24 bool updateReport,
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010025 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