#pragma once #include #include #include #include #include #include namespace erebos { using std::mutex; using std::optional; using std::promise; using std::string; using std::vector; struct AttachIdentity; class AttachService : public PairingService { public: AttachService(Config &&, const Server &); virtual ~AttachService(); UUID uuid() const override; void attachTo(const Peer &); protected: virtual Stored handlePairingComplete(const Peer &) override; virtual void handlePairingResult(Context &, Stored) override; mutex handlerLock; }; template class Signed; struct AttachIdentity { Stored> identity; vector> keys; static AttachIdentity load(const Ref &); Ref store(const Storage &) const; }; }