diff options
author | saturneric <[email protected]> | 2025-04-13 19:33:31 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-04-13 19:33:31 +0000 |
commit | 7ca18eb0e2c4204f749c682b66c862968e8d2f58 (patch) | |
tree | ba8e0303ebc6ec376b1be580408d9cd91f58f2d8 /src/core/function/gpg/GpgAutomatonHandler.h | |
parent | feat: add openpgp smart card support (diff) | |
download | GpgFrontend-7ca18eb0e2c4204f749c682b66c862968e8d2f58.tar.gz GpgFrontend-7ca18eb0e2c4204f749c682b66c862968e8d2f58.zip |
feat: add SmartCardController
Diffstat (limited to 'src/core/function/gpg/GpgAutomatonHandler.h')
-rw-r--r-- | src/core/function/gpg/GpgAutomatonHandler.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/src/core/function/gpg/GpgAutomatonHandler.h b/src/core/function/gpg/GpgAutomatonHandler.h index 78b20252..f86299e8 100644 --- a/src/core/function/gpg/GpgAutomatonHandler.h +++ b/src/core/function/gpg/GpgAutomatonHandler.h @@ -87,16 +87,46 @@ class GpgAutomatonHandler explicit GpgAutomatonHandler( int channel = SingletonFunctionObject::GetDefaultChannel()); + /** + * @brief + * + * @param key + * @param next_state_handler + * @param action_handler + * @param flags + * @return true + * @return false + */ auto DoInteract(const GpgKey& key, AutomatonNextStateHandler next_state_handler, - AutomatonActionHandler action_handler) -> bool; + AutomatonActionHandler action_handler, int flags = 0) -> bool; - private: - static auto interator_cb_func(void* handle, const char* status, - const char* args, int fd) -> gpgme_error_t; + /** + * @brief + * + * @param next_state_handler + * @param action_handler + * @return true + * @return false + */ + auto DoCardInteract(AutomatonNextStateHandler next_state_handler, + AutomatonActionHandler action_handler) -> bool; + private: GpgContext& ctx_ = GpgContext::GetInstance(SingletonFunctionObject::GetChannel()); ///< + + /** + * @brief + * + * @param handle + * @param status + * @param args + * @param fd + * @return gpgme_error_t + */ + static auto interator_cb_func(void* handle, const char* status, + const char* args, int fd) -> gpgme_error_t; }; using AutomatonNextStateHandler = |