Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame^] | 3 | #include "report_factory.hpp" |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 4 | #include "report_manager.hpp" |
| 5 | |
| 6 | #include <sdbusplus/asio/connection.hpp> |
| 7 | #include <sdbusplus/asio/object_server.hpp> |
| 8 | |
| 9 | #include <memory> |
| 10 | |
| 11 | class Telemetry |
| 12 | { |
| 13 | public: |
| 14 | Telemetry(std::shared_ptr<sdbusplus::asio::connection> bus) : |
| 15 | objServer(std::make_shared<sdbusplus::asio::object_server>(bus)), |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame^] | 16 | reportManager( |
| 17 | std::make_unique<ReportFactory>(bus->get_io_context(), objServer), |
| 18 | objServer) |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 19 | {} |
| 20 | |
| 21 | private: |
| 22 | std::shared_ptr<sdbusplus::asio::object_server> objServer; |
| 23 | ReportManager reportManager; |
| 24 | }; |