diff options
Diffstat (limited to 'include/odhtdb/RemoteUser.hpp')
-rw-r--r-- | include/odhtdb/RemoteUser.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/odhtdb/RemoteUser.hpp b/include/odhtdb/RemoteUser.hpp new file mode 100644 index 0000000..181a4c4 --- /dev/null +++ b/include/odhtdb/RemoteUser.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "User.hpp" + +namespace odhtdb +{ + class RemoteUser : public User + { + public: + static RemoteUser* create(const Signature::PublicKey &publicKey, const std::string &name, Group *group) + { + return new RemoteUser(publicKey, name, group); + } + + const Signature::PublicKey& getPublicKey() const override + { + return publicKey; + } + private: + RemoteUser(const Signature::PublicKey &_publicKey, const std::string &name, Group *group) : User(name, group), publicKey(_publicKey){} + private: + Signature::PublicKey publicKey; + }; +} |