Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 1 | #pragma once |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 2 | #include <sdbusplus/asio/connection.hpp> |
| 3 | #include <iostream> |
| 4 | |
| 5 | namespace mapbox { |
| 6 | template <typename T, typename... Types> |
Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 7 | const T* getPtr(const mapbox::util::variant<Types...>& v) { |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 8 | if (v.template is<std::remove_const_t<T>>()) { |
| 9 | return &v.template get_unchecked<std::remove_const_t<T>>(); |
| 10 | } else { |
| 11 | return nullptr; |
| 12 | } |
| 13 | } |
| 14 | } // namespace mapbox |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 15 | |
| 16 | namespace crow { |
| 17 | namespace connections { |
Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 18 | static std::shared_ptr<sdbusplus::asio::connection> systemBus; |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 19 | |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 20 | } // namespace connections |
| 21 | } // namespace crow |