aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/AsyncUtils.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-18 12:58:37 +0000
committersaturneric <[email protected]>2024-01-18 12:58:37 +0000
commite0d2c4021483e6e1366c1050ccb5a30e53e172bb (patch)
tree5d85739479622e7c672aea45f84d4e2f577f9332 /src/core/utils/AsyncUtils.h
parentfix: correct a fault (diff)
downloadGpgFrontend-e0d2c4021483e6e1366c1050ccb5a30e53e172bb.tar.gz
GpgFrontend-e0d2c4021483e6e1366c1050ccb5a30e53e172bb.zip
fix: add test cases and solve discovered issues
Diffstat (limited to 'src/core/utils/AsyncUtils.h')
-rw-r--r--src/core/utils/AsyncUtils.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/core/utils/AsyncUtils.h b/src/core/utils/AsyncUtils.h
index e587fad2..4b5c4d69 100644
--- a/src/core/utils/AsyncUtils.h
+++ b/src/core/utils/AsyncUtils.h
@@ -43,11 +43,23 @@ namespace GpgFrontend {
* @param operation
* @param minial_version
*/
-auto GPGFRONTEND_CORE_EXPORT RunGpgOperaAsync(GpgOperaRunnable runnable,
- GpgOperationCallback callback,
- const QString& operation,
- const QString& minial_version)
- -> Thread::Task::TaskHandler;
+auto GPGFRONTEND_CORE_EXPORT
+RunGpgOperaAsync(const GpgOperaRunnable& runnable,
+ const GpgOperationCallback& callback, const QString& operation,
+ const QString& minial_version) -> Thread::Task::TaskHandler;
+
+/**
+ * @brief
+ *
+ * @param runnable
+ * @param operation
+ * @param minial_version
+ * @return std::tuple<GpgError, DataObjectPtr>
+ */
+auto GPGFRONTEND_CORE_EXPORT RunGpgOperaSync(const GpgOperaRunnable& runnable,
+ const QString& operation,
+ const QString& minial_version)
+ -> std::tuple<GpgError, DataObjectPtr>;
/**
* @brief
@@ -56,8 +68,8 @@ auto GPGFRONTEND_CORE_EXPORT RunGpgOperaAsync(GpgOperaRunnable runnable,
* @param callback
* @param operation
*/
-auto GPGFRONTEND_CORE_EXPORT RunIOOperaAsync(OperaRunnable runnable,
- OperationCallback callback,
+auto GPGFRONTEND_CORE_EXPORT RunIOOperaAsync(const OperaRunnable& runnable,
+ const OperationCallback& callback,
const QString& operation)
-> Thread::Task::TaskHandler;
} // namespace GpgFrontend \ No newline at end of file