Add support for child D-Bus objects

Add the ability for the Manager class to store D-Bus objects
that are children of the main interface objects, where being
a child just means the object path extends the parent path.

There can be multiple of these objects per logging entry, and
they have the same lifespan as the parent objects.

This is in preparation for creating callout objects for an
error log, where a log can have multiple callouts.

Tested:  When child objects are created and stored, they show
         up on D-Bus until deleted.

Change-Id: I00c612db183b74654f529a7a694bb62856766413
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/manager.hpp b/manager.hpp
index b3891ac..0412130 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -47,6 +47,10 @@
     using InterfaceMap = std::map<InterfaceType, std::experimental::any>;
     using EntryMap = std::map<EntryID, InterfaceMap>;
 
+    using ObjectList = std::vector<std::experimental::any>;
+    using InterfaceMapMulti = std::map<InterfaceType, ObjectList>;
+    using EntryMapMulti = std::map<EntryID, InterfaceMapMulti>;
+
     /**
      * Deletes the entry and any child entries with
      * the specified ID.
@@ -128,6 +132,21 @@
                       std::experimental::any& object);
 
     /**
+     * Adds an interface to a child object, which is an object that
+     * relates to the main ...logging/entry/X object but has a different path.
+     * The object is stored in the childEntries map.
+     *
+     * There can be multiple instances of a child object per type per
+     * logging object.
+     *
+     * @param[in] objectPath - the object path of the log
+     * @param[in] type - the interface type being added.
+     * @param[in] object - the interface object
+     */
+    void addChildInterface(const std::string& objectPath, InterfaceType type,
+                           std::experimental::any& object);
+
+    /**
      * The sdbusplus bus object
      */
     sdbusplus::bus::bus& bus;
@@ -148,6 +167,17 @@
      */
     EntryMap entries;
 
+    /**
+     * A map of the error log IDs to their interface objects which
+     * are children of the logging objects.
+     *
+     * These objects have the same lifespan as their parent objects.
+     *
+     * There may be multiple interfaces per ID, and also multiple
+     * interface instances per interface type.
+     */
+    EntryMapMulti childEntries;
+
 #ifdef USE_POLICY_INTERFACE
     /**
      * The class the wraps the IBM error logging policy table.