GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
KeyServerImportTask.h
1 
29 #pragma once
30 
31 #include <qnetworkaccessmanager.h>
32 #include <qnetworkreply.h>
33 
34 #include "core/thread/Task.h"
35 
36 namespace GpgFrontend {
37 class GpgImportInformation;
38 }
39 
40 namespace GpgFrontend::UI {
41 
43  Q_OBJECT
44  public:
51  KeyServerImportTask(QString keyserver_url, std::vector<QString> keyid);
52 
57  auto Run() -> int override;
58 
59  signals:
60 
66  void SignalKeyServerImportResult(bool, QString, QByteArray,
67  std::shared_ptr<GpgImportInformation>);
68 
69  private slots:
70 
75  void dealing_reply_from_server();
76 
77  private:
78  QString keyserver_url_;
79  std::vector<QString> keyids_;
80  int result_count_ = 0;
81 
82  QNetworkAccessManager *manager_;
83  QNetworkReply *reply_;
84 };
85 } // namespace GpgFrontend::UI
Definition: Task.h:39
Definition: KeyServerImportTask.h:42
void SignalKeyServerImportResult(bool, QString, QByteArray, std::shared_ptr< GpgImportInformation >)
auto Run() -> int override
can be overwrite by subclass
Definition: KeyServerImportTask.cpp:51
KeyServerImportTask(QString keyserver_url, std::vector< QString > keyid)
Construct a new Key Server Search Task object.
Definition: KeyServerImportTask.cpp:35
Definition: FileReadTask.cpp:31
Definition: app.cpp:39