diff options
author | Jeff Davidson <jpd@google.com> | 2014-09-15 16:29:06 -0700 |
---|---|---|
committer | Jeff Davidson <jpd@google.com> | 2015-01-15 14:10:53 -0800 |
commit | a3b2a6da25a76f17c73d31def3952feb0fd2296e (patch) | |
tree | 586f7d5e9a7e05af45d0e821188097c0faa96219 /src/google/protobuf/compiler/java/java_service.h | |
parent | c7c25812eb19d080087b71e08bfe35aff9f21433 (diff) | |
download | external_protobuf-a3b2a6da25a76f17c73d31def3952feb0fd2296e.zip external_protobuf-a3b2a6da25a76f17c73d31def3952feb0fd2296e.tar.gz external_protobuf-a3b2a6da25a76f17c73d31def3952feb0fd2296e.tar.bz2 |
Update protobuf library from 2.3 to 2.6.
Copied in all files from the open source protobuf project at commit
edc5994525c79cd1919859a370837a6ff7c8e308, removing files which have
been renamed (COPYING.txt -> LICENSE, README.txt -> README.md).
Removed 2.3 prebuilts, which is an approach that will not work due to
incompatibility with the 2.6 runtime.
Merged in micro/nano-specific changes in the following files:
-Android.mk - updated list of C++/Java sources, bumped versions
-java/README.txt - merged in micro/nano instructions, bumped versions
-java/pom.xml - merged in micro/nano build rules, set packaging to jar
-src/Makefile.am - merged in references to micro/nano generators
-src/google/protobuf/compiler/javamicro/javamicro_file.h - imported
google/protobuf/compiler/code_generator.h and removed redundant
OutputDirectory class.
-src/google/protobuf/compiler/javanano/javanano_file.h - same
-Replaced instances of vector with std::vector as needed to get
libprotobuf-cpp-full to compile. Plan to upstream this fix per
discussion with protobuf maintainers.
Reran autogen.sh to update ./configure and associated scripts.
Change-Id: I949d32fb5126f1c05e2a6ed48f6636a4a9b15a48
Diffstat (limited to 'src/google/protobuf/compiler/java/java_service.h')
-rw-r--r-- | src/google/protobuf/compiler/java/java_service.h | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/src/google/protobuf/compiler/java/java_service.h b/src/google/protobuf/compiler/java/java_service.h index e07eebf..0d52325 100644 --- a/src/google/protobuf/compiler/java/java_service.h +++ b/src/google/protobuf/compiler/java/java_service.h @@ -40,8 +40,14 @@ namespace google { namespace protobuf { + namespace compiler { + namespace java { + class Context; // context.h + class ClassNameResolver; // name_resolver.h + } + } namespace io { - class Printer; // printer.h + class Printer; // printer.h } } @@ -52,9 +58,27 @@ namespace java { class ServiceGenerator { public: explicit ServiceGenerator(const ServiceDescriptor* descriptor); - ~ServiceGenerator(); + virtual ~ServiceGenerator(); + + virtual void Generate(io::Printer* printer) = 0; + + enum RequestOrResponse { REQUEST, RESPONSE }; + enum IsAbstract { IS_ABSTRACT, IS_CONCRETE }; + + protected: + const ServiceDescriptor* descriptor_; + + private: + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); +}; - void Generate(io::Printer* printer); +class ImmutableServiceGenerator : public ServiceGenerator { + public: + explicit ImmutableServiceGenerator(const ServiceDescriptor* descriptor, + Context* context); + virtual ~ImmutableServiceGenerator(); + + virtual void Generate(io::Printer* printer); private: @@ -80,7 +104,6 @@ class ServiceGenerator { void GenerateCallBlockingMethod(io::Printer* printer); // Generate the implementations of Service.get{Request,Response}Prototype(). - enum RequestOrResponse { REQUEST, RESPONSE }; void GenerateGetPrototype(RequestOrResponse which, io::Printer* printer); // Generate a stub implementation of the service. @@ -88,7 +111,6 @@ class ServiceGenerator { // Generate a method signature, possibly abstract, without body or trailing // semicolon. - enum IsAbstract { IS_ABSTRACT, IS_CONCRETE }; void GenerateMethodSignature(io::Printer* printer, const MethodDescriptor* method, IsAbstract is_abstract); @@ -100,9 +122,9 @@ class ServiceGenerator { void GenerateBlockingMethodSignature(io::Printer* printer, const MethodDescriptor* method); - const ServiceDescriptor* descriptor_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); + Context* context_; + ClassNameResolver* name_resolver_; + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableServiceGenerator); }; } // namespace java |