aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/descriptor.h
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2014-11-20 16:18:53 -0800
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2014-11-20 16:18:53 -0800
commit99aa0f9e8f1a88def7bdebf1385678559cda0707 (patch)
tree7ccb663ee9a1c722bf6062435ac705e83568c7e8 /src/google/protobuf/descriptor.h
parent49bc8c09636ae61f9c685d121278c3738b9a809a (diff)
Down-integrate from internal code base.
Diffstat (limited to 'src/google/protobuf/descriptor.h')
-rw-r--r--src/google/protobuf/descriptor.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h
index 0ee0a3f9..52df47f3 100644
--- a/src/google/protobuf/descriptor.h
+++ b/src/google/protobuf/descriptor.h
@@ -990,6 +990,11 @@ class LIBPROTOBUF_EXPORT MethodDescriptor {
// Gets the type of protocol message which this message produces as output.
const Descriptor* output_type() const;
+ // Gets whether the client streams multiple requests.
+ bool client_streaming() const;
+ // Gets whether the server streams multiple responses.
+ bool server_streaming() const;
+
// Get options for this method. These are specified in the .proto file by
// placing lines like "option foo = 1234;" in curly-braces after a method
// declaration. Allowed options are defined by MethodOptions in
@@ -1031,6 +1036,8 @@ class LIBPROTOBUF_EXPORT MethodDescriptor {
const Descriptor* input_type_;
const Descriptor* output_type_;
const MethodOptions* options_;
+ bool client_streaming_;
+ bool server_streaming_;
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<MethodDescriptor>() and AllocateArray<MethodDescriptor>() in
// descriptor.cc and update them to initialize the field.
@@ -1623,6 +1630,9 @@ PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions);
+PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool)
+PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool)
+
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*)