28 enum class Step : uint8_t {
49 void init(uint8_t minLength = 4, uint8_t maxLength = 16);
59 void setTitle(
const char* title) { title_ = title; }
72 void onEnter(
void* context)
override;
73 void render(
bool partial)
override;
75 void onTick(uint32_t nowMs)
override;
76 const char*
getName()
const override {
return "PinChangeView"; }
85 uint8_t minLength_ = 4;
86 uint8_t maxLength_ = 16;
87 const char* message_ =
nullptr;
88 uint32_t messageShownMs_ = 0;
89 bool pinChanged_ =
false;
96 const char* title_ =
nullptr;
98 void addDigit(
char digit);
101 void showMessage(
const char* msg);
103 char* getCurrentBuffer();
104 const char* getStepTitle()
const;
void setOnComplete(CompleteCallback callback)
void setBlockedCallback(BlockedCallback callback)
InputResult onKey(char key) override
Handles key input for PIN-change flow.
void setVerifyCallback(VerifyCallback callback)
const char * getFooterHint() const override
Returns localized footer hint text.
void setRetriesCallback(RetriesCallback callback)
const char * getName() const override
void setChangeCallback(ChangeCallback callback)
uint8_t(*)() RetriesCallback
void init(uint8_t minLength=4, uint8_t maxLength=16)
Initializes PIN-change wizard state.
void(*)(bool success) CompleteCallback
bool(*)() BlockedCallback
void setTitle(const char *title)
bool(*)(const char *pin) VerifyCallback
static constexpr uint8_t MAX_PIN_LENGTH
static constexpr uint32_t MESSAGE_DISPLAY_MS
void onEnter(void *context) override
Resets wizard state when entering the view.
uint8_t getRetriesRemaining() const
Returns remaining retry count for current PIN verification.
bool(*)(const char *currentPin, const char *newPin) ChangeCallback
void onTick(uint32_t nowMs) override
Handles message timeout and completion callbacks.
Centralized key-code constants for cdc_views.