blob: b84ce73a2f37ab1a5d7f4933e0ecc97088489f9a [file] [log] [blame]
#pragma once
#include "interfaces/json_storage.hpp"
#include "interfaces/trigger.hpp"
#include "interfaces/trigger_manager.hpp"
#include "interfaces/trigger_types.hpp"
#include <boost/asio/spawn.hpp>
#include <sdbusplus/message/types.hpp>
#include <memory>
#include <utility>
namespace interfaces
{
class TriggerFactory
{
public:
virtual ~TriggerFactory() = default;
virtual std::unique_ptr<interfaces::Trigger> make(
const std::string& name, bool isDiscrete, bool logToJournal,
bool logToRedfish, bool updateReport,
const std::vector<std::string>& reportNames,
interfaces::TriggerManager& triggerManager,
interfaces::JsonStorage& triggerStorage,
const LabeledTriggerThresholdParams& labeledThresholdParams,
const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const = 0;
virtual std::vector<LabeledSensorInfo>
getLabeledSensorsInfo(boost::asio::yield_context& yield,
const SensorsInfo& sensorsInfo) const = 0;
};
} // namespace interfaces