2022-06-03 04:04:08 +05:30
|
|
|
#pragma once
|
|
|
|
|
2022-07-22 07:10:06 +05:30
|
|
|
#include "ConcurrentTask.h"
|
2022-06-03 04:04:08 +05:30
|
|
|
|
|
|
|
/* This task type will attempt to do run each of it's subtasks in sequence,
|
|
|
|
* until one of them succeeds. When that happens, the remaining tasks will not run.
|
|
|
|
* */
|
2022-07-22 07:10:06 +05:30
|
|
|
class MultipleOptionsTask : public ConcurrentTask {
|
2022-06-03 04:04:08 +05:30
|
|
|
Q_OBJECT
|
2022-07-22 07:10:06 +05:30
|
|
|
public:
|
|
|
|
explicit MultipleOptionsTask(QObject* parent = nullptr, const QString& task_name = "");
|
|
|
|
~MultipleOptionsTask() override = default;
|
2022-06-03 04:04:08 +05:30
|
|
|
|
2022-07-22 07:10:06 +05:30
|
|
|
private slots:
|
2022-06-03 04:04:08 +05:30
|
|
|
void startNext() override;
|
2022-07-22 07:10:06 +05:30
|
|
|
void updateState() override;
|
2022-06-03 04:04:08 +05:30
|
|
|
};
|