Serialize the config objects

This commit serializes the config object into cereal
path and restores the config object when the phosphor-ldap-conf
restarts.

TestedBy: Unit tested
          Serialize the object
          Restart the phosphor-ldap-conf restores the object.
          Ldap/Local authentication works fine.

Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: Ie6e940ddd6851085dc4213677dfb20e3afa0964f
diff --git a/phosphor-ldap-config/ldap_config_mgr.hpp b/phosphor-ldap-config/ldap_config_mgr.hpp
index a3895ae..812528b 100644
--- a/phosphor-ldap-config/ldap_config_mgr.hpp
+++ b/phosphor-ldap-config/ldap_config_mgr.hpp
@@ -99,13 +99,9 @@
      */
     virtual void startOrStopService(const std::string& service, bool value);
 
-    /** @brief delete the config D-Bus object.
+    /** @brief Populate existing config into D-Bus properties
      */
-    void deleteObject();
-
-    /* Create the default active directory and the openldap config
-     * objects. */
-    virtual void createDefaultObjects();
+    virtual void restore();
 
     /* ldap service enabled property would be saved under
      * this path.
@@ -130,6 +126,10 @@
     std::unique_ptr<Config> openLDAPConfigPtr = nullptr;
     /** @brief Pointer to a AD Config D-Bus object */
     std::unique_ptr<Config> ADConfigPtr = nullptr;
+
+    /* Create the default active directory and the openldap config
+     * objects. */
+    virtual void createDefaultObjects();
 };
 } // namespace ldap
 } // namespace phosphor