blob: 6a255a402070bc741c0983d84754a7f6ffdd00a4 [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 Grobelny51497a02021-11-09 14:56:22 +01006#include "types/report_action.hpp"
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +00007#include "types/report_types.hpp"
Krzysztof Grobelny51497a02021-11-09 14:56:22 +01008#include "types/report_updates.hpp"
9#include "types/reporting_type.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020010
Wludzik, Jozefe2362792020-10-27 17:23:55 +010011#include <boost/asio/spawn.hpp>
12
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020013#include <chrono>
14#include <memory>
Wludzik, Jozefe2362792020-10-27 17:23:55 +010015#include <optional>
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020016
17namespace interfaces
18{
19
20class ReportFactory
21{
22 public:
23 virtual ~ReportFactory() = default;
24
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000025 virtual std::vector<LabeledMetricParameters>
26 convertMetricParams(boost::asio::yield_context& yield,
27 const ReadingParameters& metricParams) const = 0;
28
Lukasz Kazmierczak7e098e92021-09-16 15:59:56 +020029 virtual std::unique_ptr<interfaces::Report>
Krzysztof Grobelnyb8cc78d2021-11-29 15:54:53 +010030 make(const std::string& id, const std::string& name,
31 const ReportingType reportingType,
Krzysztof Grobelny51497a02021-11-09 14:56:22 +010032 const std::vector<ReportAction>& reportActions,
Szymon Dompke3eb56862021-09-20 15:32:04 +020033 Milliseconds period, uint64_t appendLimit,
Krzysztof Grobelny51497a02021-11-09 14:56:22 +010034 const ReportUpdates reportUpdates, ReportManager& reportManager,
Lukasz Kazmierczak7e098e92021-09-16 15:59:56 +020035 JsonStorage& reportStorage,
36 std::vector<LabeledMetricParameters> labeledMetricParams,
37 bool enabled) const = 0;
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020038};
39
40} // namespace interfaces