aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/client_context.h
diff options
context:
space:
mode:
authorGravatar Bogdan Drutu <bdrutu@google.com>2015-12-11 19:26:52 -0800
committerGravatar Bogdan Drutu <bdrutu@google.com>2015-12-11 19:29:07 -0800
commit38d2ad6e96b5fc2f7ee3ae7e82b81983afe50874 (patch)
tree3f88f5978afa548dde9a50a6e869f8b7a5dfc723 /include/grpc++/client_context.h
parent3a977a49f642a087637ddb5cb72245b0485ac665 (diff)
Add a hook for the default constructor of ClientContext.
Diffstat (limited to 'include/grpc++/client_context.h')
-rw-r--r--include/grpc++/client_context.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index 1b6769dee1..d3f23fe047 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -280,6 +280,16 @@ class ClientContext {
/// There is no guarantee the call will be cancelled.
void TryCancel();
+ /// Global Callbacks
+ ///
+ /// Can be set exactly once per application to install hooks whenever
+ /// a client context is constructed.
+ class GlobalCallbacks {
+ public:
+ virtual void DefaultConstructor(ClientContext* context) = 0;
+ };
+ static void SetGlobalCallbacks(GlobalCallbacks* callbacks);
+
private:
// Disallow copy and assign.
ClientContext(const ClientContext&);