blob: fb71805bead410864395cc5a4c444eef1591d590 [file] [log] [blame]
Vernon Mauery3e9101e2020-08-25 16:43:58 -07001#include <boost/asio/io_context.hpp>
Vernon Mauery20ff3332019-03-01 16:52:25 -08002#include <memory>
3#include <sdbusplus/asio/connection.hpp>
4
5namespace
6{
7
8std::shared_ptr<boost::asio::io_context> ioCtx;
9std::shared_ptr<sdbusplus::asio::connection> sdbusp;
10
11} // namespace
12
13void setIoContext(std::shared_ptr<boost::asio::io_context>& newIo)
14{
15 ioCtx = newIo;
16}
17
18std::shared_ptr<boost::asio::io_context> getIoContext()
19{
20 return ioCtx;
21}
22
23void setSdBus(std::shared_ptr<sdbusplus::asio::connection>& newBus)
24{
25 sdbusp = newBus;
26}
27
28std::shared_ptr<sdbusplus::asio::connection> getSdBus()
29{
30 return sdbusp;
31}