Move the getSubTree method to utils

Since the getSubTree method is a generic method that users may use
anywhere, It is better to move this method to utils.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ib6e1367b9885dac38a7ba6b63329977436e70c26
diff --git a/settings.cpp b/settings.cpp
index df16aeb..50081b7 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -17,24 +17,12 @@
 
 Objects::Objects(sdbusplus::bus_t& bus) : bus(bus)
 {
-    std::vector<std::string> settingsIntfs = {timeSyncIntf};
-    auto depth = 0;
-
-    auto mapperCall = bus.new_method_call(mapperService, mapperPath, mapperIntf,
-                                          "GetSubTree");
-    mapperCall.append(root);
-    mapperCall.append(depth);
-    mapperCall.append(settingsIntfs);
-
-    using Interfaces = std::vector<Interface>;
-    using MapperResponse = std::vector<
-        std::pair<Path, std::vector<std::pair<Service, Interfaces>>>>;
+    Interfaces settingsIntfs = {timeSyncIntf};
     MapperResponse result;
 
     try
     {
-        auto response = bus.call(mapperCall);
-        response.read(result);
+        result = getSubTree(bus, root, settingsIntfs, 0);
     }
     catch (const sdbusplus::exception_t& ex)
     {