diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-02-29 20:38:38 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-03-10 21:47:29 +0100 |
commit | 240edf7494745dc4df2128644fe5c1a73ec2d513 (patch) | |
tree | a952721545715e4d131c1fcc29c0f872d6a3bfbe /include/erebos/service.h | |
parent | 76d6f638df485d179899fa740b9bb53ee55ba7bc (diff) |
Network: service interface and handling
Diffstat (limited to 'include/erebos/service.h')
-rw-r--r-- | include/erebos/service.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/erebos/service.h b/include/erebos/service.h new file mode 100644 index 0000000..7a6f646 --- /dev/null +++ b/include/erebos/service.h @@ -0,0 +1,31 @@ +#pragma once + +#include <erebos/storage.h> + +namespace erebos { + +class Service +{ +public: + Service(); + virtual ~Service(); + + class Context + { + public: + struct Priv; + Context(Priv *); + Priv & priv(); + + const Ref & ref() const; + const class Peer & peer() const; + + private: + std::unique_ptr<Priv> p; + }; + + virtual UUID uuid() const = 0; + virtual void handle(Context &) const = 0; +}; + +} |