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

@@ -12,6 +12,8 @@
#include <typeindex>
namespace ipc {
struct Context;
//! IPC protocol interface for calling IPC methods over sockets.
//!
//! There may be different implementations of this interface for different IPC
@@ -33,6 +35,9 @@ public:
//! Add cleanup callback to interface that will run when the interface is
//! deleted.
virtual void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) = 0;
//! Context accessor.
virtual Context& context() = 0;
};
} // namespace ipc