8 #include <boost/signals2.hpp>
23 BaseEvent(std::string variant_in) : variant(std::move(variant_in)) {}
28 return variant == T::TypeName;
39 static constexpr
const char* TypeName{
"SendDeviceDataComplete"};
49 static constexpr
const char* TypeName{
"PutManifestComplete"};
59 static constexpr
const char* TypeName{
"UpdateCheckComplete"};
70 static constexpr
const char* TypeName{
"DownloadProgressReport"};
73 return (report.progress == DownloadProgressReport::ProgressCompletedValue);
78 : target{std::move(target_in)}, description{std::move(description_in)}, progress{progress_in} {
83 std::string description;
84 unsigned int progress;
87 static const unsigned int ProgressCompletedValue{100};
95 static constexpr
const char* TypeName{
"DownloadTargetComplete"};
98 : update(std::move(update_in)), success(success_in) {
111 static constexpr
const char* TypeName{
"AllDownloadsComplete"};
123 static constexpr
const char* TypeName{
"InstallStarted"};
134 static constexpr
const char* TypeName{
"InstallTargetComplete"};
137 : serial(std::move(serial_in)), success(success_in) {
150 static constexpr
const char* TypeName{
"AllInstallsComplete"};
162 static constexpr
const char* TypeName{
"CampaignCheckComplete"};
174 static constexpr
const char* TypeName{
"CampaignAcceptComplete"};
181 static constexpr
const char* TypeName{
"CampaignDeclineComplete"};
188 static constexpr
const char* TypeName{
"CampaignPostponeComplete"};
193 using Channel = boost::signals2::signal<void(std::shared_ptr<event::BaseEvent>)>;