settings: Remove unused methods

The setting method in setting.hpp is no longer used. This patch will
remove this method.

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I00b1de0f4189dadf52e27772e4668782793e31ee
diff --git a/settings.cpp b/settings.cpp
index bf7c11d..e76694f 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -84,58 +84,4 @@
     }
 }
 
-namespace boot
-{
-
-std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
-                                         const Interface& iface)
-{
-    constexpr auto bootObjCount = 2;
-    constexpr auto oneTime = "one_time";
-    constexpr auto enabledIntf = "xyz.openbmc_project.Object.Enable";
-
-    const std::vector<Path>& paths = objects.map.at(iface);
-    auto count = paths.size();
-    if (count != bootObjCount)
-    {
-        log<level::ERR>("Exactly two objects expected",
-                        entry("INTERFACE=%s", iface.c_str()),
-                        entry("COUNT=%d", count));
-        elog<InternalFailure>();
-    }
-    size_t index = 0;
-    if (std::string::npos == paths[0].rfind(oneTime))
-    {
-        index = 1;
-    }
-    const Path& oneTimeSetting = paths[index];
-    const Path& regularSetting = paths[!index];
-
-    auto method = objects.bus.new_method_call(
-        objects.service(oneTimeSetting, iface).c_str(), oneTimeSetting.c_str(),
-        ipmi::PROP_INTF, "Get");
-    method.append(enabledIntf, "Enabled");
-
-    std::variant<bool> enabled;
-    try
-    {
-        auto reply = objects.bus.call(method);
-        reply.read(enabled);
-    }
-    catch (const std::exception& e)
-    {
-        log<level::ERR>("Error in getting Enabled property",
-                        entry("OBJECT=%s", oneTimeSetting.c_str()),
-                        entry("INTERFACE=%s", iface.c_str()),
-                        entry("ERROR=%s", e.what()));
-        elog<InternalFailure>();
-    }
-
-    auto oneTimeEnabled = std::get<bool>(enabled);
-    const Path& setting = oneTimeEnabled ? oneTimeSetting : regularSetting;
-    return std::make_tuple(setting, oneTimeEnabled);
-}
-
-} // namespace boot
-
 } // namespace settings
diff --git a/settings.hpp b/settings.hpp
index e813f06..42a8560 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -51,23 +51,4 @@
     sdbusplus::bus_t& bus;
 };
 
-namespace boot
-{
-
-using OneTimeEnabled = bool;
-
-/** @brief Return the one-time boot setting object path if enabled, otherwise
- *         the regular boot setting object path.
- *
- * @param[in] objects - const reference to an object of type Objects
- * @param[in] iface - boot setting interface
- *
- * @return A tuple - boot setting object path, a bool indicating whether the
- *                   returned path corresponds to the one time boot setting.
- */
-std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
-                                         const Interface& iface);
-
-} // namespace boot
-
 } // namespace settings