From a16b33031c7bcf2eabf1e0c3571000234b7740df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 24 Jan 2021 22:46:48 +0100 Subject: Attach service --- include/erebos/network.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'include/erebos/network.h') diff --git a/include/erebos/network.h b/include/erebos/network.h index 8f3debe..5a1fca6 100644 --- a/include/erebos/network.h +++ b/include/erebos/network.h @@ -10,10 +10,15 @@ namespace erebos { class Server { + struct Priv; public: Server(const Head &, std::vector> &&); + Server(const std::shared_ptr &); ~Server(); + const Head & localHead() const; + + const Identity & identity() const; template S & svc(); class PeerList & peerList() const; @@ -22,7 +27,6 @@ public: private: Service & svcHelper(const std::type_info &); - struct Priv; const std::shared_ptr p; }; @@ -39,13 +43,27 @@ public: Peer(const std::shared_ptr & p); ~Peer(); + Server server() const; + + const Storage & tempStorage() const; + const PartialStorage & partialStorage() const; + std::string name() const; std::optional identity() const; bool hasChannel() const; bool send(UUID, const Ref &) const; + bool send(UUID, const Object &) const; + + bool operator==(const Peer & other) const; + bool operator!=(const Peer & other) const; + bool operator<(const Peer & other) const; + bool operator<=(const Peer & other) const; + bool operator>(const Peer & other) const; + bool operator>=(const Peer & other) const; private: + bool send(UUID, const Ref &, const Object &) const; std::shared_ptr p; }; -- cgit v1.2.3