Skip to content
Snippets Groups Projects
Commit 9a009f2a authored by yang-g's avatar yang-g
Browse files

make accessors from get_x() to x()

parent ef4aac6d
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,7 @@ class ClientContext { ...@@ -110,7 +110,7 @@ class ClientContext {
creds_ = creds; creds_ = creds;
} }
grpc_compression_algorithm get_compression_algorithm() const { grpc_compression_algorithm compression_algorithm() const {
return compression_algorithm_; return compression_algorithm_;
} }
...@@ -119,8 +119,8 @@ class ClientContext { ...@@ -119,8 +119,8 @@ class ClientContext {
std::shared_ptr<const AuthContext> auth_context() const; std::shared_ptr<const AuthContext> auth_context() const;
// Get and set census context // Get and set census context
void set_census_context(census_context* ccp) { census_context_ = ccp; } void set_census_context(struct census_context* ccp) { census_context_ = ccp; }
census_context* get_census_context() const { return census_context_; } struct census_context* census_context() const { return census_context_; }
void TryCancel(); void TryCancel();
...@@ -170,7 +170,7 @@ class ClientContext { ...@@ -170,7 +170,7 @@ class ClientContext {
grpc::string authority_; grpc::string authority_;
std::shared_ptr<Credentials> creds_; std::shared_ptr<Credentials> creds_;
mutable std::shared_ptr<const AuthContext> auth_context_; 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> send_initial_metadata_;
std::multimap<grpc::string, grpc::string> recv_initial_metadata_; std::multimap<grpc::string, grpc::string> recv_initial_metadata_;
std::multimap<grpc::string, grpc::string> trailing_metadata_; std::multimap<grpc::string, grpc::string> trailing_metadata_;
......
...@@ -104,12 +104,12 @@ class ServerContext { ...@@ -104,12 +104,12 @@ class ServerContext {
return client_metadata_; return client_metadata_;
} }
grpc_compression_level get_compression_level() const { grpc_compression_level compression_level() const {
return compression_level_; return compression_level_;
} }
void set_compression_level(grpc_compression_level 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_; return compression_algorithm_;
} }
void set_compression_algorithm(grpc_compression_algorithm algorithm); void set_compression_algorithm(grpc_compression_algorithm algorithm);
......
...@@ -69,7 +69,7 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context, ...@@ -69,7 +69,7 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context,
? target_.c_str() ? target_.c_str()
: context->authority().c_str(), : context->authority().c_str(),
context->raw_deadline()); 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); GRPC_TIMER_MARK(GRPC_PTAG_CPP_CALL_CREATED, c_call);
context->set_call(c_call, shared_from_this()); context->set_call(c_call, shared_from_this());
return Call(c_call, this, cq); return Call(c_call, this, cq);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment