diff options
Diffstat (limited to 'src/state.h')
-rw-r--r-- | src/state.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/state.h b/src/state.h new file mode 100644 index 0000000..d2c89fc --- /dev/null +++ b/src/state.h @@ -0,0 +1,32 @@ +#pragma once + +#include <erebos/state.h> + +#include "pubkey.h" + +using std::optional; +using std::vector; + +namespace erebos { + +struct LocalState::Priv +{ + optional<Identity> identity; + vector<Stored<struct SharedState>> shared; +}; + +struct SharedState +{ + explicit SharedState(vector<Stored<SharedState>> prev, + UUID type, vector<Ref> value): + prev(prev), type(type), value(value) {} + explicit SharedState(const Ref &); + static SharedState load(const Ref & ref) { return SharedState(ref); } + Ref store(const Storage &) const; + + vector<Stored<SharedState>> prev; + UUID type; + vector<Ref> value; +}; + +} |