diff options
-rw-r--r-- | utility.cpp | 46 | ||||
-rw-r--r-- | utility.hpp | 14 |
2 files changed, 1 insertions, 59 deletions
diff --git a/utility.cpp b/utility.cpp index 1bb979e..08970d3 100644 --- a/utility.cpp +++ b/utility.cpp @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include <string> #include "utility.hpp" namespace phosphor @@ -22,50 +21,7 @@ namespace fan { namespace util { - -using namespace std::string_literals; - -using namespace phosphor::logging; -using InternalFailure = sdbusplus::xyz::openbmc_project::Common:: - Error::InternalFailure; - -std::string getService(const std::string& path, - const std::string& interface, - sdbusplus::bus::bus& bus) -{ - auto mapperCall = bus.new_method_call(MAPPER_BUSNAME, - MAPPER_PATH, - MAPPER_INTERFACE, - "GetObject"); - - mapperCall.append(path); - mapperCall.append(std::vector<std::string>({interface})); - - auto mapperResponseMsg = bus.call(mapperCall); - if (mapperResponseMsg.is_method_error()) - { - log<level::ERR>("Error in mapper call to get service name", - entry("PATH=%s", path.c_str()), - entry("INTERFACE=%s", interface.c_str())); - elog<InternalFailure>(); - } - - - std::map<std::string, std::vector<std::string>> mapperResponse; - mapperResponseMsg.read(mapperResponse); - - if (mapperResponse.empty()) - { - log<level::ERR>( - "Error in mapper response for getting service name", - entry("PATH=%s", path.c_str()), - entry("INTERFACE=%s", interface.c_str())); - elog<InternalFailure>(); - } - - return mapperResponse.begin()->first; -} - + // Keep for future functions } } } diff --git a/utility.hpp b/utility.hpp index fbae129..f97b505 100644 --- a/utility.hpp +++ b/utility.hpp @@ -80,20 +80,6 @@ class FileDescriptor }; /** - * @brief Get the service name from the mapper for the - * interface and path passed in. - * - * @param[in] path - the dbus path name - * @param[in] interface - the dbus interface name - * @param[in] bus - the dbus object - * - * @return The service name - */ -std::string getService(const std::string& path, - const std::string& interface, - sdbusplus::bus::bus& bus); - -/** * @brief Get the object map for creating or updating an object property * * @param[in] path - The dbus object path name |