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:
Russell Yanofsky
2017-12-05 15:57:12 -05:00
parent 1704bbf226
commit 3e33d170cc
7 changed files with 62 additions and 2 deletions

View File

@@ -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.