aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/gpg/GpgCommandExecutor.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-02-17 19:08:53 +0000
committerSaturneric <[email protected]>2023-02-17 19:08:53 +0000
commitda1004ab71c382bde8af2b584e693426227abe0e (patch)
treea0166f4a5404f5b0d6944cc4a7cffecd3e2eaf86 /src/core/function/gpg/GpgCommandExecutor.h
parentfix: solve command executor memory problem (diff)
downloadGpgFrontend-da1004ab71c382bde8af2b584e693426227abe0e.tar.gz
GpgFrontend-da1004ab71c382bde8af2b584e693426227abe0e.zip
feat: improve task execute system
Diffstat (limited to 'src/core/function/gpg/GpgCommandExecutor.h')
-rw-r--r--src/core/function/gpg/GpgCommandExecutor.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/function/gpg/GpgCommandExecutor.h b/src/core/function/gpg/GpgCommandExecutor.h
index c597feac..da0e7a8b 100644
--- a/src/core/function/gpg/GpgCommandExecutor.h
+++ b/src/core/function/gpg/GpgCommandExecutor.h
@@ -55,7 +55,7 @@ class GPGFRONTEND_CORE_EXPORT GpgCommandExecutor
int channel = SingletonFunctionObject::GetDefaultChannel());
/**
- * @brief Excuting an order
+ * @brief Excuting a command
*
* @param arguments Command parameters
* @param interact_func Command answering function
@@ -66,6 +66,11 @@ class GPGFRONTEND_CORE_EXPORT GpgCommandExecutor
[](int, std::string, std::string) {},
std::function<void(QProcess *)> interact_func = [](QProcess *) {});
+ void ExecuteConcurrently(
+ std::string cmd, std::vector<std::string> arguments,
+ std::function<void(int, std::string, std::string)> callback,
+ std::function<void(QProcess *)> interact_func = [](QProcess *) {});
+
private:
GpgContext &ctx_ = GpgContext::GetInstance(
SingletonFunctionObject::GetChannel()); ///< Corresponding context