P2P File Share
A simple peer-to-peer file sharing system.
Loading...
Searching...
No Matches
UserDB Class Reference

#include <userdb.hpp>

Public Member Functions

 UserDB ()=default
 
bool createUser (std::string const &username, std::string const &password)
 
bool deleteUser (std::string const &username)
 
std::shared_ptr< UsergetUser (std::string const &username)
 
std::vector< std::string > getUsernames () const
 

Constructor & Destructor Documentation

◆ UserDB()

UserDB::UserDB ( )
default

Member Function Documentation

◆ createUser()

bool UserDB::createUser ( std::string const & username,
std::string const & password )
Returns
true if user was created, false if user already exists

◆ deleteUser()

bool UserDB::deleteUser ( std::string const & username)
Returns
true if user was deleted, false if user does not exist

◆ getUser()

std::shared_ptr< User > UserDB::getUser ( std::string const & username)
Returns
nullptr if user does not exist

◆ getUsernames()

std::vector< std::string > UserDB::getUsernames ( ) const

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