aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/impl/codegen/call.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-08-21 14:32:13 -0700
committerGravatar Vijay Pai <vpai@google.com>2018-08-30 15:46:27 -0700
commit8bf52535d1008a3f38e70d1387846f0e942761b5 (patch)
tree4d162e97b5917cdd9373f55a02b34284e4354e55 /include/grpcpp/impl/codegen/call.h
parentd766b9a2a40fd3002d9b93c97525a868c9d92dc4 (diff)
Provide a generic client-side unary callback API
Diffstat (limited to 'include/grpcpp/impl/codegen/call.h')
-rw-r--r--include/grpcpp/impl/codegen/call.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/grpcpp/impl/codegen/call.h b/include/grpcpp/impl/codegen/call.h
index a5e930aaa5..7bd03b6b1b 100644
--- a/include/grpcpp/impl/codegen/call.h
+++ b/include/grpcpp/impl/codegen/call.h
@@ -608,6 +608,9 @@ class CallOpSetInterface : public CompletionQueueTag {
/// Fills in grpc_op, starting from ops[*nops] and moving
/// upwards.
virtual void FillOps(grpc_call* call, grpc_op* ops, size_t* nops) = 0;
+
+ /// Get the tag to be used at the CQ
+ virtual void* cq_tag() = 0;
};
/// Primary implementation of CallOpSetInterface.
@@ -627,7 +630,7 @@ class CallOpSet : public CallOpSetInterface,
public Op5,
public Op6 {
public:
- CallOpSet() : return_tag_(this), call_(nullptr) {}
+ CallOpSet() : cq_tag_(this), return_tag_(this), call_(nullptr) {}
void FillOps(grpc_call* call, grpc_op* ops, size_t* nops) override {
this->Op1::AddOp(ops, nops);
this->Op2::AddOp(ops, nops);
@@ -654,7 +657,12 @@ class CallOpSet : public CallOpSetInterface,
void set_output_tag(void* return_tag) { return_tag_ = return_tag; }
+ void* cq_tag() override { return cq_tag_; }
+
+ void set_cq_tag(void* cq_tag) { cq_tag_ = cq_tag; }
+
private:
+ void* cq_tag_;
void* return_tag_;
grpc_call* call_;
};