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/function/GpgKeyGetter.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/function/GpgKeyGetter.h (renamed from include/gpg/GpgUID.h) | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/include/gpg/GpgUID.h b/include/gpg/function/GpgKeyGetter.h index 6fb09446..87307f1b 100644 --- a/include/gpg/GpgUID.h +++ b/include/gpg/function/GpgKeyGetter.h @@ -22,39 +22,34 @@ * */ -#ifndef GPGFRONTEND_GPGUID_H -#define GPGFRONTEND_GPGUID_H - -#include <utility> +#ifndef GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H +#define GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H #include "GpgFrontend.h" -#include "GpgKeySignature.h" +#include "gpg/GpgModel.h" +#include "gpg/GpgContext.h" +#include "gpg/GpgFunctionObject.h" -struct GpgUID { +namespace GpgFrontend { - QString name{}; + class GpgKeyGetter : public SingletonFunctionObject<GpgKeyGetter>{ - QString email{}; + public: - QString comment{}; + GpgKey &&getKey(const std::string &fpr); - QString uid{}; + GpgKey &&getPubkey(const std::string &fpr); - bool revoked{}; + GpgKeyGetter() = default; - bool invalid{}; + private: - QVector<GpgKeySignature> signatures; + GpgContext &ctx = GpgContext::getInstance(); - GpgUID() = default; + }; +} - explicit GpgUID(gpgme_user_id_t user_id); - GpgUID(GpgUID &&) noexcept = default; - GpgUID(const GpgUID &) = default; - GpgUID& operator=(GpgUID &&) noexcept = default; - GpgUID& operator=(const GpgUID &) = default; -}; -#endif //GPGFRONTEND_GPGUID_H
\ No newline at end of file +#endif //GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H |