8 #include <boost/signals2.hpp>
11 #include "uptane/fetcher.h"
12 #include "uptane/tuf.h"
26 BaseEvent(std::string variant_in) : variant(std::move(variant_in)) {}
31 return variant == T::TypeName;
42 static constexpr
const char* TypeName{
"SendDeviceDataComplete"};
52 static constexpr
const char* TypeName{
"PutManifestComplete"};
62 static constexpr
const char* TypeName{
"UpdateCheckComplete"};
73 static constexpr
const char* TypeName{
"DownloadProgressReport"};
76 return (report.progress == DownloadProgressReport::ProgressCompletedValue);
81 : target{std::move(target_in)}, description{std::move(description_in)}, progress{progress_in} {
86 std::string description;
87 unsigned int progress;
90 static const unsigned int ProgressCompletedValue{100};
98 static constexpr
const char* TypeName{
"DownloadTargetComplete"};
101 : update(std::move(update_in)), success(success_in) {
114 static constexpr
const char* TypeName{
"AllDownloadsComplete"};
126 static constexpr
const char* TypeName{
"InstallStarted"};
137 static constexpr
const char* TypeName{
"InstallTargetComplete"};
140 : serial(std::move(serial_in)), success(success_in) {
153 static constexpr
const char* TypeName{
"AllInstallsComplete"};
165 static constexpr
const char* TypeName{
"CampaignCheckComplete"};
177 static constexpr
const char* TypeName{
"CampaignAcceptComplete"};
184 static constexpr
const char* TypeName{
"CampaignDeclineComplete"};
191 static constexpr
const char* TypeName{
"CampaignPostponeComplete"};
196 using Channel = boost::signals2::signal<void(std::shared_ptr<event::BaseEvent>)>;