PEL: Look for callouts in an FFDC JSON file

The PEL constructor takes a list of files that should be added as
UserData sections for FFDC.  If one of those files has its format set to
JSON, and its subtype set to 0xCA, this will mean it contains a JSON
array of callouts to add to the PEL.

This commit will look for that type and subtype, and then pass the
callout JSON through to the SRC class.  A future commit will add the
callouts from the JSON to the PEL.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iec0ca0ad0ae11cc957b8fda880d97116f342d72d
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index 0e8ee1a..2cfa8f3 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -345,6 +345,18 @@
                             uint8_t creatorID = 0) const;
 
     /**
+     * @brief Returns any callout JSON found in the FFDC files.
+     *
+     * Looks for an FFDC file that is JSON format and has the
+     * sub-type value set to 0xCA and returns its data as a JSON object.
+     *
+     * @param[in] ffdcFiles - FFCD files that go into UserData sections
+     *
+     * @return json - The callout JSON, or an empty object if not found
+     */
+    nlohmann::json getCalloutJSON(const PelFFDC& ffdcFiles);
+
+    /**
      * @brief The PEL Private Header section
      */
     std::unique_ptr<PrivateHeader> _ph;
@@ -401,6 +413,15 @@
                                const DataInterfaceBase& dataIface);
 
 /**
+ * @brief Reads data from an opened file descriptor.
+ *
+ * @param[in] fd - The FD to read from
+ *
+ * @return std::vector<uint8_t> - The data read
+ */
+std::vector<uint8_t> readFD(int fd);
+
+/**
  * @brief Create a UserData section that contains the data in the file
  *        pointed to by the file descriptor passed in.
  *