1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-07 16:48:40 +00:00

Use a database for mod storage (#11763)

This commit is contained in:
Jude Melton-Houghton 2022-01-07 13:28:49 -05:00 committed by GitHub
parent b81948a14c
commit bf22569019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 798 additions and 127 deletions

View file

@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irr_v3d.h"
#include "irrlichttypes.h"
#include "util/basic_macros.h"
#include "util/string.h"
class Database
{
@ -84,3 +85,15 @@ public:
virtual void listNames(std::vector<std::string> &res) = 0;
virtual void reload() = 0;
};
class ModMetadataDatabase : public Database
{
public:
virtual ~ModMetadataDatabase() = default;
virtual bool getModEntries(const std::string &modname, StringMap *storage) = 0;
virtual bool setModEntry(const std::string &modname,
const std::string &key, const std::string &value) = 0;
virtual bool removeModEntry(const std::string &modname, const std::string &key) = 0;
virtual void listMods(std::vector<std::string> *res) = 0;
};