diff options
author | Yang Gao <yangg@google.com> | 2015-03-17 10:49:39 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-03-17 10:49:39 -0700 |
commit | 6baa9b67ada4f0abadd27a830778463f3e8aabd3 (patch) | |
tree | aa2c06f9261e2047ac41c726ba74b7c7b107c757 /include/grpc++/impl | |
parent | 09eaec027ab4b3d97cb239820af98fe0c460f287 (diff) |
clang-format c++ code
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r-- | include/grpc++/impl/call.h | 72 | ||||
-rw-r--r-- | include/grpc++/impl/client_unary_call.h | 8 |
2 files changed, 40 insertions, 40 deletions
diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index a8551ad459..e117ac6313 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -55,89 +55,89 @@ class CallOpBuffer : public CompletionQueueTag { CallOpBuffer(); ~CallOpBuffer(); - void Reset(void *next_return_tag); + void Reset(void* next_return_tag); // Does not take ownership. void AddSendInitialMetadata( - std::multimap<grpc::string, grpc::string> *metadata); - void AddSendInitialMetadata(ClientContext *ctx); - void AddRecvInitialMetadata(ClientContext *ctx); - void AddSendMessage(const grpc::protobuf::Message &message); + std::multimap<grpc::string, grpc::string>* 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 AddRecvMessage(grpc::protobuf::Message* message); + void AddRecvMessage(ByteBuffer* message); void AddClientSendClose(); - void AddClientRecvStatus(ClientContext *ctx, Status *status); - void AddServerSendStatus(std::multimap<grpc::string, grpc::string> *metadata, - const Status &status); - void AddServerRecvClose(bool *cancelled); + void AddClientRecvStatus(ClientContext* ctx, Status* status); + void AddServerSendStatus(std::multimap<grpc::string, grpc::string>* 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); + 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; + bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE; bool got_message; private: - void *return_tag_; + void* return_tag_; // Send initial metadata bool send_initial_metadata_; size_t initial_metadata_count_; - grpc_metadata *initial_metadata_; + grpc_metadata* initial_metadata_; // Recv initial metadta - std::multimap<grpc::string, grpc::string> *recv_initial_metadata_; + std::multimap<grpc::string, grpc::string>* 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_; + 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_; + grpc::protobuf::Message* recv_message_; + ByteBuffer* recv_message_buffer_; + grpc_byte_buffer* recv_buf_; // Client send close bool client_send_close_; // Client recv status - std::multimap<grpc::string, grpc::string> *recv_trailing_metadata_; - Status *recv_status_; + std::multimap<grpc::string, grpc::string>* recv_trailing_metadata_; + Status* recv_status_; grpc_metadata_array recv_trailing_metadata_arr_; grpc_status_code status_code_; - char *status_details_; + char* status_details_; size_t status_details_capacity_; // Server send status - const Status *send_status_; + const Status* send_status_; size_t trailing_metadata_count_; - grpc_metadata *trailing_metadata_; + grpc_metadata* trailing_metadata_; int cancelled_buf_; - bool *recv_closed_; + bool* recv_closed_; }; // Channel and Server implement this to allow them to hook performing ops class CallHook { public: virtual ~CallHook() {} - virtual void PerformOpsOnCall(CallOpBuffer *ops, Call *call) = 0; + virtual void PerformOpsOnCall(CallOpBuffer* ops, Call* call) = 0; }; // Straightforward wrapping of the C call object class Call GRPC_FINAL { public: /* call is owned by the caller */ - Call(grpc_call *call, CallHook *call_hook_, CompletionQueue *cq); + Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq); - void PerformOps(CallOpBuffer *buffer); + void PerformOps(CallOpBuffer* buffer); - grpc_call *call() { return call_; } - CompletionQueue *cq() { return cq_; } + grpc_call* call() { return call_; } + CompletionQueue* cq() { return cq_; } private: - CallHook *call_hook_; - CompletionQueue *cq_; - grpc_call *call_; + CallHook* call_hook_; + CompletionQueue* cq_; + grpc_call* call_; }; } // namespace grpc diff --git a/include/grpc++/impl/client_unary_call.h b/include/grpc++/impl/client_unary_call.h index fd9715da50..0e8aeed781 100644 --- a/include/grpc++/impl/client_unary_call.h +++ b/include/grpc++/impl/client_unary_call.h @@ -45,10 +45,10 @@ class RpcMethod; class Status; // Wrapper that performs a blocking unary call -Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, - ClientContext *context, - const grpc::protobuf::Message &request, - grpc::protobuf::Message *result); +Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, + ClientContext* context, + const grpc::protobuf::Message& request, + grpc::protobuf::Message* result); } // namespace grpc |