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

#include <groupdb.hpp>

Public Member Functions

 GroupDB ()=default
 
bool createGroup (std::string const &group_id, std::shared_ptr< User > owner)
 
bool deleteGroup (std::string const &group_id)
 
std::shared_ptr< GroupgetGroup (std::string const &group_id)
 
std::vector< std::string > getGroups () const
 

Constructor & Destructor Documentation

◆ GroupDB()

GroupDB::GroupDB ( )
default

Member Function Documentation

◆ createGroup()

bool GroupDB::createGroup ( std::string const & group_id,
std::shared_ptr< User > owner )
Returns
true if group was created, false if group already exists

◆ deleteGroup()

bool GroupDB::deleteGroup ( std::string const & group_id)
Returns
true if group was deleted, false if group does not exist

◆ getGroup()

std::shared_ptr< Group > GroupDB::getGroup ( std::string const & group_id)
Returns
nullptr if group does not exist

◆ getGroups()

std::vector< std::string > GroupDB::getGroups ( ) const

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