diff options
author | Saturneric <[email protected]> | 2021-12-06 15:58:23 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-06 15:58:43 +0000 |
commit | 97d13004e4f1cb33941a9be57c7e7662e223890b (patch) | |
tree | 6bf2466046379fd8ac2a0e9ca3605e15dce4672d /src/gpg/model/GpgUID.h | |
parent | Merge branch 'develop' of github.com:saturneric/GpgFrontend into develop-ci (diff) | |
download | GpgFrontend-97d13004e4f1cb33941a9be57c7e7662e223890b.tar.gz GpgFrontend-97d13004e4f1cb33941a9be57c7e7662e223890b.zip |
Improve UI & Functions
Diffstat (limited to '')
-rw-r--r-- | src/gpg/model/GpgUID.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpg/model/GpgUID.h b/src/gpg/model/GpgUID.h index 66dba321..8cac4cf7 100644 --- a/src/gpg/model/GpgUID.h +++ b/src/gpg/model/GpgUID.h @@ -26,6 +26,7 @@ #define GPGFRONTEND_GPGUID_H #include "GpgKeySignature.h" +#include "GpgTOFUInfo.h" namespace GpgFrontend { @@ -43,6 +44,16 @@ class GpgUID { [[nodiscard]] bool invalid() const { return _uid_ref->invalid; } + [[nodiscard]] std::unique_ptr<std::vector<GpgTOFUInfo>> tofu_infos() const { + auto infos = std::make_unique<std::vector<GpgTOFUInfo>>(); + auto info_next = _uid_ref->tofu; + while (info_next != nullptr) { + infos->push_back(GpgTOFUInfo(info_next)); + info_next = info_next->next; + } + return infos; + } + [[nodiscard]] std::unique_ptr<std::vector<GpgKeySignature>> signatures() const { auto sigs = std::make_unique<std::vector<GpgKeySignature>>(); |