Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
AuthDatabaseLevelDB Class Reference

#include <database-leveldb.h>

+ Inheritance diagram for AuthDatabaseLevelDB:
+ Collaboration diagram for AuthDatabaseLevelDB:

Public Member Functions

 AuthDatabaseLevelDB (const std::string &savedir)
 
virtual ~AuthDatabaseLevelDB ()=default
 
virtual bool getAuth (const std::string &name, AuthEntry &res)
 
virtual bool saveAuth (const AuthEntry &authEntry)
 
virtual bool createAuth (AuthEntry &authEntry)
 
virtual bool deleteAuth (const std::string &name)
 
virtual void listNames (std::vector< std::string > &res)
 
virtual void reload ()
 
- Public Member Functions inherited from AuthDatabase
virtual ~AuthDatabase ()=default
 

Private Attributes

std::unique_ptr< leveldb::DB > m_database
 

Constructor & Destructor Documentation

◆ AuthDatabaseLevelDB()

AuthDatabaseLevelDB::AuthDatabaseLevelDB ( const std::string & savedir)

◆ ~AuthDatabaseLevelDB()

virtual AuthDatabaseLevelDB::~AuthDatabaseLevelDB ( )
virtualdefault

Member Function Documentation

◆ createAuth()

bool AuthDatabaseLevelDB::createAuth ( AuthEntry & authEntry)
virtual

Implements AuthDatabase.

References saveAuth().

+ Here is the call graph for this function:

◆ deleteAuth()

bool AuthDatabaseLevelDB::deleteAuth ( const std::string & name)
virtual

Implements AuthDatabase.

References m_database.

◆ getAuth()

bool AuthDatabaseLevelDB::getAuth ( const std::string & name,
AuthEntry & res )
virtual

Implements AuthDatabase.

References deSerializeString16(), AuthEntry::id, AuthEntry::last_login, m_database, AuthEntry::name, AuthEntry::password, AuthEntry::privileges, readS64(), readU16(), and readU8().

+ Here is the call graph for this function:

◆ listNames()

void AuthDatabaseLevelDB::listNames ( std::vector< std::string > & res)
virtual

Implements AuthDatabase.

References m_database.

◆ reload()

void AuthDatabaseLevelDB::reload ( )
virtual

Implements AuthDatabase.

◆ saveAuth()

bool AuthDatabaseLevelDB::saveAuth ( const AuthEntry & authEntry)
virtual

Implements AuthDatabase.

References FATAL_ERROR_IF, AuthEntry::last_login, m_database, AuthEntry::name, AuthEntry::password, AuthEntry::privileges, serializeString16(), U16_MAX, writeS64(), writeU16(), and writeU8().

Referenced by createAuth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_database

std::unique_ptr<leveldb::DB> AuthDatabaseLevelDB::m_database
private

The documentation for this class was generated from the following files: