Add TriggerManager and Trigger objects

Implemented initial version of Trigger and TriggerManager DBus
interfaces. Now DBus user is able to add new Trigger and delete it.
There is no support for other functionality added.

Tested:
 - Built using yocto dependencies with success
 - Unit tests passed
 - Verified manually if Trigger and TriggerManager works as
   expected

Change-Id: Ie68463526ecccc3be67cc7bfaaf9a9aa7326dee6
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
diff --git a/src/trigger_factory.cpp b/src/trigger_factory.cpp
new file mode 100644
index 0000000..0a45dec
--- /dev/null
+++ b/src/trigger_factory.cpp
@@ -0,0 +1,25 @@
+#include "trigger_factory.hpp"
+
+#include "trigger.hpp"
+
+TriggerFactory::TriggerFactory(
+    std::shared_ptr<sdbusplus::asio::connection> bus,
+    std::shared_ptr<sdbusplus::asio::object_server> objServer) :
+    bus(std::move(bus)),
+    objServer(std::move(objServer))
+{}
+
+std::unique_ptr<interfaces::Trigger> TriggerFactory::make(
+    const std::string& name, bool isDiscrete, bool logToJournal,
+    bool logToRedfish, bool updateReport,
+    const std::vector<std::pair<sdbusplus::message::object_path, std::string>>&
+        sensors,
+    const std::vector<std::string>& reportNames,
+    const TriggerThresholdParams& thresholdParams,
+    interfaces::TriggerManager& reportManager) const
+{
+    return std::make_unique<Trigger>(bus->get_io_context(), objServer, name,
+                                     isDiscrete, logToJournal, logToRedfish,
+                                     updateReport, sensors, reportNames,
+                                     thresholdParams, reportManager);
+}