Move emit_object_added to respective dump entry classes

The emit_object_added was added in the base entry class so
all information was not present in the InterfaceAdded.
In the below example the VSP String and password are null
To fix this moved emit_object_added to derived classes
so InterfaceAdded signal will come only after the creation
of complete object.
Without fix:
Sender=:1.41  Path=/xyz/openbmc_project/dump  Interface=org.freedesktop.DBus.ObjectManager  Member=InterfacesAdded
  UniqueName=:1.41
  MESSAGE "oa{sa{sv}}" {
          OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1";
          ARRAY "{sa{sv}}" {
                  DICT_ENTRY "sa{sv}" {
                          STRING "org.freedesktop.DBus.Peer";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "org.freedesktop.DBus.Introspectable";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "org.freedesktop.DBus.Properties";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Time.EpochTime";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "Elapsed";
                                          VARIANT "t" {
                                                  UINT64 0;
                                          };
                                  };
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Object.Delete";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Dump.Entry";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "Size";
                                          VARIANT "t" {
                                                  UINT64 0;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "Offloaded";
                                          VARIANT "b" {
                                                  BOOLEAN false;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "OffloadUri";
                                          VARIANT "s" {
                                                  STRING "";
                                          };
                                  };
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Common.Progress";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "Status";
                                          VARIANT "s" {
                                                  STRING "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress";
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "StartTime";
                                          VARIANT "t" {
                                                  UINT64 1612968832;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "CompletedTime";
                                          VARIANT "t" {
                                                  UINT64 0;
                                          };
                                  };
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "com.ibm.Dump.Entry.Resource";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "SourceDumpId";
                                          VARIANT "u" {
                                                  UINT32 0;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "VSPString";
                                          VARIANT "s" {
                                                  STRING "";
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "Password";
                                          VARIANT "s" {
                                                  STRING "";
                                          };
                                  };
                          };
                  };
          };
  };
With Fix:
 Type=signal  Endian=l  Flags=1  Version=1 Cookie=68
  Sender=:1.286  Path=/xyz/openbmc_project/dump  Interface=org.freedesktop.DBus.ObjectManager  Member=InterfacesAdded
  UniqueName=:1.286
  MESSAGE "oa{sa{sv}}" {
          OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/4";
          ARRAY "{sa{sv}}" {
                  DICT_ENTRY "sa{sv}" {
                          STRING "org.freedesktop.DBus.Peer";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "org.freedesktop.DBus.Introspectable";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "org.freedesktop.DBus.Properties";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Time.EpochTime";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "Elapsed";
                                          VARIANT "t" {
                                                  UINT64 0;
                                          };
                                  };
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Object.Delete";
                          ARRAY "{sv}" {
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Dump.Entry";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "Size";
                                          VARIANT "t" {
                                                  UINT64 0;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "Offloaded";
                                          VARIANT "b" {
                                                  BOOLEAN false;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "OffloadUri";
                                          VARIANT "s" {
                                                  STRING "";
                                          };
                                  };
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "xyz.openbmc_project.Common.Progress";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "Status";
                                          VARIANT "s" {
                                                  STRING "xyz.openbmc_project.Common.Progress.OperationStatus.InProgress";
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "StartTime";
                                          VARIANT "t" {
                                                  UINT64 1612972013;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "CompletedTime";
                                          VARIANT "t" {
                                                  UINT64 0;
                                          };
                                  };
                          };
                  };
                  DICT_ENTRY "sa{sv}" {
                          STRING "com.ibm.Dump.Entry.Resource";
                          ARRAY "{sv}" {
                                  DICT_ENTRY "sv" {
                                          STRING "SourceDumpId";
                                          VARIANT "u" {
                                                  UINT32 4294967295;
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "VSPString";
                                          VARIANT "s" {
                                                  STRING "vsp";
                                          };
                                  };
                                  DICT_ENTRY "sv" {
                                          STRING "Password";
                                          VARIANT "s" {
                                                  STRING "pass0";
                                          };
                                  };
                          };
                  };
          };
  };

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I7c5a42bf1df9b38ad4cd086571c34dbef62da1b4
diff --git a/bmc_dump_entry.hpp b/bmc_dump_entry.hpp
index 31670be..da63b25 100644
--- a/bmc_dump_entry.hpp
+++ b/bmc_dump_entry.hpp
@@ -59,7 +59,11 @@
         EntryIfaces(bus, objPath.c_str(), true),
         phosphor::dump::Entry(bus, objPath.c_str(), dumpId, timeStamp, fileSize,
                               status, parent),
-        file(file){};
+        file(file)
+    {
+        // Emit deferred signal.
+        this->phosphor::dump::bmc::EntryIfaces::emit_object_added();
+    }
 
     /** @brief Delete this d-bus object.
      */