]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/database/database-dummy.h
Use a database for mod storage (#11763)
[dragonfireclient.git] / src / database / database-dummy.h
index b69919f84512e9fcdd38e1592e25e7c58e38daf0..44b9e8d6847d637c74b68e988d0deb20870dbcef 100644 (file)
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "database.h"
 #include "irrlichttypes.h"
 
-class Database_Dummy : public MapDatabase, public PlayerDatabase
+class Database_Dummy : public MapDatabase, public PlayerDatabase, public ModMetadataDatabase
 {
 public:
        bool saveBlock(const v3s16 &pos, const std::string &data);
@@ -37,10 +37,17 @@ class Database_Dummy : public MapDatabase, public PlayerDatabase
        bool removePlayer(const std::string &name);
        void listPlayers(std::vector<std::string> &res);
 
+       bool getModEntries(const std::string &modname, StringMap *storage);
+       bool setModEntry(const std::string &modname,
+                       const std::string &key, const std::string &value);
+       bool removeModEntry(const std::string &modname, const std::string &key);
+       void listMods(std::vector<std::string> *res);
+
        void beginSave() {}
        void endSave() {}
 
 private:
        std::map<s64, std::string> m_database;
        std::set<std::string> m_player_database;
+       std::unordered_map<std::string, StringMap> m_mod_meta_database;
 };