GpgKeySignature.h
#ifndef GPGFRONTEND_GPGKEYSIGNATURE_H
#define GPGFRONTEND_GPGKEYSIGNATURE_H
#include <boost/date_time.hpp>
#include <string>
#include "core/GpgConstants.h"
namespace GpgFrontend {
class GPGFRONTEND_CORE_EXPORT GpgKeySignature {
public:
[[nodiscard]] bool IsRevoked() const;
[[nodiscard]] bool IsExpired() const;
[[nodiscard]] bool IsInvalid() const;
[[nodiscard]] bool IsExportable() const;
[[nodiscard]] gpgme_error_t GetStatus() const;
[[nodiscard]] std::string GetKeyID() const;
[[nodiscard]] std::string GetPubkeyAlgo() const;
[[nodiscard]] boost::posix_time::ptime GetCreateTime() const;
[[nodiscard]] boost::posix_time::ptime GetExpireTime() const;
[[nodiscard]] std::string GetUID() const;
[[nodiscard]] std::string GetName() const;
[[nodiscard]] std::string GetEmail() const;
[[nodiscard]] std::string GetComment() const;
GpgKeySignature();
~GpgKeySignature();
explicit GpgKeySignature(gpgme_key_sig_t sig);
GpgKeySignature(GpgKeySignature &&) noexcept;
GpgKeySignature(const GpgKeySignature &) = delete;
GpgKeySignature &operator=(GpgKeySignature &&) noexcept;
GpgKeySignature &operator=(const GpgKeySignature &) = delete;
private:
using KeySignatrueRefHandler =
std::unique_ptr<struct _gpgme_key_sig,
std::function<void(gpgme_key_sig_t)>>;
KeySignatrueRefHandler signature_ref_ = nullptr;
};
} // namespace GpgFrontend
#endif // GPGFRONTEND_GPGKEYSIGNATURE_H
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::GpgKeySignature::~GpgKeySignature
~GpgKeySignature()
Destroy the Gpg Key Signature object.
GpgFrontend::GpgKeySignature::GetPubkeyAlgo
std::string GetPubkeyAlgo() const
Definition: GpgKeySignature.cpp:68
GpgFrontend::GpgKeySignature
Definition: GpgKeySignature.h:47
GpgFrontend::GpgKeySignature::IsExportable
bool IsExportable() const
Definition: GpgKeySignature.cpp:56
GpgFrontend::GpgKeySignature::GetStatus
gpgme_error_t GetStatus() const
Definition: GpgKeySignature.cpp:60
GpgFrontend::GpgKeySignature::GetCreateTime
boost::posix_time::ptime GetCreateTime() const
Create a time object.
Definition: GpgKeySignature.cpp:72
GpgFrontend::GpgKeySignature::GetExpireTime
boost::posix_time::ptime GetExpireTime() const
Definition: GpgKeySignature.cpp:76
GpgFrontend::GpgKeySignature::IsExpired
bool IsExpired() const
Definition: GpgKeySignature.cpp:48
GpgFrontend::GpgKeySignature::GetComment
std::string GetComment() const
Definition: GpgKeySignature.cpp:92
GpgFrontend::GpgKeySignature::GetEmail
std::string GetEmail() const
Definition: GpgKeySignature.cpp:88
GpgFrontend::GpgKeySignature::IsInvalid
bool IsInvalid() const
Definition: GpgKeySignature.cpp:52
GpgFrontend::GpgKeySignature::GetName
std::string GetName() const
Definition: GpgKeySignature.cpp:84
GpgFrontend::GpgKeySignature::GpgKeySignature
GpgKeySignature()
Construct a new Gpg Key Signature object.
GpgFrontend::GpgKeySignature::GetKeyID
std::string GetKeyID() const
Definition: GpgKeySignature.cpp:64
GpgFrontend::GpgKeySignature::GetUID
std::string GetUID() const
Definition: GpgKeySignature.cpp:80