aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/KeyServerImportTask.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-01-23 07:21:28 +0000
committerGitHub <[email protected]>2024-01-23 07:21:28 +0000
commit56acf161d439ce73eceaa145c40fe703bb2c3f02 (patch)
treea5d4790a6b2efc8786a3c0f74a07f5a8032d4e94 /src/ui/thread/KeyServerImportTask.h
parentfix: use more secure cdn links (diff)
parentfix: solve issues on detected gnupg path function and fix linking errors on w... (diff)
downloadGpgFrontend-56acf161d439ce73eceaa145c40fe703bb2c3f02.tar.gz
GpgFrontend-56acf161d439ce73eceaa145c40fe703bb2c3f02.zip
Merge pull request #126 from saturneric/dev/2.1.1/main
Develop 2.1.2.1
Diffstat (limited to 'src/ui/thread/KeyServerImportTask.h')
-rw-r--r--src/ui/thread/KeyServerImportTask.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/src/ui/thread/KeyServerImportTask.h b/src/ui/thread/KeyServerImportTask.h
index 7d3b66c6..8797916c 100644
--- a/src/ui/thread/KeyServerImportTask.h
+++ b/src/ui/thread/KeyServerImportTask.h
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2021 Saturneric
+ * Copyright (C) 2021 Saturneric <[email protected]>
*
* This file is part of GpgFrontend.
*
@@ -19,17 +19,26 @@
* The initial version of the source code is inherited from
* the gpg4usb project, which is under GPL-3.0-or-later.
*
- * The source code version of this software was modified and released
- * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021.
+ * All the source code of GpgFrontend was modified and released by
+ * Saturneric <[email protected]> starting on May 12, 2021.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*
*/
-#ifndef GPGFRONTEND_KEYSERVERIMPORTTASK_H
-#define GPGFRONTEND_KEYSERVERIMPORTTASK_H
+#pragma once
+
+#include <qnetworkaccessmanager.h>
+#include <qnetworkreply.h>
+
+#include "core/thread/Task.h"
-#include "GpgFrontendUI.h"
+namespace GpgFrontend {
+class GpgImportInformation;
+}
namespace GpgFrontend::UI {
+
class KeyServerImportTask : public Thread::Task {
Q_OBJECT
public:
@@ -39,25 +48,23 @@ class KeyServerImportTask : public Thread::Task {
* @param keyserver_url
* @param search_string
*/
- KeyServerImportTask(std::string keyserver_url,
- std::vector<std::string> keyid);
-
- signals:
+ KeyServerImportTask(QString keyserver_url, std::vector<QString> keyid);
/**
* @brief
*
- * @param result
*/
- void SignalKeyServerImportResult(QNetworkReply::NetworkError reply,
- QByteArray buffer);
+ auto Run() -> int override;
+
+ signals:
- protected:
/**
* @brief
*
+ * @param result
*/
- void run() override;
+ void SignalKeyServerImportResult(bool, QString, QByteArray,
+ std::shared_ptr<GpgImportInformation>);
private slots:
@@ -68,13 +75,11 @@ class KeyServerImportTask : public Thread::Task {
void dealing_reply_from_server();
private:
- std::string keyserver_url_; ///<
- std::vector<std::string> keyids_; ///<
+ QString keyserver_url_; ///<
+ std::vector<QString> keyids_; ///<
int result_count_ = 0;
QNetworkAccessManager *manager_; ///<
QNetworkReply *reply_; ///<
};
} // namespace GpgFrontend::UI
-
-#endif // GPGFRONTEND_KEYSERVERIMPORTTASK_H \ No newline at end of file