diff options
author | saturneric <[email protected]> | 2023-12-25 12:51:01 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-25 12:51:01 +0000 |
commit | 5260d7a5634279408b3eb36a5f26fe71fb6f9e69 (patch) | |
tree | 670e0878a41e8c6b1651fedbd224bfbea94e0849 /src/core/utils/GpgUtils.cpp | |
parent | fix: use the new async encrypt symmetric api at gui app (diff) | |
download | GpgFrontend-5260d7a5634279408b3eb36a5f26fe71fb6f9e69.tar.gz GpgFrontend-5260d7a5634279408b3eb36a5f26fe71fb6f9e69.zip |
feat: upgrade basical operations fully to async style and update test cases
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r-- | src/core/utils/GpgUtils.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp index b9fa59bd..886dc0fc 100644 --- a/src/core/utils/GpgUtils.cpp +++ b/src/core/utils/GpgUtils.cpp @@ -121,34 +121,4 @@ auto TextIsSigned(BypeArrayRef text) -> int { } return 0; } - -auto NewResult(gpgme_encrypt_result_t&& result) -> GpgEncrResult { - gpgme_result_ref(result); - return {result, ResultRefDeletor()}; -} - -auto NewResult(gpgme_decrypt_result_t&& result) -> GpgDecrResult { - gpgme_result_ref(result); - return {result, ResultRefDeletor()}; -} - -auto NewResult(gpgme_sign_result_t&& result) -> GpgSignResult { - gpgme_result_ref(result); - return {result, ResultRefDeletor()}; -} - -auto NewResult(gpgme_verify_result_t&& result) -> GpgVerifyResult { - gpgme_result_ref(result); - return {result, ResultRefDeletor()}; -} - -auto NewResult(gpgme_genkey_result_t&& result) -> GpgGenKeyResult { - gpgme_result_ref(result); - return {result, ResultRefDeletor()}; -} - -void ResultRefDeletor::operator()(void* _result) { - SPDLOG_TRACE("gpgme unref {}", _result); - if (_result != nullptr) gpgme_result_unref(_result); -} } // namespace GpgFrontend |