1 #include <boost/asio.hpp>
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 }
32