diff options
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 |