From b73856916ac97efa9ec8091ba339e82e52b5a694 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 5 Jun 2015 07:40:03 -0700 Subject: [PATCH] Remove old code, simplify a little --- include/grpc++/impl/call.h | 80 +------------------------------------- 1 file changed, 2 insertions(+), 78 deletions(-) diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 7fccd95f8e7..eb8027cef5e 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -376,81 +376,6 @@ class CallOpSet : public CallOpSetInterface, void* return_tag_; }; -#if 0 -class CallOpBuffer : public CompletionQueueTag { - public: - CallOpBuffer(); - ~CallOpBuffer(); - - void Reset(void* next_return_tag); - - // Does not take ownership. - void AddSendInitialMetadata( - std::multimap* metadata); - void AddSendInitialMetadata(ClientContext* ctx); - void AddRecvInitialMetadata(ClientContext* ctx); - void AddSendMessage(const grpc::protobuf::Message& message); - void AddSendMessage(const ByteBuffer& message); - void AddRecvMessage(grpc::protobuf::Message* message); - void AddRecvMessage(ByteBuffer* message); - void AddClientSendClose(); - void AddClientRecvStatus(ClientContext* ctx, Status* status); - void AddServerSendStatus(std::multimap* metadata, - const Status& status); - void AddServerRecvClose(bool* cancelled); - - // INTERNAL API: - - // Convert to an array of grpc_op elements - void FillOps(grpc_op* ops, size_t* nops); - - // Called by completion queue just prior to returning from Next() or Pluck() - bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE; - - void set_max_message_size(int max_message_size) { - max_message_size_ = max_message_size; - } - - bool got_message; - - private: - void* return_tag_; - // Send initial metadata - bool send_initial_metadata_; - size_t initial_metadata_count_; - grpc_metadata* initial_metadata_; - // Recv initial metadta - std::multimap* recv_initial_metadata_; - grpc_metadata_array recv_initial_metadata_arr_; - // Send message - const grpc::protobuf::Message* send_message_; - const ByteBuffer* send_message_buffer_; - grpc_byte_buffer* send_buf_; - // Recv message - grpc::protobuf::Message* recv_message_; - ByteBuffer* recv_message_buffer_; - grpc_byte_buffer* recv_buf_; - int max_message_size_; - // Client send close - bool client_send_close_; - // Client recv status - std::multimap* recv_trailing_metadata_; - Status* recv_status_; - grpc_metadata_array recv_trailing_metadata_arr_; - grpc_status_code status_code_; - char* status_details_; - size_t status_details_capacity_; - // Server send status - bool send_status_available_; - grpc_status_code send_status_code_; - grpc::string send_status_details_; - size_t trailing_metadata_count_; - grpc_metadata* trailing_metadata_; - int cancelled_buf_; - bool* recv_closed_; -}; -#endif - // SneakyCallOpBuffer does not post completions to the completion queue template @@ -458,9 +383,8 @@ class SneakyCallOpSet GRPC_FINAL : public CallOpSet { public: bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { - return CallOpSet::FinalizeResult(tag, - status) && - false; + typedef CallOpSet Base; + return Base::FinalizeResult(tag, status) && false; } };