diff options
author | Aleksi Lindeman <aleksi_888@hotmail.com> | 2018-02-01 21:15:13 +0100 |
---|---|---|
committer | Aleksi Lindeman <aleksi_888@hotmail.com> | 2018-02-01 21:15:19 +0100 |
commit | 6f1089db78f14b52b869f5aaa979e52ff5e4c2d7 (patch) | |
tree | d79f7abfb0fb9f3d58f9716741512b63fb4193ec /include/Group.hpp | |
parent | 80a9c135b8bdca64246f147f22d98485e0f05ee5 (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; }; |