diff options
author | Yang Gao <yangg@google.com> | 2015-02-10 14:23:15 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-02-10 14:23:15 -0800 |
commit | 7eb7d75c512020cc9ca43c12414281a2b7b45e78 (patch) | |
tree | 297c33da579d3b8cdbadbb251fd41c1dd10d31f8 /src/cpp/common | |
parent | 20f4af2e369f921e3709b6b443aa2fe92f39b9f3 (diff) |
call implementation before the meeting
Diffstat (limited to 'src/cpp/common')
-rw-r--r-- | src/cpp/common/call.cc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index 0315ffb6bd..37e374bad3 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -36,6 +36,52 @@ namespace grpc { +void CallOpBuffer::Reset(void* next_return_tag) { + return_tag_ = next_return_tag; + metadata_ = nullptr; + send_message_ = nullptr; + recv_message_ = nullptr; + client_send_close_ = false; + status_ = false; +} + +void CallOpBuffer::AddSendInitialMetadata( + std::multimap<igrpc::string, grpc::string>* metadata) { + metadata_ = metadata; +} + +void CallOpBuffer::AddSendMessage(const google::protobuf::Message& message) { + send_message_ = &message; +} + +void CallOpBuffer::AddRecvMessage(google::protobuf::Message *message) { + recv_message_ = message; +} + +void CallOpBuffer::AddClientSendClose() { + client_sent_close_ = true; +} + +void CallOpBuffer::AddClientRecvStatus(Status *status) { + status_ = status; +} + +void CallOpBuffer::FillOps(grpc_op *ops, size_t *nops) { + + +} + +void CallOpBuffer::FinalizeResult(void *tag, bool *status) { + +} + +void CCallDeleter::operator()(grpc_call* c) { + grpc_call_destroy(c); +} + +Call::Call(grpc_call* call, ChannelInterface* channel, CompletionQueue* cq) + : channel_(channel), cq_(cq), call_(call) {} + void Call::PerformOps(CallOpBuffer* buffer) { channel_->PerformOpsOnCall(buffer, this); } |