From 6c58f1e095f7dbe1e7e1654c1807a76276a2f3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 5 Jun 2021 23:10:24 +0200 Subject: Contact list in shared state --- src/identity.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/identity.cpp') diff --git a/src/identity.cpp b/src/identity.cpp index f55f6dd..0d35122 100644 --- a/src/identity.cpp +++ b/src/identity.cpp @@ -6,6 +6,8 @@ #include #include +#include + using namespace erebos; using std::async; @@ -38,6 +40,11 @@ optional Identity::load(const vector & refs) for (const auto & ref : refs) data.push_back(Stored>::load(ref)); + return load(data); +} + +optional Identity::load(const vector>> & data) +{ if (auto ptr = Priv::validate(data)) return Identity(ptr); return nullopt; @@ -61,6 +68,11 @@ vector Identity::store(const Storage & st) const return res; } +const vector>> & Identity::data() const +{ + return p->data; +} + optional Identity::name() const { return p->name.get(); -- cgit v1.2.3