aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-06 08:33:49 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-06 08:36:08 +0100
commitea17671d7fe9ece8a33bdbc2f1d7bdf68bbccb69 (patch)
tree81ababa378263db69a4e71cfa5fe3d5bdeb78761 /include
parent8e6c9ffd28a17bcb81016412b23cffc490f02dab (diff)
Change package list format
Diffstat (limited to 'include')
-rw-r--r--include/Conf.hpp4
-rw-r--r--include/Package.hpp11
2 files changed, 14 insertions, 1 deletions
diff --git a/include/Conf.hpp b/include/Conf.hpp
index de63eae..c661ca4 100644
--- a/include/Conf.hpp
+++ b/include/Conf.hpp
@@ -133,11 +133,13 @@ namespace sibs
#if OS_TYPE == OS_TYPE_WINDOWS
#ifdef SIBS_ENV_32BIT
#define SYSTEM_PLATFORM Platform::PLATFORM_WIN32
+ #define SYSTEM_PLATFORM_NAME "win32"
#define CONFIG_SYSTEM_PLATFORM 0
#define CONFIG_STATIC_DEBUG_PLATFORM 1
#define CONFIG_STATIC_RELEASE_PLATFORM 2
#else
#define SYSTEM_PLATFORM Platform::PLATFORM_WIN64
+ #define SYSTEM_PLATFORM_NAME "win64"
#define CONFIG_SYSTEM_PLATFORM 3
#define CONFIG_STATIC_DEBUG_PLATFORM 4
#define CONFIG_STATIC_RELEASE_PLATFORM 5
@@ -147,11 +149,13 @@ namespace sibs
#elif OS_TYPE == OS_TYPE_LINUX
#ifdef SIBS_ENV_32BIT
#define SYSTEM_PLATFORM Platform::PLATFORM_LINUX32
+ #define SYSTEM_PLATFORM_NAME "linux32"
#define CONFIG_SYSTEM_PLATFORM 6
#define CONFIG_STATIC_DEBUG_PLATFORM 7
#define CONFIG_STATIC_RELEASE_PLATFORM 8
#else
#define SYSTEM_PLATFORM Platform::PLATFORM_LINUX64
+ #define SYSTEM_PLATFORM_NAME "linux64"
#define CONFIG_SYSTEM_PLATFORM 9
#define CONFIG_STATIC_DEBUG_PLATFORM 10
#define CONFIG_STATIC_RELEASE_PLATFORM 11
diff --git a/include/Package.hpp b/include/Package.hpp
index 475e11b..131e87f 100644
--- a/include/Package.hpp
+++ b/include/Package.hpp
@@ -4,6 +4,7 @@
#include "../external/rapidjson/document.h"
#include "Result.hpp"
#include <string>
+#include <vector>
namespace sibs
{
@@ -25,6 +26,14 @@ namespace sibs
LIBRARY
};
+ struct PackageMetadata
+ {
+ std::string description;
+ std::string version;
+ std::vector<std::string> platforms;
+ std::vector<std::string> urls;
+ };
+
class Package
{
public:
@@ -39,7 +48,7 @@ namespace sibs
* 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);
+ static Result<std::string> getPackageUrl(const char *packageName, const char *packageVersion, const char *platform);
};
}