aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/channel_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc++/channel_interface.h')
-rw-r--r--include/grpc++/channel_interface.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/grpc++/channel_interface.h b/include/grpc++/channel_interface.h
index 4d48974e69..10fb9538bc 100644
--- a/include/grpc++/channel_interface.h
+++ b/include/grpc++/channel_interface.h
@@ -34,6 +34,8 @@
#ifndef GRPCXX_CHANNEL_INTERFACE_H
#define GRPCXX_CHANNEL_INTERFACE_H
+#include <memory>
+
#include <grpc++/status.h>
#include <grpc++/impl/call.h>
@@ -47,11 +49,12 @@ class CompletionQueue;
class RpcMethod;
class CallInterface;
-class ChannelInterface : public CallHook {
+class ChannelInterface : public CallHook,
+ public std::enable_shared_from_this<ChannelInterface> {
public:
virtual ~ChannelInterface() {}
- virtual void *RegisterMethod(const char *method_name) = 0;
+ virtual void* RegisterMethod(const char* method_name) = 0;
virtual Call CreateCall(const RpcMethod& method, ClientContext* context,
CompletionQueue* cq) = 0;
};