aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/gpg/GpgAdvancedOperator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/function/gpg/GpgAdvancedOperator.h')
-rw-r--r--src/core/function/gpg/GpgAdvancedOperator.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/core/function/gpg/GpgAdvancedOperator.h b/src/core/function/gpg/GpgAdvancedOperator.h
index 57279adb..1099c3b3 100644
--- a/src/core/function/gpg/GpgAdvancedOperator.h
+++ b/src/core/function/gpg/GpgAdvancedOperator.h
@@ -32,19 +32,29 @@
#pragma once
+#include "core/function/basic/GpgFunctionObject.h"
+#include "core/function/gpg/GpgCommandExecutor.h"
#include "core/model/DataObject.h"
namespace GpgFrontend {
-class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator {
+class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
+ : public SingletonFunctionObject<GpgAdvancedOperator> {
public:
/**
+ * @brief Construct a new Gpg Advanced Operator object
+ *
+ * @param channel
+ */
+ explicit GpgAdvancedOperator(int channel);
+
+ /**
* @brief
*
* @return true
* @return false
*/
- static void ClearGpgPasswordCache(OperationCallback);
+ auto ClearGpgPasswordCache() -> bool;
/**
* @brief
@@ -52,7 +62,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator {
* @return true
* @return false
*/
- static void ReloadGpgComponents(OperationCallback);
+ auto ReloadAllGpgComponents() -> bool;
/**
* @brief
@@ -60,7 +70,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator {
* @return true
* @return false
*/
- static void RestartGpgComponents(OperationCallback);
+ auto RestartGpgComponents() -> bool;
/**
* @brief
@@ -68,7 +78,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator {
* @return true
* @return false
*/
- static void ResetConfigures(OperationCallback);
+ auto ResetConfigures() -> bool;
/**
* @brief
@@ -76,13 +86,17 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator {
* @return true
* @return false
*/
- static void LaunchGpgComponents(OperationCallback);
+ auto LaunchAllGpgComponents() -> bool;
/**
* @brief
*
*/
- static void KillAllGpgComponents(OperationCallback);
+ auto KillAllGpgComponents() -> bool;
+
+ private:
+ GpgCommandExecutor& exec_ =
+ GpgCommandExecutor::GetInstance(SingletonFunctionObject::GetChannel());
};
} // namespace GpgFrontend