diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-12-17 20:10:20 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-12-17 20:10:20 +0100 |
commit | 77fc16d21158c6542addcbaaff47b801d3b5f5c7 (patch) | |
tree | 8154df1323fb1cfed40785ed13ecce745c64b5ea /src/service.cpp | |
parent | 50ee22fde82dc7429d983171935165866493c38e (diff) |
Confirm pairing outcome after head commit
Diffstat (limited to 'src/service.cpp')
-rw-r--r-- | src/service.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<void()> 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 &) { } |