added client version control
+ nlohmann/json library was included in the project. + VersionControl class was created and it checks if the client is up to date. + CLIENT_VERSION macro defined.
This commit is contained in:
19
user/network/VersionControl.h
Normal file
19
user/network/VersionControl.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
class VersionControl {
|
||||
public:
|
||||
VersionControl(const char* version_tag, const wchar_t* url);
|
||||
~VersionControl();
|
||||
|
||||
const char* GetCurrentVersionTag();
|
||||
void CheckForUpdate();
|
||||
bool IsUpToDate();
|
||||
const char* GetLatestDownloadLink();
|
||||
private:
|
||||
const char* latestDownloadLink;
|
||||
bool isUpToDate;
|
||||
const char* current_version_tag;
|
||||
const wchar_t* requestUrl;
|
||||
private:
|
||||
void SetIsUpToDate(bool value);
|
||||
};
|
||||
Reference in New Issue
Block a user