1911ac317SEd Tanous #pragma once 2aa2e59c1SEd Tanous #include <sdbusplus/asio/connection.hpp> 3aa2e59c1SEd Tanous #include <iostream> 4aa2e59c1SEd Tanous 5aa2e59c1SEd Tanous namespace mapbox { 6aa2e59c1SEd Tanous template <typename T, typename... Types> 7*55c7b7a2SEd Tanous const T* getPtr(const mapbox::util::variant<Types...>& v) { 8aa2e59c1SEd Tanous if (v.template is<std::remove_const_t<T>>()) { 9aa2e59c1SEd Tanous return &v.template get_unchecked<std::remove_const_t<T>>(); 10aa2e59c1SEd Tanous } else { 11aa2e59c1SEd Tanous return nullptr; 12aa2e59c1SEd Tanous } 13aa2e59c1SEd Tanous } 14aa2e59c1SEd Tanous } // namespace mapbox 15911ac317SEd Tanous 16911ac317SEd Tanous namespace crow { 17911ac317SEd Tanous namespace connections { 18*55c7b7a2SEd Tanous static std::shared_ptr<sdbusplus::asio::connection> systemBus; 19911ac317SEd Tanous 20aa2e59c1SEd Tanous } // namespace connections 21911ac317SEd Tanous } // namespace crow 22