Remove the service method in settings.hpp
Since the service method in settings.hpp is redundant, it is
recommended to remove it.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I056abcd4f6aef4e5d7d292a8786cebcbb7ecd15f
diff --git a/settings.cpp b/settings.cpp
index 0d368d1..df16aeb 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -62,32 +62,4 @@
}
}
-Service Objects::service(const Path& path, const Interface& interface) const
-{
- using Interfaces = std::vector<Interface>;
- auto mapperCall =
- bus.new_method_call(mapperService, mapperPath, mapperIntf, "GetObject");
- mapperCall.append(path);
- mapperCall.append(Interfaces({interface}));
-
- std::map<Service, Interfaces> result;
- try
- {
- auto response = bus.call(mapperCall);
- response.read(result);
- }
- catch (const sdbusplus::exception_t& ex)
- {
- lg2::error("Error in mapper GetObject: {ERROR}", "ERROR", ex);
- }
-
- if (result.empty())
- {
- lg2::error("Invalid response from mapper");
- elog<InternalFailure>();
- }
-
- return result.begin()->first;
-}
-
} // namespace settings
diff --git a/settings.hpp b/settings.hpp
index 5042c9e..8e5ead5 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -32,17 +32,6 @@
Objects& operator=(Objects&&) = default;
~Objects() = default;
- /** @brief Fetch D-bus service, given a path and an interface. The
- * service can't be cached because mapper returns unique
- * service names.
- *
- * @param[in] path - The D-bus object
- * @param[in] interface - The D-bus interface
- *
- * @return std::string - the D-bus service
- */
- Service service(const Path& path, const Interface& interface) const;
-
/** @brief time sync method settings object */
Path timeSyncMethod;