aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/client')
-rw-r--r--src/cpp/client/channel.h10
-rw-r--r--src/cpp/client/channel_arguments.cc18
-rw-r--r--src/cpp/client/client_context.cc8
-rw-r--r--src/cpp/client/client_unary_call.cc8
-rw-r--r--src/cpp/client/create_channel.cc9
5 files changed, 27 insertions, 26 deletions
diff --git a/src/cpp/client/channel.h b/src/cpp/client/channel.h
index a1de3817e6..3980eba237 100644
--- a/src/cpp/client/channel.h
+++ b/src/cpp/client/channel.h
@@ -51,16 +51,16 @@ class StreamContextInterface;
class Channel GRPC_FINAL : public ChannelInterface {
public:
- Channel(const grpc::string &target, grpc_channel *c_channel);
+ Channel(const grpc::string& target, grpc_channel* c_channel);
~Channel() GRPC_OVERRIDE;
- virtual Call CreateCall(const RpcMethod &method, ClientContext *context,
- CompletionQueue *cq) GRPC_OVERRIDE;
- virtual void PerformOpsOnCall(CallOpBuffer *ops, Call *call) GRPC_OVERRIDE;
+ virtual Call CreateCall(const RpcMethod& method, ClientContext* context,
+ CompletionQueue* cq) GRPC_OVERRIDE;
+ virtual void PerformOpsOnCall(CallOpBuffer* ops, Call* call) GRPC_OVERRIDE;
private:
const grpc::string target_;
- grpc_channel *const c_channel_; // owned
+ grpc_channel* const c_channel_; // owned
};
} // namespace grpc
diff --git a/src/cpp/client/channel_arguments.cc b/src/cpp/client/channel_arguments.cc
index abf0fc1c0a..87f8349eef 100644
--- a/src/cpp/client/channel_arguments.cc
+++ b/src/cpp/client/channel_arguments.cc
@@ -37,7 +37,7 @@
namespace grpc {
-void ChannelArguments::SetSslTargetNameOverride(const grpc::string &name) {
+void ChannelArguments::SetSslTargetNameOverride(const grpc::string& name) {
SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, name);
}
@@ -50,32 +50,32 @@ grpc::string ChannelArguments::GetSslTargetNameOverride() const {
return "";
}
-void ChannelArguments::SetInt(const grpc::string &key, int value) {
+void ChannelArguments::SetInt(const grpc::string& key, int value) {
grpc_arg arg;
arg.type = GRPC_ARG_INTEGER;
strings_.push_back(key);
- arg.key = const_cast<char *>(strings_.back().c_str());
+ arg.key = const_cast<char*>(strings_.back().c_str());
arg.value.integer = value;
args_.push_back(arg);
}
-void ChannelArguments::SetString(const grpc::string &key,
- const grpc::string &value) {
+void ChannelArguments::SetString(const grpc::string& key,
+ const grpc::string& value) {
grpc_arg arg;
arg.type = GRPC_ARG_STRING;
strings_.push_back(key);
- arg.key = const_cast<char *>(strings_.back().c_str());
+ arg.key = const_cast<char*>(strings_.back().c_str());
strings_.push_back(value);
- arg.value.string = const_cast<char *>(strings_.back().c_str());
+ arg.value.string = const_cast<char*>(strings_.back().c_str());
args_.push_back(arg);
}
-void ChannelArguments::SetChannelArgs(grpc_channel_args *channel_args) const {
+void ChannelArguments::SetChannelArgs(grpc_channel_args* channel_args) const {
channel_args->num_args = args_.size();
if (channel_args->num_args > 0) {
- channel_args->args = const_cast<grpc_arg *>(&args_[0]);
+ channel_args->args = const_cast<grpc_arg*>(&args_[0]);
}
}
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index 9f99f7bcd5..de9f8c7201 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -53,7 +53,7 @@ ClientContext::~ClientContext() {
if (cq_) {
grpc_completion_queue_shutdown(cq_);
// Drain cq_.
- grpc_event *ev;
+ grpc_event* ev;
grpc_completion_type t;
do {
ev = grpc_completion_queue_next(cq_, gpr_inf_future);
@@ -65,7 +65,7 @@ ClientContext::~ClientContext() {
}
void ClientContext::set_absolute_deadline(
- const system_clock::time_point &deadline) {
+ const system_clock::time_point& deadline) {
Timepoint2Timespec(deadline, &absolute_deadline_);
}
@@ -73,8 +73,8 @@ system_clock::time_point ClientContext::absolute_deadline() {
return Timespec2Timepoint(absolute_deadline_);
}
-void ClientContext::AddMetadata(const grpc::string &meta_key,
- const grpc::string &meta_value) {
+void ClientContext::AddMetadata(const grpc::string& meta_key,
+ const grpc::string& meta_value) {
send_initial_metadata_.insert(std::make_pair(meta_key, meta_value));
}
diff --git a/src/cpp/client/client_unary_call.cc b/src/cpp/client/client_unary_call.cc
index 5c179de9d8..7e7ea78bcd 100644
--- a/src/cpp/client/client_unary_call.cc
+++ b/src/cpp/client/client_unary_call.cc
@@ -42,10 +42,10 @@
namespace grpc {
// 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) {
CompletionQueue cq;
Call call(channel->CreateCall(method, context, &cq));
CallOpBuffer buf;
diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc
index 57d215d0f3..301430572a 100644
--- a/src/cpp/client/create_channel.cc
+++ b/src/cpp/client/create_channel.cc
@@ -41,9 +41,10 @@ namespace grpc {
class ChannelArguments;
std::shared_ptr<ChannelInterface> CreateChannel(
- const grpc::string &target, const std::unique_ptr<Credentials> &creds,
- const ChannelArguments &args) {
- return creds ? creds->CreateChannel(target, args) :
- std::shared_ptr<ChannelInterface>(new Channel(target, grpc_lame_client_channel_create()));
+ const grpc::string& target, const std::unique_ptr<Credentials>& creds,
+ const ChannelArguments& args) {
+ return creds ? creds->CreateChannel(target, args)
+ : std::shared_ptr<ChannelInterface>(
+ new Channel(target, grpc_lame_client_channel_create()));
}
} // namespace grpc