mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge bitcoin/bitcoin#22218: multiprocess: Add ipc::Context and ipc::capnp::Context structs
3e33d170ccAdd ipc::Context and ipc::capnp::Context structs (Russell Yanofsky) Pull request description: 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 PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102. ACKs for top commit: ariard: Code Review ACK3e33d170Tree-SHA512: fd949fae5f1a973d39cb97f2745821ab2f62b98e166e53bc2801f97dcde988e18faaaaa0ffc2a82c170938b3a18078b6162fa35460e6e7c635e681b3c9e5b0a6
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