dbus_utility.hpp (17a897df9fd974e7b7b15fe61c9e59179c7b9fca) | dbus_utility.hpp (81ce609e30274435b4f8c3fc65340c6b6b153b0c) |
---|---|
1/* 2 // Copyright (c) 2018 Intel Corporation 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 --- 76 unchanged lines hidden (view full) --- 85template <typename Callback> 86inline void checkDbusPathExists(const std::string& path, Callback&& callback) 87{ 88 using GetObjectType = 89 std::vector<std::pair<std::string, std::vector<std::string>>>; 90 91 crow::connections::systemBus->async_method_call( 92 [callback{std::move(callback)}](const boost::system::error_code ec, | 1/* 2 // Copyright (c) 2018 Intel Corporation 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 --- 76 unchanged lines hidden (view full) --- 85template <typename Callback> 86inline void checkDbusPathExists(const std::string& path, Callback&& callback) 87{ 88 using GetObjectType = 89 std::vector<std::pair<std::string, std::vector<std::string>>>; 90 91 crow::connections::systemBus->async_method_call( 92 [callback{std::move(callback)}](const boost::system::error_code ec, |
93 const GetObjectType& object_names) { 94 callback(!ec && object_names.size() != 0); | 93 const GetObjectType& objectNames) { 94 callback(!ec && objectNames.size() != 0); |
95 }, 96 "xyz.openbmc_project.ObjectMapper", 97 "/xyz/openbmc_project/object_mapper", 98 "xyz.openbmc_project.ObjectMapper", "GetObject", path, 99 std::array<std::string, 0>()); 100} 101 102} // namespace utility 103} // namespace dbus | 95 }, 96 "xyz.openbmc_project.ObjectMapper", 97 "/xyz/openbmc_project/object_mapper", 98 "xyz.openbmc_project.ObjectMapper", "GetObject", path, 99 std::array<std::string, 0>()); 100} 101 102} // namespace utility 103} // namespace dbus |