diff options
author | Saturn&Eric <[email protected]> | 2021-12-07 08:37:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-07 08:37:54 +0000 |
commit | cc89ad54ab3dd4aeb3ed7afeed59a80b6e61649c (patch) | |
tree | 865d2298d836c8eb36584b5d268325bca4a66a78 /src/gpg/model/GpgUID.h | |
parent | Merge pull request #26 from saturneric/develop (diff) | |
parent | Fix Bugs on KeyUploadDialog (diff) | |
download | GpgFrontend-cc89ad54ab3dd4aeb3ed7afeed59a80b6e61649c.tar.gz GpgFrontend-cc89ad54ab3dd4aeb3ed7afeed59a80b6e61649c.zip |
Merge pull request #28 from saturneric/develop
Diffstat (limited to 'src/gpg/model/GpgUID.h')
-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>>(); |