GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
VersionCheckTask.h
1 
29 #pragma once
30 
31 #include <core/thread/Task.h>
32 #include <module/sdk/GpgFrontendModuleSDK.h>
33 
34 #include "SoftwareVersion.h"
35 
36 class QNetworkReply;
37 class QNetworkAccessManager;
38 
40 
46  Q_OBJECT
47  public:
53 
54  signals:
55 
62 
63  protected:
69  auto Run() -> int override;
70 
71  private slots:
72 
77  void slot_parse_latest_version_info();
78 
83  void slot_parse_current_version_info();
84 
85  private:
86  QByteArray latest_reply_bytes_;
87  QByteArray current_reply_bytes_;
88  QNetworkReply* latest_reply_ = nullptr;
89  QNetworkReply* current_reply_ = nullptr;
90  QNetworkAccessManager* network_manager_;
91  QString current_version_;
92  SoftwareVersion version_;
93 };
94 
95 } // namespace GpgFrontend::Module::Integrated::VersionCheckingModule
96  // GpgFrontend::Module::Custom::IntegradedModule::VersionCheckingModule
VersionCheckTask()
Construct a new Version Check Thread object.
Definition: VersionCheckTask.cpp:38
auto Run() -> int override
can be overwrite by subclass
Definition: VersionCheckTask.cpp:48
QNetworkReply * latest_reply_
latest version info reply
Definition: VersionCheckTask.h:88
QNetworkReply * current_reply_
current version info reply
Definition: VersionCheckTask.h:89
Definition: Task.h:39