GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

GpgTOFUInfo.h
1
29 #ifndef GPGFRONTEND_GPGTOFU_H
30 #define GPGFRONTEND_GPGTOFU_H
31
32 #include "core/GpgConstants.h"
33
34 namespace GpgFrontend {
39 class GPGFRONTEND_CORE_EXPORT GpgTOFUInfo {
40 public:
46 [[nodiscard]] unsigned GetValidity() const;
52 [[nodiscard]] unsigned GetPolicy() const;
53
59 [[nodiscard]] unsigned long GetSignCount() const;
60
66 [[nodiscard]] unsigned long GetEncrCount() const;
67
73 [[nodiscard]] unsigned long GetSignFirst() const;
74
80 [[nodiscard]] unsigned long GetSignLast() const;
81
87 [[nodiscard]] unsigned long GetEncrLast() const;
88
94 [[nodiscard]] std::string GetDescription() const;
95
100 GpgTOFUInfo();
101
107 explicit GpgTOFUInfo(gpgme_tofu_info_t tofu_info);
108
114 GpgTOFUInfo(GpgTOFUInfo&& o) noexcept;
115
120 GpgTOFUInfo(const GpgTOFUInfo&) = delete;
121
128 GpgTOFUInfo& operator=(GpgTOFUInfo&& o) noexcept;
129
135 GpgTOFUInfo& operator=(const GpgTOFUInfo&) = delete;
136
137 private:
138 using SubkeyRefHandler =
139 std::unique_ptr<struct _gpgme_tofu_info,
140 std::function<void(gpgme_tofu_info_t)>>;
141
142 SubkeyRefHandler _tofu_info_ref = nullptr;
143 };
144
145 } // namespace GpgFrontend
146
147 #endif // GPGFRONTEND_GPGTOFU_H
GpgFrontend::GpgTOFUInfo::GpgTOFUInfo
GpgTOFUInfo()
Construct a new Gpg T O F U Info object.
GpgFrontend::GpgTOFUInfo::operator=
GpgTOFUInfo & operator=(GpgTOFUInfo &&o) noexcept
Definition: GpgTOFUInfo.cpp:40
GpgFrontend::GpgTOFUInfo::GetPolicy
unsigned GetPolicy() const
Definition: GpgTOFUInfo.cpp:50
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::GpgTOFUInfo::GetDescription
std::string GetDescription() const
Definition: GpgTOFUInfo.cpp:89
GpgFrontend::GpgTOFUInfo
Definition: GpgTOFUInfo.h:39
GpgFrontend::GpgTOFUInfo::GetEncrLast
unsigned long GetEncrLast() const
Definition: GpgTOFUInfo.cpp:80
GpgFrontend::GpgTOFUInfo::GetSignLast
unsigned long GetSignLast() const
Definition: GpgTOFUInfo.cpp:71
GpgFrontend::GpgTOFUInfo::GetSignFirst
unsigned long GetSignFirst() const
Definition: GpgTOFUInfo.cpp:62
GpgFrontend::GpgTOFUInfo::GetValidity
unsigned GetValidity() const
Definition: GpgTOFUInfo.cpp:46
GpgFrontend::GpgTOFUInfo::GetEncrCount
unsigned long GetEncrCount() const
Definition: GpgTOFUInfo.cpp:58
GpgFrontend::GpgTOFUInfo::GetSignCount
unsigned long GetSignCount() const
Definition: GpgTOFUInfo.cpp:54