Cleanup downloaders

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-01-25 22:58:12 +02:00
parent e897032383
commit f36be3f0e3
11 changed files with 132 additions and 401 deletions

View 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