GpgSignature.h
#ifndef GPGFRONTEND_GPGSIGNATURE_H
#define GPGFRONTEND_GPGSIGNATURE_H
#include <boost/date_time/gregorian/greg_date.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
#include "core/GpgConstants.h"
namespace GpgFrontend {
class GPGFRONTEND_CORE_EXPORT GpgSignature {
public:
[[nodiscard]] gpgme_validity_t GetValidity() const;
[[nodiscard]] gpgme_error_t GetStatus() const;
[[nodiscard]] gpgme_error_t GetSummary() const;
[[nodiscard]] std::string GetPubkeyAlgo() const;
[[nodiscard]] std::string GetHashAlgo() const;
[[nodiscard]] boost::posix_time::ptime GetCreateTime() const;
[[nodiscard]] boost::posix_time::ptime GetExpireTime() const;
[[nodiscard]] std::string GetFingerprint() const;
GpgSignature();
~GpgSignature();
explicit GpgSignature(gpgme_signature_t sig);
GpgSignature(GpgSignature &&) noexcept;
GpgSignature(const GpgSignature &) = delete;
GpgSignature &operator=(GpgSignature &&) noexcept;
GpgSignature &operator=(const GpgSignature &) = delete;
private:
using KeySignatrueRefHandler =
std::unique_ptr<struct _gpgme_signature,
std::function<void(gpgme_signature_t)>>;
KeySignatrueRefHandler signature_ref_ = nullptr;
};
} // namespace GpgFrontend
#endif // GPGFRONTEND_GPGSIGNATURE_H
GpgFrontend::GpgSignature::GetFingerprint
std::string GetFingerprint() const
Definition: GpgSignature.cpp:116
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::GpgSignature::GetValidity
gpgme_validity_t GetValidity() const
Definition: GpgSignature.cpp:53
GpgFrontend::GpgSignature
Definition: GpgSignature.h:43
GpgFrontend::GpgSignature::GetExpireTime
boost::posix_time::ptime GetExpireTime() const
Definition: GpgSignature.cpp:107
GpgFrontend::GpgSignature::~GpgSignature
~GpgSignature()
Destroy the Gpg Signature object.
GpgFrontend::GpgSignature::GetStatus
gpgme_error_t GetStatus() const
Definition: GpgSignature.cpp:62
GpgFrontend::GpgSignature::GetCreateTime
boost::posix_time::ptime GetCreateTime() const
Create a time object.
Definition: GpgSignature.cpp:98
GpgFrontend::GpgSignature::GetSummary
gpgme_error_t GetSummary() const
Definition: GpgSignature.cpp:71
GpgFrontend::GpgSignature::GetPubkeyAlgo
std::string GetPubkeyAlgo() const
Definition: GpgSignature.cpp:80
GpgFrontend::GpgSignature::GpgSignature
GpgSignature()
Construct a new Gpg Signature object.
GpgFrontend::GpgSignature::GetHashAlgo
std::string GetHashAlgo() const
Definition: GpgSignature.cpp:89