Add cancel button to password change menu. (#5720)
[oweals/minetest.git] / src / database-dummy.h
index c0bee97c0c3d1077ace4c937549969d84da1a72b..7d1cb2279f32fe3f701c815e9b2a15c0dac61158 100644 (file)
@@ -25,21 +25,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "database.h"
 #include "irrlichttypes.h"
 
-class ServerMap;
-
-class Database_Dummy : public Database
+class Database_Dummy : public MapDatabase, public PlayerDatabase
 {
 public:
-       Database_Dummy(ServerMap *map);
-       virtual void beginSave();
-       virtual void endSave();
-        virtual void saveBlock(MapBlock *block);
-        virtual MapBlock* loadBlock(v3s16 blockpos);
-        virtual void listAllLoadableBlocks(std::list<v3s16> &dst);
-        virtual int Initialized(void);
-       ~Database_Dummy();
+       bool saveBlock(const v3s16 &pos, const std::string &data);
+       void loadBlock(const v3s16 &pos, std::string *block);
+       bool deleteBlock(const v3s16 &pos);
+       void listAllLoadableBlocks(std::vector<v3s16> &dst);
+
+       void savePlayer(RemotePlayer *player) {}
+       bool loadPlayer(RemotePlayer *player, PlayerSAO *sao) { return true; }
+       bool removePlayer(const std::string &name) { return true; }
+       void listPlayers(std::vector<std::string> &) {}
+
+       void beginSave() {}
+       void endSave() {}
 private:
-       ServerMap *srvmap;
-       std::map<u64, std::string> m_database;
+       std::map<s64, std::string> m_database;
 };
+
 #endif