diff options
author | Saturneric <[email protected]> | 2021-12-14 11:28:53 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-14 11:28:53 +0000 |
commit | 50efbe1fcc7d0ebf5dd814a36602f88ec01d2b3a (patch) | |
tree | f64a58f0572b6af09323273b073e39fda78dff33 /src/gpg/GpgConstants.cpp | |
parent | Add Deb Build Support & Install Support For Linux. (diff) | |
download | GpgFrontend-50efbe1fcc7d0ebf5dd814a36602f88ec01d2b3a.tar.gz GpgFrontend-50efbe1fcc7d0ebf5dd814a36602f88ec01d2b3a.zip |
Modified Core to Optimization & Fixed Problem
1. GpgKey copy ability
2. GpgXXResult type to shared_ptr
3. KeyList Optimization
4. Fixed Loading Dialog Problem
Diffstat (limited to 'src/gpg/GpgConstants.cpp')
-rw-r--r-- | src/gpg/GpgConstants.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gpg/GpgConstants.cpp b/src/gpg/GpgConstants.cpp index 2454daa2..d38cafe3 100644 --- a/src/gpg/GpgConstants.cpp +++ b/src/gpg/GpgConstants.cpp @@ -190,3 +190,32 @@ int GpgFrontend::text_is_signed(GpgFrontend::BypeArrayRef text) { else return 0; } + +GpgFrontend::GpgEncrResult GpgFrontend::_new_result( + gpgme_encrypt_result_t&& result) { + gpgme_result_ref(result); + return {result, _result_ref_deletor()}; +} + +GpgFrontend::GpgDecrResult GpgFrontend::_new_result( + gpgme_decrypt_result_t&& result) { + gpgme_result_ref(result); + return {result, _result_ref_deletor()}; +} + +GpgFrontend::GpgSignResult GpgFrontend::_new_result( + gpgme_sign_result_t&& result) { + gpgme_result_ref(result); + return {result, _result_ref_deletor()}; +} + +GpgFrontend::GpgVerifyResult GpgFrontend::_new_result( + gpgme_verify_result_t&& result) { + gpgme_result_ref(result); + return {result, _result_ref_deletor()}; +} + +void GpgFrontend::_result_ref_deletor::operator()(void* _result) { + DLOG(INFO) << "Called" << _result; + if (_result != nullptr) gpgme_result_unref(_result); +} |