blob: e505797fcddbd82443fb00d357164a88d1fd541d [file] [log] [blame]
Vernon Mauery20ff3332019-03-01 16:52:25 -08001#include <boost/asio.hpp>
2#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}