mirror of
https://github.com/minetest/minetestmapper.git
synced 2025-07-02 00:20:22 +02:00
Move include files
This commit is contained in:
25
include/db-redis.h
Normal file
25
include/db-redis.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef DB_REDIS_HEADER
|
||||
#define DB_REDIS_HEADER
|
||||
|
||||
#include "db.h"
|
||||
#include <hiredis.h>
|
||||
|
||||
class DBRedis : public DB {
|
||||
public:
|
||||
DBRedis(const std::string &mapdir);
|
||||
virtual std::vector<BlockPos> getBlockPos();
|
||||
virtual void getBlocksOnZ(std::map<int16_t, BlockList> &blocks, int16_t zPos);
|
||||
virtual ~DBRedis();
|
||||
private:
|
||||
static std::string replyTypeStr(int type);
|
||||
|
||||
void loadPosCache();
|
||||
void HMGET(const std::vector<BlockPos> &positions, std::vector<ustring> *result);
|
||||
|
||||
std::vector<BlockPos> posCache;
|
||||
|
||||
redisContext *ctx;
|
||||
std::string hash;
|
||||
};
|
||||
|
||||
#endif // DB_REDIS_HEADER
|
Reference in New Issue
Block a user