aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/common/CoreCommonUtil.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-02-07 07:16:45 +0000
committerSaturneric <[email protected]>2023-02-07 07:16:45 +0000
commita49c6605244d656d4a4b72e95fbbcbe83372d363 (patch)
treeba28d451a0c78041f36e0e8be7ca30114ddce4ef /src/core/common/CoreCommonUtil.h
parentfeat: add a custom pinentry hook for sandbox mode in macOS (diff)
downloadGpgFrontend-a49c6605244d656d4a4b72e95fbbcbe83372d363.tar.gz
GpgFrontend-a49c6605244d656d4a4b72e95fbbcbe83372d363.zip
feat: use custom password dialog now
Diffstat (limited to 'src/core/common/CoreCommonUtil.h')
-rw-r--r--src/core/common/CoreCommonUtil.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/common/CoreCommonUtil.h b/src/core/common/CoreCommonUtil.h
index 3762c4f0..6cbf6405 100644
--- a/src/core/common/CoreCommonUtil.h
+++ b/src/core/common/CoreCommonUtil.h
@@ -27,6 +27,8 @@
#ifndef GPGFRONTEND_CORECOMMONUTIL_H
#define GPGFRONTEND_CORECOMMONUTIL_H
+#include <string>
+
#include "core/GpgFrontendCore.h"
namespace GpgFrontend {
@@ -46,6 +48,27 @@ class GPGFRONTEND_CORE_EXPORT CoreCommonUtil : public QObject {
*/
CoreCommonUtil() = default;
+ /**
+ * @brief set a temp cache under a certain key
+ *
+ */
+ void SetTempCacheValue(const std::string, const std::string);
+
+ /**
+ * @brief after get the temp cache, its value will be imediately ease in
+ * storage
+ *
+ * @return std::string
+ */
+ std::string GetTempCacheValue(const std::string);
+
+ /**
+ * @brief imediately ease temp cache in storage
+ *
+ * @return std::string
+ */
+ void ResetTempCacheValue(const std::string);
+
signals:
/**
@@ -56,6 +79,7 @@ class GPGFRONTEND_CORE_EXPORT CoreCommonUtil : public QObject {
private:
static std::unique_ptr<CoreCommonUtil> instance_; ///<
+ std::map<std::string, std::string> temp_cache_; //<
};
} // namespace GpgFrontend