Skip to content
Snippets Groups Projects
Commit 718c3f75 authored by rocking's avatar rocking Committed by Jan Tattermusch
Browse files

Change cpp and go codegen to use new method properties instead of method options

	Change on 2014/12/11 by rocking <rocking@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81906922
parent 57c6f0ca
No related branches found
No related tags found
No related merge requests found
...@@ -43,23 +43,23 @@ namespace grpc_cpp_generator { ...@@ -43,23 +43,23 @@ namespace grpc_cpp_generator {
namespace { namespace {
bool NoStreaming(const google::protobuf::MethodDescriptor* method) { bool NoStreaming(const google::protobuf::MethodDescriptor* method) {
return !method->options().has_client_streaming() && return !method->client_streaming() &&
!method->options().has_server_streaming(); !method->server_streaming();
} }
bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor* method) { bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor* method) {
return method->options().has_client_streaming() && return method->client_streaming() &&
!method->options().has_server_streaming(); !method->server_streaming();
} }
bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor* method) { bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor* method) {
return !method->options().has_client_streaming() && return !method->client_streaming() &&
method->options().has_server_streaming(); method->server_streaming();
} }
bool BidiStreaming(const google::protobuf::MethodDescriptor* method) { bool BidiStreaming(const google::protobuf::MethodDescriptor* method) {
return method->options().has_client_streaming() && return method->client_streaming() &&
method->options().has_server_streaming(); method->server_streaming();
} }
bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) { bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) {
......
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