control: Store/use trigger enable functions on events

Create and store trigger enablement functions on the events based on the
trigger's configuration so that they can be enabled separately from when
the event is created. This will allow actions that load events to be
able to be parsed and then enabled when the action determines that the
events should be enabled. It also supports the use of SIGHUP to reload
the event configuration since the events JSON configuration must
successfully be loaded before the newly created events can be enabled in
place of the currently enabled events.

Change-Id: I31871ee1691d5e6b26fe16cde2a829c426ad6504
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/triggers/trigger.hpp b/control/json/triggers/trigger.hpp
index 4e7e213..ced50d7 100644
--- a/control/json/triggers/trigger.hpp
+++ b/control/json/triggers/trigger.hpp
@@ -15,29 +15,16 @@
  */
 #pragma once
 
-#include "action.hpp"
 #include "init.hpp"
-#include "manager.hpp"
 #include "signal.hpp"
 #include "timer.hpp"
+#include "trigger_aliases.hpp"
 
-#include <nlohmann/json.hpp>
-
-#include <functional>
 #include <map>
-#include <memory>
-#include <vector>
 
 namespace phosphor::fan::control::json::trigger
 {
 
-using json = nlohmann::json;
-
-// Trigger creation function
-using createTrigger =
-    std::function<void(const json&, const std::string&, Manager*,
-                       std::vector<std::unique_ptr<ActionBase>>&)>;
-
 // Mapping of trigger class name to its creation function
 static const std::map<std::string, createTrigger> triggers = {
     {"timer", timer::triggerTimer},