From 1328d943c5016dd1662a4e46d4a408bca010cffc Mon Sep 17 00:00:00 2001 From: Aleksi Lindeman <0xdec05eba@gmail.com> Date: Sun, 11 Mar 2018 00:12:37 +0100 Subject: Add operation to allow users to be added to group WARNING! Lazy implementation everywhere, does not handle out-of-order packets --- include/Group.hpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'include/Group.hpp') diff --git a/include/Group.hpp b/include/Group.hpp index a8dcf83..315961d 100644 --- a/include/Group.hpp +++ b/include/Group.hpp @@ -1,5 +1,8 @@ #pragma once +#include "types.hpp" +#include "DataView.hpp" +#include "Permission.hpp" #include #include #include @@ -17,19 +20,26 @@ namespace odhtdb } }; + + class Group { + friend class User; public: - Group(const std::string &name); + Group(const std::string &name, uint8_t id[16], const Permission &permission); ~Group(); - void addUser(const User *user); - const std::string& getName() const; + DataView getId() const; + const Permission& getPermission() const; const std::vector& getUsers() const; + private: + void addUser(const User *user); private: std::string name; + uint8_t id[16]; + Permission permission; std::vector users; }; } -- cgit v1.2.3