make accessors from get_x() to x()

pull/2706/head
yang-g 9 years ago
parent ef4aac6dae
commit 9a009f2a75
  1. 8
      include/grpc++/client_context.h
  2. 4
      include/grpc++/server_context.h
  3. 2
      src/cpp/client/channel.cc

@ -110,7 +110,7 @@ class ClientContext {
creds_ = creds;
}
grpc_compression_algorithm get_compression_algorithm() const {
grpc_compression_algorithm compression_algorithm() const {
return compression_algorithm_;
}
@ -119,8 +119,8 @@ class ClientContext {
std::shared_ptr<const AuthContext> auth_context() const;
// Get and set census context
void set_census_context(census_context* ccp) { census_context_ = ccp; }
census_context* get_census_context() const { return census_context_; }
void set_census_context(struct census_context* ccp) { census_context_ = ccp; }
struct census_context* census_context() const { return census_context_; }
void TryCancel();
@ -170,7 +170,7 @@ class ClientContext {
grpc::string authority_;
std::shared_ptr<Credentials> creds_;
mutable std::shared_ptr<const AuthContext> auth_context_;
census_context* census_context_;
struct census_context* census_context_;
std::multimap<grpc::string, grpc::string> send_initial_metadata_;
std::multimap<grpc::string, grpc::string> recv_initial_metadata_;
std::multimap<grpc::string, grpc::string> trailing_metadata_;

@ -104,12 +104,12 @@ class ServerContext {
return client_metadata_;
}
grpc_compression_level get_compression_level() const {
grpc_compression_level compression_level() const {
return compression_level_;
}
void set_compression_level(grpc_compression_level level);
grpc_compression_algorithm get_compression_algorithm() const {
grpc_compression_algorithm compression_algorithm() const {
return compression_algorithm_;
}
void set_compression_algorithm(grpc_compression_algorithm algorithm);

@ -69,7 +69,7 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context,
? target_.c_str()
: context->authority().c_str(),
context->raw_deadline());
grpc_census_call_set_context(c_call, context->get_census_context());
grpc_census_call_set_context(c_call, context->census_context());
GRPC_TIMER_MARK(GRPC_PTAG_CPP_CALL_CREATED, c_call);
context->set_call(c_call, shared_from_this());
return Call(c_call, this, cq);

Loading…
Cancel
Save