From 6aa9bd0f77dcb5128167fae62e32aa5252fe85c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 2 Dec 2013 00:55:24 +0100 Subject: Renew the updater branch Now with some actual consensus on what the updater will do! --- mmc_updater/src/UpdateMessage.h | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 mmc_updater/src/UpdateMessage.h (limited to 'mmc_updater/src/UpdateMessage.h') diff --git a/mmc_updater/src/UpdateMessage.h b/mmc_updater/src/UpdateMessage.h new file mode 100644 index 00000000..fee51ab8 --- /dev/null +++ b/mmc_updater/src/UpdateMessage.h @@ -0,0 +1,42 @@ +#pragma once + +#include + +/** UpdateMessage stores information for a message + * about the status of update installation sent + * between threads. + */ +class UpdateMessage +{ + public: + enum Type + { + UpdateFailed, + UpdateProgress, + UpdateFinished + }; + + UpdateMessage(void* receiver, Type type) + { + init(receiver,type); + } + + UpdateMessage(Type type) + { + init(0,type); + } + + void* receiver; + Type type; + std::string message; + int progress; + + private: + void init(void* receiver, Type type) + { + this->progress = 0; + this->receiver = receiver; + this->type = type; + } +}; + -- cgit v1.2.3