X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fdatabase-dummy.h;h=0cf56928e08d314f2ad11edf5fcc172b106cbc0f;hb=17ba584fe254eeaee3489cc20e03810a59f3ef9b;hp=5a6921370b46ab92f6894c77de0a0bf7e54c4146;hpb=f1e4a671dc524430cae0dc66fd774858842a3067;p=dragonfireclient.git diff --git a/src/database-dummy.h b/src/database-dummy.h index 5a6921370..0cf56928e 100644 --- a/src/database-dummy.h +++ b/src/database-dummy.h @@ -1,26 +1,41 @@ +/* +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + #ifndef DATABASE_DUMMY_HEADER #define DATABASE_DUMMY_HEADER -#include "map.h" -#include "mapsector.h" -#include "mapblock.h" -#include "main.h" -#include "filesys.h" +#include +#include #include "database.h" +#include "irrlichttypes.h" class Database_Dummy : public Database { 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 &dst); - virtual int Initialized(void); - ~Database_Dummy(); + virtual bool saveBlock(const v3s16 &pos, const std::string &data); + virtual std::string loadBlock(const v3s16 &pos); + virtual bool deleteBlock(const v3s16 &pos); + virtual void listAllLoadableBlocks(std::vector &dst); + private: - ServerMap *srvmap; - std::map m_database; + std::map m_database; }; + #endif +