ListedKeyServerTestTask.h
#ifndef GPGFRONTEND_LISTEDKEYSERVERTESTTHREAD_H
#define GPGFRONTEND_LISTEDKEYSERVERTESTTHREAD_H
#include "GpgFrontendUI.h"
namespace GpgFrontend::UI {
class ListedKeyServerTestTask : public Thread::Task {
Q_OBJECT
public:
enum KeyServerTestResultType {
kTestResultType_Success,
kTestResultType_Timeout,
kTestResultType_Error,
};
explicit ListedKeyServerTestTask(const QStringList& urls, int timeout,
QWidget* parent = nullptr);
signals:
void SignalKeyServerListTestResult(
std::vector<KeyServerTestResultType> result);
protected:
void run() override;
private:
QStringList urls_;
std::vector<KeyServerTestResultType> result_;
QNetworkAccessManager* network_manager_;
int timeout_ = 500;
int result_count_ = 0;
void slot_process_network_reply(int index, QNetworkReply* reply);
};
} // namespace GpgFrontend::UI
class TestListedKeyServerThread {};
#endif // GPGFRONTEND_LISTEDKEYSERVERTESTTHREAD_H
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::UI::ListedKeyServerTestTask::SignalKeyServerListTestResult
void SignalKeyServerListTestResult(std::vector< KeyServerTestResultType > result)
GpgFrontend::UI::ListedKeyServerTestTask::ListedKeyServerTestTask
ListedKeyServerTestTask(const QStringList &urls, int timeout, QWidget *parent=nullptr)
Definition: ListedKeyServerTestTask.cpp:31
GpgFrontend::UI::ListedKeyServerTestTask::slot_process_network_reply
void slot_process_network_reply(int index, QNetworkReply *reply)
Definition: ListedKeyServerTestTask.cpp:73
GpgFrontend::Thread::Task
Definition: Task.h:45
TestListedKeyServerThread
Definition: ListedKeyServerTestTask.h:83
GpgFrontend::UI::ListedKeyServerTestTask
Definition: ListedKeyServerTestTask.h:37