presence: Extract fan object data

Extract the fan name and path for each entry within the JSON
configuration and store within a list of fan objects to be used when
constructing the fan presence policies.

Tested:
    Fan objects created with a "name" and "path"
    Missing "name" or "path" throws exception

Change-Id: I16c17b87576d68addaf69e72311681b46f83b49e
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/presence/json_config.hpp b/presence/json_config.hpp
index dcb1aa3..2e7ad72 100644
--- a/presence/json_config.hpp
+++ b/presence/json_config.hpp
@@ -3,9 +3,11 @@
 #include <string>
 #include <vector>
 #include <memory>
+#include <nlohmann/json.hpp>
 
 #include "config.h"
 #include "rpolicy.hpp"
+#include "fan.hpp"
 
 namespace phosphor
 {
@@ -14,6 +16,7 @@
 namespace presence
 {
 
+using json = nlohmann::json;
 using policies = std::vector<std::unique_ptr<RedundancyPolicy>>;
 
 class JsonConfig
@@ -46,6 +49,17 @@
 
         /* Fan presence policies */
         static policies _policies;
+
+        /* List of Fan objects to have presence policies */
+        std::vector<Fan> _fans;
+
+        /**
+         * @brief Process the json config to extract the defined fan presence
+         * policies.
+         *
+         * @param[in] jsonConf - parsed json configuration data
+         */
+        void process(const json& jsonConf);
 };
 
 } // namespace presence