mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Cleanup downloaders
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
e897032383
commit
f36be3f0e3
11 changed files with 132 additions and 401 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue