From 4ed29b4a5e825fa57cdd0f57a99540fc8f58d278 Mon Sep 17 00:00:00 2001 From: Max Brombach Date: Mon, 29 Jun 2026 20:13:39 +0000 Subject: [PATCH] Device: Add Failed enum value to Device::OpenStatusType enum --- include/icsneo/device/device.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/icsneo/device/device.h b/include/icsneo/device/device.h index ea5bf1a..60fca5f 100644 --- a/include/icsneo/device/device.h +++ b/include/icsneo/device/device.h @@ -231,9 +231,18 @@ public: enum class OpenStatusType { QuestionContinueSkipCancel, QuestionContinueCancel, - Progress + Progress, + Failed }; + /** + * @brief Alias of callback function for progress of a bootloader pipeline task + * + * The progress value passed into the callback function indicates the following: + * 1) If the value is std::nullopt, this implies the status message is for an asynchronous task or a task in which the current progress is unknown. + * 2) If the value is between 0 and 1 (i.e., 0 <= progress <= 1), this implies the actual progress of the current task as a percentage. + * 3) Values not between 0 and 1 (i.e., progress < 0 or progress > 1) are undefined. + */ using OpenStatusHandler = std::function progress)>; bool open(OpenFlags flags = {}, OpenStatusHandler handler =