GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
VersionCheckTask.h
1 
29 #ifndef GPGFRONTEND_VERSIONCHECKTHREAD_H
30 #define GPGFRONTEND_VERSIONCHECKTHREAD_H
31 
32 #include <memory>
33 #include <string>
34 
35 #include "core/thread/Task.h"
36 #include "ui/GpgFrontendUI.h"
37 #include "ui/struct/SoftwareVersion.h"
38 
39 namespace GpgFrontend::UI {
40 
46  Q_OBJECT
47 
48  public:
53  explicit VersionCheckTask();
54 
55  signals:
56 
63 
64  protected:
70  void Run() override;
71 
72  private slots:
73 
78  void slot_parse_latest_version_info();
79 
84  void slot_parse_current_version_info();
85 
86  private:
87  QByteArray latest_reply_bytes_;
88  QByteArray current_reply_bytes_;
89  QNetworkReply* latest_reply_ = nullptr;
90  QNetworkReply* current_reply_ = nullptr;
91  QNetworkAccessManager* network_manager_;
92  std::string current_version_;
93  SoftwareVersion version_;
94 };
95 
96 } // namespace GpgFrontend::UI
97 
98 #endif // GPGFRONTEND_VERSIONCHECKTHREAD_H
Definition: Task.h:45
Definition: VersionCheckTask.h:45
void SignalUpgradeVersion(SoftwareVersion version)
void Run() override
Run - run the task.
Definition: VersionCheckTask.cpp:47
QNetworkReply * current_reply_
current version info reply
Definition: VersionCheckTask.h:90
VersionCheckTask()
Construct a new Version Check Thread object.
Definition: VersionCheckTask.cpp:38
QNetworkReply * latest_reply_
latest version info reply
Definition: VersionCheckTask.h:89
Definition: FileReadTask.cpp:29
Definition: SoftwareVersion.h:39