Cleanup downloaders
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
30
launcher/java/JavaRuntime.h
Normal file
30
launcher/java/JavaRuntime.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QString>
|
||||
|
||||
#include "java/JavaVersion.h"
|
||||
|
||||
namespace JavaRuntime {
|
||||
|
||||
enum class DownloadType { Manifest, Archive };
|
||||
|
||||
struct Meta {
|
||||
QString name;
|
||||
QString vendor;
|
||||
QString url;
|
||||
QDateTime releaseTime;
|
||||
QString checksumType;
|
||||
QString checksumHash;
|
||||
bool recommended;
|
||||
DownloadType downloadType;
|
||||
QString packageType;
|
||||
JavaVersion version;
|
||||
};
|
||||
using MetaPtr = std::shared_ptr<Meta>;
|
||||
|
||||
DownloadType parseDownloadType(QString javaDownload);
|
||||
QString downloadTypeToString(DownloadType javaDownload);
|
||||
MetaPtr parseJavaMeta(const QJsonObject& libObj);
|
||||
|
||||
} // namespace JavaRuntime
|
||||
Reference in New Issue
Block a user