treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines.  Quoting the guidelines:

  "Doing so takes away an #includer’s ability to effectively
disambiguate and to use alternatives. It also makes #included headers
order-dependent as they might have different meaning when included in
different orders."

For further reading:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive

The guidelines don't call out using using namespace from namespace
scope, but it is only marginally less problematic and still unexpected,
so this patch removes those as well.

The process used to do the update is roughly:

1 - git grep 'using namespace' **.hpp
2 - For each instance, remove the offending 'using namespace' line
3 - build
4 - add 'using namespace' to cpp files or fully resolve types in hpp
  files until the project builds again.

Further cleanup is possible - for example cpp files could be scrubbed
for unnecessary namespace qualification - this was not done here to make
review as simple as possible.

Change-Id: I4931f5e78a1b5b74b4a4774c035a549f4d59b91a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index 397eb75..13ea461 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -27,13 +27,9 @@
 namespace platform
 {
 
-using namespace pldm::utils;
-using namespace pldm::responder::pdr_utils;
-using namespace pldm::state_sensor;
-
-using generatePDR =
-    std::function<void(const pldm::utils::DBusHandler& dBusIntf,
-                       const Json& json, pdr_utils::RepoInterface& repo)>;
+using generatePDR = std::function<void(const pldm::utils::DBusHandler& dBusIntf,
+                                       const pldm::utils::Json& json,
+                                       pdr_utils::RepoInterface& repo)>;
 
 using EffecterId = uint16_t;
 using DbusObjMaps =
@@ -55,7 +51,8 @@
     Handler(const pldm::utils::DBusHandler* dBusIntf,
             const std::string& pdrJsonsDir, pldm_pdr* repo,
             HostPDRHandler* hostPDRHandler,
-            DbusToPLDMEvent* dbusToPLDMEventHandler, fru::Handler* fruHandler,
+            pldm::state_sensor::DbusToPLDMEvent* dbusToPLDMEventHandler,
+            fru::Handler* fruHandler,
             pldm::responder::oem_platform::Handler* oemPlatformHandler,
             sdeventplus::Event& event, bool buildPDRLazily = false,
             const std::optional<EventMap>& addOnHandlersMap = std::nullopt) :
@@ -152,7 +149,8 @@
     void addDbusObjMaps(
         uint16_t id,
         std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps> dbusObj,
-        TypeId typeId = TypeId::PLDM_EFFECTER_ID);
+        pldm::responder::pdr_utils::TypeId typeId =
+            pldm::responder::pdr_utils::TypeId::PLDM_EFFECTER_ID);
 
     /** @brief Retrieve an id -> D-Bus objects mapping
      *
@@ -164,8 +162,10 @@
      *          to attribute value
      */
     const std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps>&
-        getDbusObjMaps(uint16_t id,
-                       TypeId typeId = TypeId::PLDM_EFFECTER_ID) const;
+        getDbusObjMaps(
+            uint16_t id,
+            pldm::responder::pdr_utils::TypeId typeId =
+                pldm::responder::pdr_utils::TypeId::PLDM_EFFECTER_ID) const;
 
     uint16_t getNextEffecterId()
     {
@@ -184,14 +184,16 @@
      *  @param[in] repo - instance of concrete implementation of Repo
      */
     void generate(const pldm::utils::DBusHandler& dBusIntf,
-                  const std::string& dir, Repo& repo);
+                  const std::string& dir,
+                  pldm::responder::pdr_utils::Repo& repo);
 
     /** @brief Parse PDR JSONs and build state effecter PDR repository
      *
      *  @param[in] json - platform specific PDR JSON files
      *  @param[in] repo - instance of state effecter implementation of Repo
      */
-    void generateStateEffecterRepo(const Json& json, Repo& repo);
+    void generateStateEffecterRepo(const pldm::utils::Json& json,
+                                   pldm::responder::pdr_utils::Repo& repo);
 
     /** @brief map of PLDM event type to EventHandlers
      *
@@ -307,7 +309,8 @@
 
         std::unique_ptr<pldm_pdr, decltype(&pldm_pdr_destroy)>
             stateEffecterPdrRepo(pldm_pdr_init(), pldm_pdr_destroy);
-        Repo stateEffecterPDRs(stateEffecterPdrRepo.get());
+        pldm::responder::pdr_utils::Repo stateEffecterPDRs(
+            stateEffecterPdrRepo.get());
         getRepoByType(pdrRepo, stateEffecterPDRs, PLDM_STATE_EFFECTER_PDR);
         if (stateEffecterPDRs.empty())
         {
@@ -315,7 +318,7 @@
             return PLDM_PLATFORM_INVALID_EFFECTER_ID;
         }
 
-        PdrEntry pdrEntry{};
+        pldm::responder::pdr_utils::PdrEntry pdrEntry{};
         auto pdrRecord = stateEffecterPDRs.getFirstRecord(pdrEntry);
         while (pdrRecord)
         {
@@ -375,7 +378,8 @@
                     break;
                 }
                 const DBusMapping& dbusMapping = dbusMappings[currState];
-                const StatestoDbusVal& dbusValToMap = dbusValMaps[currState];
+                const pldm::responder::pdr_utils::StatestoDbusVal&
+                    dbusValToMap = dbusValMaps[currState];
 
                 if (stateField[currState].set_request == PLDM_REQUEST_SET)
                 {
@@ -419,7 +423,7 @@
      *
      *  @param[in] repo - instance of concrete implementation of Repo
      */
-    void generateTerminusLocatorPDR(Repo& repo);
+    void generateTerminusLocatorPDR(pldm::responder::pdr_utils::Repo& repo);
 
     /** @brief Get std::map associated with the entity
      *         key: object path
@@ -449,7 +453,7 @@
     DbusObjMaps effecterDbusObjMaps{};
     DbusObjMaps sensorDbusObjMaps{};
     HostPDRHandler* hostPDRHandler;
-    DbusToPLDMEvent* dbusToPLDMEventHandler;
+    pldm::state_sensor::DbusToPLDMEvent* dbusToPLDMEventHandler;
     fru::Handler* fruHandler;
     const pldm::utils::DBusHandler* dBusIntf;
     pldm::responder::oem_platform::Handler* oemPlatformHandler;