Added dependencies to the APIs

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-04-10 00:04:35 +03:00
parent 95842ee25f
commit 6d5c629b43
3 changed files with 58 additions and 2 deletions

View File

@ -32,6 +32,8 @@ enum class ResourceProvider { MODRINTH, FLAME };
enum class ResourceType { MOD, RESOURCE_PACK, SHADER_PACK };
enum class DependencyType { REQUIRED, OPTIONAL, INCOMPATIBLE, EMBEDDED, TOOL, INCLUDE };
class ProviderCapabilities {
public:
auto name(ResourceProvider) -> const char*;
@ -51,6 +53,12 @@ struct DonationData {
QString url;
};
struct Dependency {
QVariant addonId;
DependencyType type;
QString version;
};
struct IndexedVersion {
QVariant addonId;
QVariant fileId;
@ -65,6 +73,7 @@ struct IndexedVersion {
QString hash;
bool is_preferred = true;
QString changelog;
QList<Dependency> dependencies;
// For internal use, not provided by APIs
bool is_currently_selected = false;