diff options
author | Saturneric <[email protected]> | 2021-08-29 10:49:58 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-08-29 10:49:58 +0000 |
commit | daaa83549d42395161e34a40e18c3615801b1501 (patch) | |
tree | 7ae4c67a31e9eea8a7bda4719fbdac3ac2e730a9 /include/gpg/GpgModel.h | |
parent | Update version settings. (diff) | |
download | GpgFrontend-daaa83549d42395161e34a40e18c3615801b1501.tar.gz GpgFrontend-daaa83549d42395161e34a40e18c3615801b1501.zip |
Start to rewrite gpg core.
Diffstat (limited to '')
-rw-r--r-- | include/gpg/GpgModel.h (renamed from include/gpg/GpgSubKey.h) | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/include/gpg/GpgSubKey.h b/include/gpg/GpgModel.h index f2da9e9e..c0cb7ec3 100644 --- a/include/gpg/GpgSubKey.h +++ b/include/gpg/GpgModel.h @@ -21,44 +21,26 @@ * by Saturneric<[email protected]> starting on May 12, 2021. * */ -#ifndef GPGFRONTEND_GPGSUBKEY_H -#define GPGFRONTEND_GPGSUBKEY_H -#include "GpgFrontend.h" +#ifndef GPGFRONTEND_ZH_CN_TS_GPGMODEL_H +#define GPGFRONTEND_ZH_CN_TS_GPGMODEL_H -struct GpgSubKey { +#include "gpg/model/GpgKey.h" +#include "gpg/model/GpgSubKey.h" +#include "gpg/model/GpgKeySignature.h" +#include "gpg/model/GpgUID.h" - QString id; - QString fpr; +namespace GpgFrontend { - QString pubkey_algo; + using KeyIdArgsList = std::span<std::string>; - unsigned int length; + using KeyFprArgsList = std::span<std::string>; - bool can_encrypt{}; - bool can_sign{}; - bool can_certify{}; - bool can_authenticate{}; + using KeyArgsList = std::span<GpgKey>; + using KeyPtr = std::unique_ptr<GpgKey>; - bool is_private_key{}; - bool expired{}; - bool revoked{}; - bool disabled{}; - bool secret{}; - bool is_cardkey{}; + using KeyPtrArgsList = std::initializer_list<KeyPtr>; +} - QDateTime timestamp; - QDateTime expires; - - explicit GpgSubKey(gpgme_subkey_t key = nullptr); - - GpgSubKey(GpgSubKey &&) noexcept = default; - GpgSubKey(const GpgSubKey &) = default; - GpgSubKey& operator=(GpgSubKey &&) noexcept = default; - GpgSubKey& operator=(const GpgSubKey &) = default; - -}; - - -#endif //GPGFRONTEND_GPGSUBKEY_H +#endif //GPGFRONTEND_ZH_CN_TS_GPGMODEL_H |