From 77fc16d21158c6542addcbaaff47b801d3b5f5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 17 Dec 2022 20:10:20 +0100 Subject: Confirm pairing outcome after head commit --- src/service.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/service.cpp') diff --git a/src/service.cpp b/src/service.cpp index 14ff665..397bebd 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -34,6 +34,17 @@ void Service::Context::local(const LocalState & ls) p->local = p->local.ref().storage().store(ls); } +void Service::Context::afterCommit(function hook) +{ + p->afterCommit.push_back(move(hook)); +} + +void Service::Context::runAfterCommitHooks() const +{ + for (const auto & hook : p->afterCommit) + hook(); +} + void Service::serverStarted(const class Server &) { } -- cgit v1.2.3