aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/function/GpgKeyManager.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-09-05 15:02:19 +0000
committerSaturneric <[email protected]>2021-09-05 15:02:19 +0000
commit39440522111abf3adeef6b56cb23722119fbf3c2 (patch)
tree5979b3808d58c8c576e288004877d826556b4cda /src/gpg/function/GpgKeyManager.h
parentModified ResultAnalyse. (diff)
downloadGpgFrontend-39440522111abf3adeef6b56cb23722119fbf3c2.tar.gz
GpgFrontend-39440522111abf3adeef6b56cb23722119fbf3c2.zip
Rewrite the core.
Adjust the structure.
Diffstat (limited to '')
-rw-r--r--src/gpg/function/GpgKeyManager.h (renamed from include/gpg/function/GpgKeyManager.h)45
1 files changed, 20 insertions, 25 deletions
diff --git a/include/gpg/function/GpgKeyManager.h b/src/gpg/function/GpgKeyManager.h
index 0c11e1dc..87557baf 100644
--- a/include/gpg/function/GpgKeyManager.h
+++ b/src/gpg/function/GpgKeyManager.h
@@ -22,41 +22,36 @@
*
*/
-
#ifndef GPGFRONTEND_ZH_CN_TS_GPGKEYMANAGER_H
#define GPGFRONTEND_ZH_CN_TS_GPGKEYMANAGER_H
-#include "GpgFrontend.h"
-#include "gpg/GpgModel.h"
#include "gpg/GpgContext.h"
#include "gpg/GpgFunctionObject.h"
+#include "gpg/GpgModel.h"
namespace GpgFrontend {
- class GpgKeyManager : public SingletonFunctionObject<GpgKeyManager> {
- public:
-
- /**
- * Sign a key pair(actually a certain uid)
- * @param target target key pair
- * @param uid target
- * @param expires expire date and time of the signature
- * @return if successful
- */
- bool signKey(const GpgKey &target, KeyArgsList &keys, const QString &uid,
- std::unique_ptr<QDateTime> &expires);
-
- bool revSign(const GpgKey &key, const GpgKeySignature &signature);
-
- bool setExpire(const GpgKey &key, std::unique_ptr<GpgSubKey> &subkey, std::unique_ptr<QDateTime> &expires);
-
- private:
+class GpgKeyManager : public SingletonFunctionObject<GpgKeyManager> {
+public:
+ /**
+ * Sign a key pair(actually a certain uid)
+ * @param target target key pair
+ * @param uid target
+ * @param expires expire date and time of the signature
+ * @return if successful
+ */
+ bool signKey(const GpgKey &target, KeyArgsList &keys, const QString &uid,
+ std::unique_ptr<QDateTime> &expires);
- GpgContext &ctx = GpgContext::getInstance();
+ bool revSign(const GpgKey &key, const GpgKeySignature &signature);
- };
+ bool setExpire(const GpgKey &key, std::unique_ptr<GpgSubKey> &subkey,
+ std::unique_ptr<QDateTime> &expires);
-}
+private:
+ GpgContext &ctx = GpgContext::GetInstance();
+};
+} // namespace GpgFrontend
-#endif //GPGFRONTEND_ZH_CN_TS_GPGKEYMANAGER_H
+#endif // GPGFRONTEND_ZH_CN_TS_GPGKEYMANAGER_H