Create role mapping under ldap config object

Each ldap config object should be have its own
mapping object.

This is to align with the redfish.
https://redfish.dmtf.org/schemas/AccountService.v1_4_0.json

As per redfish, Each config will have it's own
"RemoteRoleMapping".

Mapping object should be persisted and restores
when the phosphor-ldap-conf restarts.

TestedBy:
          Unit Tested.
          Creation of privilege mapping.
          Persist the priv-mapping.
          Restores the priv-mapping.

Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Change-Id: I5ab4aeffae61f9cc57c1338f94784d0fe5607cd3
diff --git a/phosphor-ldap-config/ldap_mapper_entry.hpp b/phosphor-ldap-config/ldap_mapper_entry.hpp
index dea85c2..310f006 100644
--- a/phosphor-ldap-config/ldap_mapper_entry.hpp
+++ b/phosphor-ldap-config/ldap_mapper_entry.hpp
@@ -7,17 +7,17 @@
 
 namespace phosphor
 {
-namespace user
+namespace ldap
 {
 
 namespace Base = sdbusplus::xyz::openbmc_project;
 using Entry =
     sdbusplus::xyz::openbmc_project::User::server::PrivilegeMapperEntry;
 using Delete = sdbusplus::xyz::openbmc_project::Object::server::Delete;
-using Ifaces = sdbusplus::server::object::object<Entry, Delete>;
+using Interfaces = sdbusplus::server::object::object<Entry, Delete>;
 
-// Forward declaration for LDAPMapperMgr
-class LDAPMapperMgr;
+// Forward declaration for Config
+class Config;
 
 using Id = size_t;
 
@@ -25,7 +25,7 @@
  *
  *  @brief This D-Bus object represents the privilege level for the LDAP group.
  */
-class LDAPMapperEntry : public Ifaces
+class LDAPMapperEntry : public Interfaces
 {
   public:
     LDAPMapperEntry() = delete;
@@ -46,7 +46,7 @@
      */
     LDAPMapperEntry(sdbusplus::bus::bus &bus, const char *path,
                     const char *filePath, const std::string &groupName,
-                    const std::string &privilege, LDAPMapperMgr &parent);
+                    const std::string &privilege, Config &parent);
 
     /** @brief Constructs LDAP privilege mapper entry object
      *
@@ -56,7 +56,7 @@
      *  @param[in] parent - LDAP privilege mapper manager
      */
     LDAPMapperEntry(sdbusplus::bus::bus &bus, const char *path,
-                    const char *filePath, LDAPMapperMgr &parent);
+                    const char *filePath, Config &parent);
 
     /** @brief Delete privilege mapper entry object
      *
@@ -88,11 +88,11 @@
 
   private:
     Id id;
-    LDAPMapperMgr &manager;
+    Config &manager;
 
     /** @brief serialization directory path */
     std::string persistPath;
 };
 
-} // namespace user
+} // namespace ldap
 } // namespace phosphor