12#include <unordered_map>
13#include <unordered_set>
49 virtual bool deleteAuth(
const std::string &name);
50 virtual void listNames(std::vector<std::string> &res);
67 virtual void getModKeys(
const std::string &modname, std::vector<std::string> *storage);
68 virtual bool getModEntry(
const std::string &modname,
69 const std::string &key, std::string *value);
70 virtual bool hasModEntry(
const std::string &modname,
const std::string &key);
71 virtual bool setModEntry(
const std::string &modname,
72 const std::string &key, std::string_view value);
73 virtual bool removeModEntry(
const std::string &modname,
const std::string &key);
75 virtual void listMods(std::vector<std::string> *res);
Definition database-files.h:41
virtual bool deleteAuth(const std::string &name)
Definition database-files.cpp:291
std::unordered_map< std::string, AuthEntry > m_auth_list
Definition database-files.h:54
bool readAuthFile()
Definition database-files.cpp:314
virtual bool createAuth(AuthEntry &authEntry)
Definition database-files.cpp:283
virtual ~AuthDatabaseFiles()=default
virtual void listNames(std::vector< std::string > &res)
Definition database-files.cpp:300
virtual bool saveAuth(const AuthEntry &authEntry)
Definition database-files.cpp:275
AuthDatabaseFiles(const std::string &savedir)
Definition database-files.cpp:260
virtual bool getAuth(const std::string &name, AuthEntry &res)
Definition database-files.cpp:265
bool writeAuthFile()
Definition database-files.cpp:344
std::string m_savedir
Definition database-files.h:55
virtual void reload()
Definition database-files.cpp:309
Definition database-files.h:61
virtual ~ModStorageDatabaseFiles()=default
virtual bool getModEntry(const std::string &modname, const std::string &key, std::string *value)
Definition database-files.cpp:393
Json::Value * getOrCreateJson(const std::string &modname)
Definition database-files.cpp:503
virtual bool hasModEntry(const std::string &modname, const std::string &key)
Definition database-files.cpp:407
virtual void beginSave()
Definition database-files.cpp:453
virtual void endSave()
Definition database-files.cpp:457
virtual void getModEntries(const std::string &modname, StringMap *storage)
Definition database-files.cpp:367
virtual void listMods(std::vector< std::string > *res)
Definition database-files.cpp:489
std::unordered_set< std::string > m_modified
Definition database-files.h:85
std::string m_storage_dir
Definition database-files.h:83
virtual bool removeModEntries(const std::string &modname)
Definition database-files.cpp:442
ModStorageDatabaseFiles(const std::string &savedir)
Definition database-files.cpp:362
virtual bool removeModEntry(const std::string &modname, const std::string &key)
Definition database-files.cpp:427
virtual void getModKeys(const std::string &modname, std::vector< std::string > *storage)
Definition database-files.cpp:380
virtual bool setModEntry(const std::string &modname, const std::string &key, std::string_view value)
Definition database-files.cpp:413
std::unordered_map< std::string, Json::Value > m_mod_storage
Definition database-files.h:84
Definition database-files.h:17
virtual ~PlayerDatabaseFiles()=default
void listPlayers(std::vector< std::string > &res)
Definition database-files.cpp:233
void deSerialize(RemotePlayer *p, std::istream &is, const std::string &playername, PlayerSAO *sao)
Definition database-files.cpp:25
bool removePlayer(const std::string &name)
Definition database-files.cpp:182
void serialize(RemotePlayer *p, std::ostream &os)
Definition database-files.cpp:101
std::string m_savedir
Definition database-files.h:37
bool loadPlayer(RemotePlayer *player, PlayerSAO *sao)
Definition database-files.cpp:208
void savePlayer(RemotePlayer *player)
Definition database-files.cpp:136
PlayerDatabaseFiles(const std::string &savedir)
Definition database-files.cpp:20
Definition player_sao.h:56
Definition remoteplayer.h:26
std::unordered_map< std::string, std::string > StringMap
Definition string.h:65
static std::string p(std::string path)
Definition test_filesys.cpp:53