aboutsummaryrefslogtreecommitdiff
path: root/include/Package.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-18 07:05:43 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit6bb79ef033c2a2e8f12c9da6409e3547af40417c (patch)
tree6fe6c5bea99cc0b38af92a7aa4714e5614de4868 /include/Package.hpp
parent4e38f2af2b97850ec5b395d4e0ea8310e664e52f (diff)
Use ranges for dependency version
Diffstat (limited to 'include/Package.hpp')
-rw-r--r--include/Package.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/Package.hpp b/include/Package.hpp
index dbae5f2..72652be 100644
--- a/include/Package.hpp
+++ b/include/Package.hpp
@@ -4,6 +4,7 @@
#include "../external/rapidjson/document.h"
#include "Platform.hpp"
#include "Result.hpp"
+#include "Version.hpp"
#include <string>
#include <vector>
@@ -30,7 +31,7 @@ namespace sibs
struct PackageMetadata
{
std::string description;
- std::string version;
+ PackageVersion version;
std::vector<std::string> platforms;
std::vector<std::string> urls;
};
@@ -45,11 +46,10 @@ namespace sibs
static Result<rapidjson::Document*> getPackageList(const char *url);
/*
- * Return the first url in list.
+ * Return the package data for the package we can use
* TODO: If we fail to fetch package from first url, try other other ones in the list (or if the first url is too slow / takes too long to respond).
- * TODO: Add version matching with wildcard etc. If we specify "1.2.*", then it should get the latest version that matches; etc...
*/
- static Result<std::string> getPackageUrl(const char *packageName, const char *packageVersion, Platform platform);
+ static Result<PackageMetadata> getPackage(const char *packageName, const PackageVersionRange &versionRange, Platform platform);
};
}