aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/gpg/GpgAdvancedOperator.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-28 18:46:15 +0000
committersaturneric <[email protected]>2023-10-28 18:46:15 +0000
commitfd46d4667611c0db9cea3f06205727399b6fb5fd (patch)
tree8755059620d00d1690673d963cd0d913df92ae1c /src/core/function/gpg/GpgAdvancedOperator.h
parentfeat: introduce clang-tidy config and modify clang-format config (diff)
downloadGpgFrontend-fd46d4667611c0db9cea3f06205727399b6fb5fd.tar.gz
GpgFrontend-fd46d4667611c0db9cea3f06205727399b6fb5fd.zip
refactor: start to tidy up code using clang-tidy
Diffstat (limited to 'src/core/function/gpg/GpgAdvancedOperator.h')
-rw-r--r--src/core/function/gpg/GpgAdvancedOperator.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/core/function/gpg/GpgAdvancedOperator.h b/src/core/function/gpg/GpgAdvancedOperator.h
index 1e55370b..fbd6f6ef 100644
--- a/src/core/function/gpg/GpgAdvancedOperator.h
+++ b/src/core/function/gpg/GpgAdvancedOperator.h
@@ -32,30 +32,17 @@
#pragma once
-#include "core/GpgConstants.h"
-#include "core/GpgContext.h"
-#include "core/GpgFunctionObject.h"
-
namespace GpgFrontend {
-class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
- : public SingletonFunctionObject<GpgAdvancedOperator> {
+class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator {
public:
/**
- * @brief Construct a new Basic Operator object
- *
- * @param channel Channel corresponding to the context
- */
- explicit GpgAdvancedOperator(
- int channel = SingletonFunctionObject::GetDefaultChannel());
-
- /**
* @brief
*
* @return true
* @return false
*/
- bool ClearGpgPasswordCache();
+ static auto ClearGpgPasswordCache() -> bool;
/**
* @brief
@@ -63,7 +50,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
* @return true
* @return false
*/
- bool ReloadGpgComponents();
+ static auto ReloadGpgComponents() -> bool;
/**
* @brief
@@ -71,7 +58,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
* @return true
* @return false
*/
- void RestartGpgComponents();
+ static void RestartGpgComponents();
/**
* @brief
@@ -79,7 +66,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
* @return true
* @return false
*/
- bool ResetConfigures();
+ static auto ResetConfigures() -> bool;
/**
* @brief
@@ -87,7 +74,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
* @return true
* @return false
*/
- bool StartGpgAgent();
+ static auto StartGpgAgent() -> bool;
/**
* @brief
@@ -95,7 +82,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
* @return true
* @return false
*/
- bool StartDirmngr();
+ static auto StartDirmngr() -> bool;
/**
* @brief
@@ -103,11 +90,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator
* @return true
* @return false
*/
- bool StartKeyBoxd();
-
- private:
- GpgContext& ctx_ = GpgContext::GetInstance(
- SingletonFunctionObject::GetChannel()); ///< Corresponding context
+ static auto StartKeyBoxd() -> bool;
};
} // namespace GpgFrontend