Change the access mode of the function getBus

GetBus function provides the same instance of the
bus application in the process.

Now there is a need where we need the same bus instance
at multiple places.

Remove the friend loop, now it is not needed as we have
changed the scope of getBus.

Change-Id: I7e8cda45f3835b1d93be36f317741bc4ae6951a2
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/src/sdbusplus.hpp b/src/sdbusplus.hpp
index d62a5d4..1a2c9c2 100644
--- a/src/sdbusplus.hpp
+++ b/src/sdbusplus.hpp
@@ -20,12 +20,6 @@
 class SDBusPlus
 {
     private:
-        static auto& getBus()
-        {
-            static auto bus = sdbusplus::bus::new_default();
-            return bus;
-        }
-
         static auto& getWatches()
         {
             static std::vector<sdbusplus::bus::match::match> watches;
@@ -33,6 +27,12 @@
         }
 
     public:
+        static auto& getBus()
+        {
+            static auto bus = sdbusplus::bus::new_default();
+            return bus;
+        }
+
         /** @brief Invoke a method; ignore reply. */
         template <typename ...Args>
         static void callMethodNoReply(