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 <sdbusplus/asio/connection.hpp> |
| 3 | |
Patrick Williams | fbc6c9d | 2023-05-10 07:50:16 -0500 | [diff] [blame] | 4 | #include <memory> |
| 5 | |
Vernon Mauery | 20ff333 | 2019-03-01 16:52:25 -0800 | [diff] [blame] | 6 | namespace |
| 7 | { |
| 8 | |
| 9 | std::shared_ptr<boost::asio::io_context> ioCtx; |
| 10 | std::shared_ptr<sdbusplus::asio::connection> sdbusp; |
| 11 | |
| 12 | } // namespace |
| 13 | |
| 14 | void setIoContext(std::shared_ptr<boost::asio::io_context>& newIo) |
| 15 | { |
| 16 | ioCtx = newIo; |
| 17 | } |
| 18 | |
| 19 | std::shared_ptr<boost::asio::io_context> getIoContext() |
| 20 | { |
| 21 | return ioCtx; |
| 22 | } |
| 23 | |
| 24 | void setSdBus(std::shared_ptr<sdbusplus::asio::connection>& newBus) |
| 25 | { |
| 26 | sdbusp = newBus; |
| 27 | } |
| 28 | |
| 29 | std::shared_ptr<sdbusplus::asio::connection> getSdBus() |
| 30 | { |
| 31 | return sdbusp; |
| 32 | } |