GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgSignature.h
1 
29 #pragma once
30 
31 #include "core/typedef/GpgTypedef.h"
32 
33 namespace GpgFrontend {
34 
39 class GPGFRONTEND_CORE_EXPORT GpgSignature {
40  public:
46  [[nodiscard]] auto GetValidity() const -> gpgme_validity_t;
47 
53  [[nodiscard]] auto GetStatus() const -> GpgError;
54 
60  [[nodiscard]] auto GetSummary() const -> GpgError;
61 
67  [[nodiscard]] auto GetPubkeyAlgo() const -> QString;
68 
74  [[nodiscard]] auto GetHashAlgo() const -> QString;
75 
81  [[nodiscard]] auto GetCreateTime() const -> QDateTime;
82 
88  [[nodiscard]] auto GetExpireTime() const -> QDateTime;
89 
95  [[nodiscard]] auto GetFingerprint() const -> QString;
96 
102 
108 
114  explicit GpgSignature(gpgme_signature_t sig);
115 
121 
126  GpgSignature(const GpgSignature &) = delete;
127 
133  auto operator=(GpgSignature &&) noexcept -> GpgSignature &;
134 
140  auto operator=(const GpgSignature &) -> GpgSignature & = delete;
141 
142  private:
143  using KeySignatrueRefHandler =
144  std::unique_ptr<struct _gpgme_signature,
145  std::function<void(gpgme_signature_t)>>;
146 
147  KeySignatrueRefHandler signature_ref_ = nullptr;
148 };
149 } // namespace GpgFrontend
Definition: GpgSignature.h:39
~GpgSignature()
Destroy the Gpg Signature object.
GpgSignature()
Construct a new Gpg Signature object.
GpgSignature(GpgSignature &&) noexcept
Construct a new Gpg Signature object.
Definition: app.cpp:39
gpgme_error_t GpgError
gpgme error
Definition: GpgTypedef.h:42