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/contact.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/contact.h (limited to 'src/contact.h') diff --git a/src/contact.h b/src/contact.h new file mode 100644 index 0000000..31deceb --- /dev/null +++ b/src/contact.h @@ -0,0 +1,42 @@ +#pragma once + +#include + +#include +#include +#include +#include + +namespace erebos { + +using std::optional; +using std::string; +using std::vector; + +struct ContactData; +struct IdentityData; + +struct Contact::Priv +{ + vector> data; + Identity identity; + + void init(); + std::once_flag initFlag {}; + + optional name {}; + + static List loadList(vector> &&, vector &&); +}; + +struct ContactData +{ + static ContactData load(const Ref &); + Ref store(const Storage &) const; + + vector> prev; + vector>> identity; + optional name; +}; + +} -- cgit v1.2.3