mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user