summaryrefslogtreecommitdiff
path: root/src/mods.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-06-23 18:30:21 +0200
committerkwolekr <kwolekr@minetest.net>2013-07-02 19:58:20 -0400
commit967121a34bbc60e6b46c7ec470b151f668ef1fef (patch)
treee5cc5ec845d3c286bcb0e203e3a5f146950bfaf1 /src/mods.h
parentfe4ce03d529f70346b2e2c4872223ebdcd37fffa (diff)
downloadminetest-967121a34bbc60e6b46c7ec470b151f668ef1fef.tar.gz
minetest-967121a34bbc60e6b46c7ec470b151f668ef1fef.tar.bz2
minetest-967121a34bbc60e6b46c7ec470b151f668ef1fef.zip
Replace C++ mainmenu by formspec powered one
Diffstat (limited to 'src/mods.h')
-rw-r--r--src/mods.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/mods.h b/src/mods.h
index a8100fcfd..eb453bf6a 100644
--- a/src/mods.h
+++ b/src/mods.h
@@ -29,6 +29,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <map>
#include <exception>
#include <list>
+#include "json/json.h"
+#include "config.h"
+
+#if USE_CURL
+#include <curl/curl.h>
+#endif
#define MODNAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz0123456789_"
@@ -154,4 +160,66 @@ private:
};
+#if USE_CURL
+Json::Value getModstoreUrl(std::string url);
+#else
+inline Json::Value getModstoreUrl(std::string url) {
+ return Json::Value();
+}
+#endif
+
+struct ModLicenseInfo {
+ int id;
+ std::string shortinfo;
+ std::string url;
+};
+
+struct ModAuthorInfo {
+ int id;
+ std::string username;
+};
+
+struct ModStoreMod {
+ int id;
+ std::string title;
+ std::string basename;
+ ModAuthorInfo author;
+ float rating;
+ bool valid;
+};
+
+struct ModStoreCategoryInfo {
+ int id;
+ std::string name;
+};
+
+struct ModStoreVersionEntry {
+ int id;
+ std::string date;
+ std::string file;
+ bool approved;
+ //ugly version number
+ int mtversion;
+};
+
+struct ModStoreModDetails {
+ /* version_set?? */
+ std::vector<ModStoreCategoryInfo> categories;
+ ModAuthorInfo author;
+ ModLicenseInfo license;
+ int id;
+ std::string title;
+ std::string basename;
+ std::string description;
+ std::string repository;
+ float rating;
+ std::vector<std::string> depends;
+ std::vector<std::string> softdeps;
+
+ std::string download_url;
+ std::string screenshot_url;
+ std::vector<ModStoreVersionEntry> versions;
+ bool valid;
+};
+
#endif