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
Definition: GpgTOFUInfo.h:39
GpgFrontend::GpgTOFUInfo::GpgTOFUInfo
GpgTOFUInfo(const GpgTOFUInfo &)=delete
Construct a new Gpg T O F U Info object.
GpgFrontend::GpgTOFUInfo::operator=
GpgTOFUInfo & operator=(const GpgTOFUInfo &)=delete
GpgFrontend::GpgTOFUInfo::GpgTOFUInfo
GpgTOFUInfo()
Construct a new Gpg T O F U Info object.
GpgFrontend
Definition: CoreCommonUtil.cpp:31