31 #include "core/model/GpgSubKey.h"
32 #include "core/model/GpgUID.h"
40 class GPGFRONTEND_CORE_EXPORT
GpgKey {
41 Q_DECLARE_TR_FUNCTIONS(
GpgKey)
49 [[nodiscard]]
auto IsGood()
const -> bool;
56 [[nodiscard]]
auto GetId()
const -> QString;
63 [[nodiscard]]
auto GetName()
const -> QString;
70 [[nodiscard]]
auto GetEmail()
const -> QString;
77 [[nodiscard]]
auto GetComment()
const -> QString;
84 [[nodiscard]]
auto GetFingerprint()
const -> QString;
91 [[nodiscard]]
auto GetProtocol()
const -> QString;
98 [[nodiscard]]
auto GetOwnerTrust()
const -> QString;
105 [[nodiscard]]
auto GetOwnerTrustLevel()
const -> int;
112 [[nodiscard]]
auto GetPublicKeyAlgo()
const -> QString;
119 [[nodiscard]]
auto GetKeyAlgo()
const -> QString;
126 [[nodiscard]]
auto GetLastUpdateTime()
const -> QDateTime;
133 [[nodiscard]]
auto GetExpireTime()
const -> QDateTime;
140 [[nodiscard]]
auto GetCreateTime()
const -> QDateTime;
147 [[nodiscard]]
auto GetPrimaryKeyLength()
const ->
unsigned int;
155 [[nodiscard]]
auto IsHasEncryptionCapability()
const -> bool;
164 [[nodiscard]]
auto IsHasActualEncryptionCapability()
const -> bool;
172 [[nodiscard]]
auto IsHasSigningCapability()
const -> bool;
180 [[nodiscard]]
auto IsHasActualSigningCapability()
const -> bool;
188 [[nodiscard]]
auto IsHasCertificationCapability()
const -> bool;
196 [[nodiscard]]
auto IsHasActualCertificationCapability()
const -> bool;
204 [[nodiscard]]
auto IsHasAuthenticationCapability()
const -> bool;
212 [[nodiscard]]
auto IsHasActualAuthenticationCapability()
const -> bool;
220 [[nodiscard]]
auto IsHasCardKey()
const -> bool;
228 [[nodiscard]]
auto IsPrivateKey()
const -> bool;
236 [[nodiscard]]
auto IsExpired()
const -> bool;
244 [[nodiscard]]
auto IsRevoked()
const -> bool;
252 [[nodiscard]]
auto IsDisabled()
const -> bool;
260 [[nodiscard]]
auto IsHasMasterKey()
const -> bool;
267 [[nodiscard]]
auto GetSubKeys()
const
268 -> std::unique_ptr<std::vector<GpgSubKey>>;
275 [[nodiscard]]
auto GetUIDs()
const -> std::unique_ptr<std::vector<GpgUID>>;
288 explicit GpgKey(gpgme_key_t&& key);
339 auto operator=(const gpgme_key_t&) ->
GpgKey& = delete;
348 auto operator==(const
GpgKey&) const ->
bool;
357 auto operator<=(const
GpgKey&) const ->
bool;
364 explicit operator gpgme_key_t() const;
372 void operator()(gpgme_key_t _key);
375 using KeyRefHandler = std::unique_ptr<struct _gpgme_key, KeyRefDeleter>;
377 KeyRefHandler key_ref_ =
nullptr;
GpgKey(const gpgme_key_t &key)=delete
Construct a new Gpg Key object.
~GpgKey()=default
Destroy the Gpg Key objects.
GpgKey()=default
Construct a new Gpg Key object.