trigger_manager.hpp (a950e42ba579a3498face1654e58c94d9ff1cf9a) trigger_manager.hpp (b4ef22e4d365bde35a7fce7950033c9271c68ce7)
1#pragma once
2
3#include "interfaces/report_manager.hpp"
4#include "interfaces/trigger_factory.hpp"
5#include "interfaces/trigger_manager.hpp"
6#include "trigger.hpp"
7
8#include <sdbusplus/asio/object_server.hpp>

--- 11 unchanged lines hidden (view full) ---

20
21 TriggerManager(const TriggerManager&) = delete;
22 TriggerManager(TriggerManager&&) = delete;
23 TriggerManager& operator=(const TriggerManager&) = delete;
24 TriggerManager& operator=(TriggerManager&&) = delete;
25
26 void removeTrigger(const interfaces::Trigger* trigger) override;
27
1#pragma once
2
3#include "interfaces/report_manager.hpp"
4#include "interfaces/trigger_factory.hpp"
5#include "interfaces/trigger_manager.hpp"
6#include "trigger.hpp"
7
8#include <sdbusplus/asio/object_server.hpp>

--- 11 unchanged lines hidden (view full) ---

20
21 TriggerManager(const TriggerManager&) = delete;
22 TriggerManager(TriggerManager&&) = delete;
23 TriggerManager& operator=(const TriggerManager&) = delete;
24 TriggerManager& operator=(TriggerManager&&) = delete;
25
26 void removeTrigger(const interfaces::Trigger* trigger) override;
27
28 static void verifyReportIds(const std::vector<std::string>& newReportIds);
29
30 std::vector<std::string>
31 getTriggerIdsForReport(const std::string& reportId) const override;
32
28 private:
29 std::unique_ptr<interfaces::TriggerFactory> triggerFactory;
30 std::unique_ptr<interfaces::JsonStorage> triggerStorage;
31 std::unique_ptr<sdbusplus::asio::dbus_interface> managerIface;
32 std::vector<std::unique_ptr<interfaces::Trigger>> triggers;
33
34 void verifyAddTrigger(const std::string& triggerId,
33 private:
34 std::unique_ptr<interfaces::TriggerFactory> triggerFactory;
35 std::unique_ptr<interfaces::JsonStorage> triggerStorage;
36 std::unique_ptr<sdbusplus::asio::dbus_interface> managerIface;
37 std::vector<std::unique_ptr<interfaces::Trigger>> triggers;
38
39 void verifyAddTrigger(const std::string& triggerId,
35 const std::string& triggerName) const;
40 const std::string& triggerName,
41 const std::vector<std::string>& newReportIds) const;
36
37 interfaces::Trigger&
38 addTrigger(const std::string& triggerId, const std::string& triggerName,
39 const std::vector<std::string>& triggerActions,
40 const std::vector<LabeledSensorInfo>& labeledSensors,
41 const std::vector<std::string>& reportIds,
42 const LabeledTriggerThresholdParams& labeledThresholdParams);
43 void loadFromPersistent();

--- 12 unchanged lines hidden ---
42
43 interfaces::Trigger&
44 addTrigger(const std::string& triggerId, const std::string& triggerName,
45 const std::vector<std::string>& triggerActions,
46 const std::vector<LabeledSensorInfo>& labeledSensors,
47 const std::vector<std::string>& reportIds,
48 const LabeledTriggerThresholdParams& labeledThresholdParams);
49 void loadFromPersistent();

--- 12 unchanged lines hidden ---