Vernon Mauery | 3e9101e | 2020-08-25 16:43:58 -0700 | [diff] [blame] | 1 | #include <boost/asio/io_context.hpp> |
Vernon Mauery | 20ff333 | 2019-03-01 16:52:25 -0800 | [diff] [blame] | 2 | #include <memory> |
| 3 | #include <sdbusplus/asio/connection.hpp> |
| 4 | |
| 5 | namespace |
| 6 | { |
| 7 | |
| 8 | std::shared_ptr<boost::asio::io_context> ioCtx; |
| 9 | std::shared_ptr<sdbusplus::asio::connection> sdbusp; |
| 10 | |
| 11 | } // namespace |
| 12 | |
| 13 | void setIoContext(std::shared_ptr<boost::asio::io_context>& newIo) |
| 14 | { |
| 15 | ioCtx = newIo; |
| 16 | } |
| 17 | |
| 18 | std::shared_ptr<boost::asio::io_context> getIoContext() |
| 19 | { |
| 20 | return ioCtx; |
| 21 | } |
| 22 | |
| 23 | void setSdBus(std::shared_ptr<sdbusplus::asio::connection>& newBus) |
| 24 | { |
| 25 | sdbusp = newBus; |
| 26 | } |
| 27 | |
| 28 | std::shared_ptr<sdbusplus::asio::connection> getSdBus() |
| 29 | { |
| 30 | return sdbusp; |
| 31 | } |