diff options
author | saturneric <[email protected]> | 2025-04-18 17:56:51 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-04-18 17:56:51 +0000 |
commit | a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9 (patch) | |
tree | 54838273836a155033d33b246ec4a4200291825b /src/core/function/gpg/GpgAutomatonHandler.h | |
parent | fix: issues found by testing (diff) | |
parent | fix: spelling mistake on project config by nightly build (diff) | |
download | GpgFrontend-a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9.tar.gz GpgFrontend-a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9.zip |
Merge branch 'develop'
Diffstat (limited to 'src/core/function/gpg/GpgAutomatonHandler.h')
-rw-r--r-- | src/core/function/gpg/GpgAutomatonHandler.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/function/gpg/GpgAutomatonHandler.h b/src/core/function/gpg/GpgAutomatonHandler.h index 4363cf30..34c23455 100644 --- a/src/core/function/gpg/GpgAutomatonHandler.h +++ b/src/core/function/gpg/GpgAutomatonHandler.h @@ -28,14 +28,13 @@ #pragma once -#include "core/GpgFrontendCore.h" #include "core/function/basic/GpgFunctionObject.h" #include "core/function/gpg/GpgContext.h" #include "core/typedef/GpgTypedef.h" namespace GpgFrontend { -class GpgAutomatonHandler +class GPGFRONTEND_CORE_EXPORT GpgAutomatonHandler : public SingletonFunctionObject<GpgAutomatonHandler> { public: using Command = QString; @@ -83,7 +82,7 @@ class GpgAutomatonHandler AutomatonState current_state_ = kAS_START; AutomatonNextStateHandler next_state_handler_; AutomatonActionHandler action_handler_; - bool success_ = false; + bool success_ = true; bool card_edit_; QString id_; QString prompt_status_; @@ -110,7 +109,8 @@ class GpgAutomatonHandler */ auto DoInteract(const GpgKeyPtr& key, AutomatonNextStateHandler next_state_handler, - AutomatonActionHandler action_handler, int flags = 0) -> bool; + AutomatonActionHandler action_handler, + int flags = 0) -> std::tuple<GpgError, bool>; /** * @brief @@ -122,7 +122,8 @@ class GpgAutomatonHandler */ auto DoCardInteract(const QString& serial_number, AutomatonNextStateHandler next_state_handler, - AutomatonActionHandler action_handler) -> bool; + AutomatonActionHandler action_handler) + -> std::tuple<GpgError, bool>; private: GpgContext& ctx_ = |