aboutsummaryrefslogtreecommitdiffstats
path: root/include/gpg/GpgModel.h
diff options
context:
space:
mode:
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