diff options
author | Saturneric <[email protected]> | 2021-09-05 15:02:19 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-09-05 15:02:19 +0000 |
commit | 39440522111abf3adeef6b56cb23722119fbf3c2 (patch) | |
tree | 5979b3808d58c8c576e288004877d826556b4cda /src/gpg/function/UidOperator.h | |
parent | Modified ResultAnalyse. (diff) | |
download | GpgFrontend-39440522111abf3adeef6b56cb23722119fbf3c2.tar.gz GpgFrontend-39440522111abf3adeef6b56cb23722119fbf3c2.zip |
Rewrite the core.
Adjust the structure.
Diffstat (limited to '')
-rw-r--r-- | src/gpg/function/UidOperator.h (renamed from include/gpg/function/UidOperator.h) | 64 |
1 files changed, 29 insertions, 35 deletions
diff --git a/include/gpg/function/UidOperator.h b/src/gpg/function/UidOperator.h index 352f210e..d5bbcb3b 100644 --- a/include/gpg/function/UidOperator.h +++ b/src/gpg/function/UidOperator.h @@ -25,47 +25,41 @@ #ifndef GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H #define GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H -#include "GpgFrontend.h" -#include "gpg/GpgModel.h" #include "gpg/GpgContext.h" +#include "gpg/GpgModel.h" namespace GpgFrontend { - class UidOperator { - public: - - /** - * create a new uid in certain key pair - * @param key target key pair - * @param uid uid args - * @return if successful - */ - bool addUID(const GpgKey &key, const GpgUID &uid); - - /** - * Revoke(Delete) UID from certain key pair - * @param key target key pair - * @param uid target uid - * @return if successful - */ - bool revUID(const GpgKey &key, const GpgUID &uid); - - - /** - * Set one of a uid of a key pair as primary - * @param key target key pair - * @param uid target uid - * @return if successful - */ - bool setPrimaryUID(const GpgKey &key, const GpgUID &uid); - - private: +class UidOperator { +public: + /** + * create a new uid in certain key pair + * @param key target key pair + * @param uid uid args + * @return if successful + */ + bool addUID(const GpgKey &key, const GpgUID &uid); - GpgContext &ctx = GpgContext::getInstance(); + /** + * Revoke(Delete) UID from certain key pair + * @param key target key pair + * @param uid target uid + * @return if successful + */ + bool revUID(const GpgKey &key, const GpgUID &uid); - }; + /** + * Set one of a uid of a key pair as primary + * @param key target key pair + * @param uid target uid + * @return if successful + */ + bool setPrimaryUID(const GpgKey &key, const GpgUID &uid); -} +private: + GpgContext &ctx = GpgContext::GetInstance(); +}; +} // namespace GpgFrontend -#endif //GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H +#endif // GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H |