aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/impl
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-17 07:38:26 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-17 07:38:26 -0800
commit573523f1278a8c797c10ebb2a8b571d6891a22cc (patch)
tree1d250d9a1747e9fa3949776ecf9d9789ff0c633d /include/grpc++/impl
parent73b7018ebdf546684fc916dcf87d21dd82d0b4c5 (diff)
clang-format
Diffstat (limited to 'include/grpc++/impl')
-rw-r--r--include/grpc++/impl/call.h25
-rw-r--r--include/grpc++/impl/client_unary_call.h3
-rw-r--r--include/grpc++/impl/rpc_service_method.h15
3 files changed, 19 insertions, 24 deletions
diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h
index af1c710098..64f0f890c5 100644
--- a/include/grpc++/impl/call.h
+++ b/include/grpc++/impl/call.h
@@ -73,8 +73,8 @@ class CallOpBuffer : public CompletionQueueTag {
void AddClientRecvStatus(std::multimap<grpc::string, grpc::string> *metadata,
Status *status);
void AddServerSendStatus(std::multimap<grpc::string, grpc::string> *metadata,
- const Status& status);
- void AddServerRecvClose(bool* cancelled);
+ const Status &status);
+ void AddServerRecvClose(bool *cancelled);
// INTERNAL API:
@@ -85,32 +85,33 @@ class CallOpBuffer : public CompletionQueueTag {
void FinalizeResult(void **tag, bool *status) override;
bool got_message = false;
+
private:
void *return_tag_ = nullptr;
// Send initial metadata
bool send_initial_metadata_ = false;
size_t initial_metadata_count_ = 0;
- grpc_metadata* initial_metadata_ = nullptr;
+ grpc_metadata *initial_metadata_ = nullptr;
// Recv initial metadta
- std::multimap<grpc::string, grpc::string>* recv_initial_metadata_ = nullptr;
+ std::multimap<grpc::string, grpc::string> *recv_initial_metadata_ = nullptr;
grpc_metadata_array recv_initial_metadata_arr_ = {0, 0, nullptr};
// Send message
- const google::protobuf::Message* send_message_ = nullptr;
- grpc_byte_buffer* send_message_buf_ = nullptr;
+ const google::protobuf::Message *send_message_ = nullptr;
+ grpc_byte_buffer *send_message_buf_ = nullptr;
// Recv message
- google::protobuf::Message* recv_message_ = nullptr;
- grpc_byte_buffer* recv_message_buf_ = nullptr;
+ google::protobuf::Message *recv_message_ = nullptr;
+ grpc_byte_buffer *recv_message_buf_ = nullptr;
// Client send close
bool client_send_close_ = false;
// Client recv status
- std::multimap<grpc::string, grpc::string>* recv_trailing_metadata_ = nullptr;
- Status* recv_status_ = nullptr;
+ std::multimap<grpc::string, grpc::string> *recv_trailing_metadata_ = nullptr;
+ Status *recv_status_ = nullptr;
grpc_metadata_array recv_trailing_metadata_arr_ = {0, 0, nullptr};
grpc_status_code status_code_ = GRPC_STATUS_OK;
char *status_details_ = nullptr;
size_t status_details_capacity_ = 0;
// Server send status
- const Status* send_status_ = nullptr;
+ const Status *send_status_ = nullptr;
size_t trailing_metadata_count_ = 0;
grpc_metadata *trailing_metadata_ = nullptr;
int cancelled_buf_;
@@ -138,7 +139,7 @@ class Call final {
private:
CallHook *call_hook_;
CompletionQueue *cq_;
- grpc_call* call_;
+ grpc_call *call_;
};
} // namespace grpc
diff --git a/include/grpc++/impl/client_unary_call.h b/include/grpc++/impl/client_unary_call.h
index 091430b884..22a8a04c82 100644
--- a/include/grpc++/impl/client_unary_call.h
+++ b/include/grpc++/impl/client_unary_call.h
@@ -61,7 +61,6 @@ Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method,
const google::protobuf::Message &request,
google::protobuf::Message *result);
-} // namespace grpc
+} // namespace grpc
#endif
-
diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h
index c201676065..bf62871b7d 100644
--- a/include/grpc++/impl/rpc_service_method.h
+++ b/include/grpc++/impl/rpc_service_method.h
@@ -55,14 +55,10 @@ class MethodHandler {
public:
virtual ~MethodHandler() {}
struct HandlerParameter {
- HandlerParameter(Call *c,
- ServerContext* context,
+ HandlerParameter(Call* c, ServerContext* context,
const google::protobuf::Message* req,
google::protobuf::Message* resp)
- : call(c),
- server_context(context),
- request(req),
- response(resp) {}
+ : call(c), server_context(context), request(req), response(resp) {}
Call* call;
ServerContext* server_context;
const google::protobuf::Message* request;
@@ -152,7 +148,8 @@ class BidiStreamingHandler : public MethodHandler {
: func_(func), service_(service) {}
Status RunHandler(const HandlerParameter& param) final {
- ServerReaderWriter<ResponseType, RequestType> stream(param.call, param.server_context);
+ ServerReaderWriter<ResponseType, RequestType> stream(param.call,
+ param.server_context);
return func_(service_, param.server_context, &stream);
}
@@ -195,9 +192,7 @@ class RpcServiceMethod : public RpcMethod {
class RpcService {
public:
// Takes ownership.
- void AddMethod(RpcServiceMethod* method) {
- methods_.emplace_back(method);
- }
+ void AddMethod(RpcServiceMethod* method) { methods_.emplace_back(method); }
RpcServiceMethod* GetMethod(int i) { return methods_[i].get(); }
int GetMethodCount() const { return methods_.size(); }