GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgTOFUInfo.h
1 
29 #pragma once
30 
31 namespace GpgFrontend {
36 class GPGFRONTEND_CORE_EXPORT GpgTOFUInfo {
37  public:
43  [[nodiscard]] auto GetValidity() const -> unsigned;
49  [[nodiscard]] auto GetPolicy() const -> unsigned;
50 
56  [[nodiscard]] auto GetSignCount() const -> unsigned long;
57 
63  [[nodiscard]] auto GetEncrCount() const -> unsigned long;
64 
70  [[nodiscard]] auto GetSignFirst() const -> unsigned long;
71 
77  [[nodiscard]] auto GetSignLast() const -> unsigned long;
78 
84  [[nodiscard]] auto GetEncrLast() const -> unsigned long;
85 
91  [[nodiscard]] auto GetDescription() const -> QString;
92 
98 
104  explicit GpgTOFUInfo(gpgme_tofu_info_t tofu_info);
105 
111  GpgTOFUInfo(GpgTOFUInfo&& o) noexcept;
112 
117  GpgTOFUInfo(const GpgTOFUInfo&) = delete;
118 
125  auto operator=(GpgTOFUInfo&& o) noexcept -> GpgTOFUInfo&;
126 
132  auto operator=(const GpgTOFUInfo&) -> GpgTOFUInfo& = delete;
133 
134  private:
135  using SubkeyRefHandler =
136  std::unique_ptr<struct _gpgme_tofu_info,
137  std::function<void(gpgme_tofu_info_t)>>;
138 
139  SubkeyRefHandler tofu_info_ref_ = nullptr;
140 };
141 
142 } // namespace GpgFrontend
Definition: GpgTOFUInfo.h:36
GpgTOFUInfo(const GpgTOFUInfo &)=delete
Construct a new Gpg T O F U Info object.
GpgTOFUInfo()
Construct a new Gpg T O F U Info object.
auto operator=(const GpgTOFUInfo &) -> GpgTOFUInfo &=delete
Definition: app.cpp:39