Create the Callout objects

If a new error log has the association interface, and the
inventory item it points to implements the Asset interface,
create a Callout object for it and persist it.

It will be persisted to a file like:
/var/lib/ibm-logging/errors/N/callouts/M where N is an error
log entry ID and M is the callout instance number.

Tested: Verify new D-Bus objects for callouts.

Change-Id: I90e9cf76edd7c2517de22cee64c3b979c482efa8
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/manager.hpp b/manager.hpp
index 0c8a095..b84a4c7 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -124,6 +124,47 @@
                       const DbusInterfaceMap& interfaces);
 
     /**
+     * Returns the error log timestamp property value from
+     * the passed in map of all interfaces and property names/values
+     * on an error log D-Bus object.
+     *
+     * @param[in] interfaces - map of all interfaces and properties
+     *                         on a phosphor-logging error log.
+     *
+     * @return uint64_t - the timestamp
+     */
+    uint64_t getLogTimestamp(const DbusInterfaceMap& interfaces);
+
+    /**
+     * Returns the filesystem directory to use for persisting
+     * information about a particular error log.
+     *
+     * @param[in] id - the error log ID
+     * @return path - the directory path
+     */
+    std::experimental::filesystem::path getSaveDir(EntryID id);
+
+    /**
+     * Returns the directory to use to save the callout information in
+     *
+     * @param[in] id - the error log ID
+     *
+     * @return path - the directory path
+     */
+    std::experimental::filesystem::path getCalloutSaveDir(EntryID id);
+
+    /**
+     * Returns the D-Bus object path to use for a callout D-Bus object.
+     *
+     * @param[in] objectPath - the object path for the error log
+     * @param[in] calloutNum - the callout instance number
+     *
+     * @return path - the object path to use for a callout object
+     */
+    std::string getCalloutObjectPath(const std::string& objectPath,
+                                     uint32_t calloutNum);
+
+    /**
      * Creates the IBM policy interface for a single error log
      * and saves it in the list of interfaces.
      *
@@ -137,6 +178,25 @@
 #endif
 
     /**
+     * Creates D-Bus objects for any callouts in an error log
+     * that map to an inventory object with an Asset interface.
+     *
+     * The created object will also host the Asset interface.
+     *
+     * A callout object path would look like:
+     * /xyz/openbmc_project/logging/entry/5/callouts/0.
+     *
+     * Any objects created are serialized so the asset information
+     * can always be restored.
+     *
+     * @param[in] objectPath - object path of the error log
+     * @param[in] interfaces - map of all interfaces and properties
+     *                         on a phosphor-logging error log.
+     */
+    void createCalloutObjects(const std::string& objectPath,
+                              const DbusInterfaceMap& interfaces);
+
+    /**
      * Returns the entry ID for a log
      *
      * @param[in] objectPath - the object path of the log