aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-12-05 15:57:12 -0500
committerRussell Yanofsky <russ@yanofsky.org>2021-06-10 09:58:45 -0500
commit3e33d170cc0a8f386791777f3cc597e2bd0bf2ee (patch)
tree88d34d1b4d5e2fd12e011be49b0aa9651eac224f /src/interfaces
parent1704bbf2263f16c720604cfab4ccb775315df690 (diff)
downloadbitcoin-3e33d170cc0a8f386791777f3cc597e2bd0bf2ee.tar.xz
Add ipc::Context and ipc::capnp::Context structs
These are currently empty structs but they will be used to pass some function and object pointers from bitcoin application code to IPC hooks that run, for example, when a remote object is created or destroyed, or a new process is created.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ipc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/interfaces/ipc.h b/src/interfaces/ipc.h
index e9e6c78053..963649fc9a 100644
--- a/src/interfaces/ipc.h
+++ b/src/interfaces/ipc.h
@@ -9,6 +9,10 @@
#include <memory>
#include <typeindex>
+namespace ipc {
+struct Context;
+} // namespace ipc
+
namespace interfaces {
class Init;
@@ -58,6 +62,9 @@ public:
addCleanup(typeid(Interface), &iface, std::move(cleanup));
}
+ //! IPC context struct accessor (see struct definition for more description).
+ virtual ipc::Context& context() = 0;
+
protected:
//! Internal implementation of public addCleanup method (above) as a
//! type-erased virtual function, since template functions can't be virtual.