4 #include <condition_variable>
10 #include <json/json.h>
12 #include "http/httpclient.h"
13 #include "libaktualizr/config.h"
14 #include "logging/logging.h"
15 #include "storage/invstorage.h"
16 #include "uptane/tuf.h"
26 Json::Value toJson()
const;
29 ReportEvent(std::string event_type,
int event_version)
30 : id(Utils::randomUuid()), type(std::move(event_type)), version(event_version), timestamp(TimeStamp::Now()) {}
33 void setCorrelationId(
const std::string& correlation_id);
89 std::shared_ptr<INvStorage> storage_in);
92 void enqueue(std::unique_ptr<ReportEvent>
event);
98 std::shared_ptr<HttpInterface> http;
100 std::condition_variable cv_;
102 std::queue<std::unique_ptr<ReportEvent>> report_queue_;
103 bool shutdown_{
false};
104 std::shared_ptr<INvStorage> storage;
107 #endif // REPORTQUEUE_H_