blob: 237ae7b9a3ae2a75d3ce8e5119da761cdde1fbef [file] [log] [blame]
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02001#pragma once
2
Wludzik, Jozefe2362792020-10-27 17:23:55 +01003#include "interfaces/json_storage.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02004#include "interfaces/report.hpp"
5#include "interfaces/report_manager.hpp"
Krzysztof Grobelny9f9ff902021-03-05 14:57:53 +00006#include "interfaces/types.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02007
Wludzik, Jozefe2362792020-10-27 17:23:55 +01008#include <boost/asio/spawn.hpp>
9
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020010#include <chrono>
11#include <memory>
Wludzik, Jozefe2362792020-10-27 17:23:55 +010012#include <optional>
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020013
14namespace interfaces
15{
16
17class ReportFactory
18{
19 public:
20 virtual ~ReportFactory() = default;
21
Wludzik, Jozefe2362792020-10-27 17:23:55 +010022 virtual std::unique_ptr<interfaces::Report> make(
Krzysztof Grobelnyd2238192020-12-02 09:27:28 +000023 boost::asio::yield_context& yield, const std::string& name,
24 const std::string& reportingType, bool emitsReadingsSignal,
25 bool logToMetricReportsCollection, std::chrono::milliseconds period,
26 const ReadingParameters& metricParams, ReportManager& reportManager,
27 JsonStorage& reportStorage) const = 0;
28 virtual std::unique_ptr<interfaces::Report> make(
Wludzik, Jozefe2362792020-10-27 17:23:55 +010029 const std::string& name, const std::string& reportingType,
30 bool emitsReadingsSignal, bool logToMetricReportsCollection,
31 std::chrono::milliseconds period, const ReadingParameters& metricParams,
Krzysztof Grobelnyd2238192020-12-02 09:27:28 +000032 ReportManager& reportManager, JsonStorage& reportStorage,
33 std::vector<LabeledMetricParameters> labeledMetricParams) const = 0;
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020034};
35
36} // namespace interfaces