From 1c7e6e074155499155adbbb651db1c66f1762ba2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 1 Feb 2018 21:15:13 +0100 Subject: Sync time with ntp server, starting with basic operations --- include/Group.hpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'include/Group.hpp') diff --git a/include/Group.hpp b/include/Group.hpp index dafc05a..c909728 100644 --- a/include/Group.hpp +++ b/include/Group.hpp @@ -1,19 +1,34 @@ #pragma once -#include #include #include +#include namespace odhtdb { class User; + class GroupNameTooLongException : public std::runtime_error + { + public: + GroupNameTooLongException(const std::string &groupName) : + std::runtime_error(std::string("The group name ") + groupName + " is longer than 255 bytes") + { + + } + }; + class Group { public: + Group(const std::string &name); ~Group(); + + void addUser(User *user); + + const std::string& getName() const; + const std::vector& getUsers() const; private: - dht::crypto::PublicKey publicKey; std::string name; std::vector users; }; -- cgit v1.2.3