diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-02-01 21:15:13 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:12 +0200 |
commit | 1c7e6e074155499155adbbb651db1c66f1762ba2 (patch) | |
tree | c08a95e772c8e23228a2be78e308aba313034f26 /include/Group.hpp | |
parent | bd2bd91ac947a7b1f6d097d7efa4b0ab2041d4db (diff) |
Sync time with ntp server, starting with basic operations
Diffstat (limited to 'include/Group.hpp')
-rw-r--r-- | include/Group.hpp | 19 |
1 files changed, 17 insertions, 2 deletions
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 <opendht/crypto.h> #include <string> #include <vector> +#include <stdexcept> 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<User*>& getUsers() const; private: - dht::crypto::PublicKey publicKey; std::string name; std::vector<User*> users; }; |