diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2019-12-11 22:14:12 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2019-12-18 22:26:28 +0100 |
commit | d084c069be38b6f3ad74912ca629403d9fdaec58 (patch) | |
tree | 957e9e2340b291cdff6dac60480d1f4060c106a3 /include/erebos/identity.h | |
parent | 361891f25ca735fd85db64a14823cc55b8a0619a (diff) |
Identity loading and validation
Diffstat (limited to 'include/erebos/identity.h')
-rw-r--r-- | include/erebos/identity.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/erebos/identity.h b/include/erebos/identity.h new file mode 100644 index 0000000..7b66d82 --- /dev/null +++ b/include/erebos/identity.h @@ -0,0 +1,23 @@ +#pragma once + +#include <erebos/storage.h> + +namespace erebos { + +class Identity +{ +public: + static std::optional<Identity> load(const Ref &); + static std::optional<Identity> load(const std::vector<Ref> &); + + std::optional<std::string> name() const; + std::optional<Identity> owner() const; + +private: + struct Priv; + const std::shared_ptr<const Priv> p; + Identity(const Priv * p): p(p) {} + Identity(std::shared_ptr<const Priv> && p): p(std::move(p)) {} +}; + +} |