]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/database-leveldb.h
Formspec: textarea with scrollbar improvements
[dragonfireclient.git] / src / database-leveldb.h
index 4afe2fdc727bc3261803a2b971a788c63b18bcc5..d30f9f8f5dd9f733fb98bd879f603c681d0b8884 100644 (file)
@@ -17,33 +17,32 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef DATABASE_LEVELDB_HEADER
-#define DATABASE_LEVELDB_HEADER
+#pragma once
 
 #include "config.h"
 
 #if USE_LEVELDB
 
+#include <string>
 #include "database.h"
 #include "leveldb/db.h"
-#include <string>
 
-class Database_LevelDB : public Database
+class Database_LevelDB : public MapDatabase
 {
 public:
        Database_LevelDB(const std::string &savedir);
        ~Database_LevelDB();
 
-       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<v3s16> &dst);
+       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 beginSave() {}
+       void endSave() {}
 
 private:
        leveldb::DB *m_database;
 };
 
 #endif // USE_LEVELDB
-
-#endif
-