summaryrefslogtreecommitdiff
path: root/include/erebos/identity.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2019-12-21 21:42:20 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2019-12-21 21:42:20 +0100
commitf94443c63dfd63300e5bd29889935fd1f451175e (patch)
tree7722cfdac0ed76ff7f1fd525abb2ab15e0b0c998 /include/erebos/identity.h
parentd084c069be38b6f3ad74912ca629403d9fdaec58 (diff)
Identity storage and modification
Diffstat (limited to 'include/erebos/identity.h')
-rw-r--r--include/erebos/identity.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/erebos/identity.h b/include/erebos/identity.h
index 7b66d82..f57a12e 100644
--- a/include/erebos/identity.h
+++ b/include/erebos/identity.h
@@ -12,6 +12,25 @@ public:
std::optional<std::string> name() const;
std::optional<Identity> owner() const;
+ std::optional<Ref> ref() const;
+
+ class Builder
+ {
+ public:
+ Identity commit() const;
+
+ void name(const std::string &);
+ void owner(const Identity &);
+
+ private:
+ friend class Identity;
+ struct Priv;
+ const std::shared_ptr<Priv> p;
+ Builder(Priv * p): p(p) {}
+ };
+
+ static Builder create(const Storage &);
+ Builder modify() const;
private:
struct Priv;