diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-01-07 13:28:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-07 20:28:49 +0200 |
commit | bf22569019749e421e8ffe0a73cff988a9a9c846 (patch) | |
tree | 9e6910c1faf0ddce191ad4b3110f08b0201fc482 /src/database/database.h | |
parent | b81948a14c138517f6a227dac5b71f0b2facb33c (diff) | |
download | dragonfireclient-bf22569019749e421e8ffe0a73cff988a9a9c846.tar.xz |
Use a database for mod storage (#11763)
Diffstat (limited to 'src/database/database.h')
-rw-r--r-- | src/database/database.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/database/database.h b/src/database/database.h index b7d551935..fbb5befea 100644 --- a/src/database/database.h +++ b/src/database/database.h @@ -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; +}; |