diff --git a/contrib/endpoints/include/BUILD b/contrib/endpoints/include/BUILD index b97581cdeeb..673cbbedfdf 100644 --- a/contrib/endpoints/include/BUILD +++ b/contrib/endpoints/include/BUILD @@ -33,7 +33,7 @@ cc_library( ":headers", ], visibility = [ - "//contrib/endpoints/src/api_manager:__subpackages__", + "//contrib/endpoints/src:__subpackages__", ], ) diff --git a/contrib/endpoints/src/grpc/transcoding/BUILD b/contrib/endpoints/src/grpc/transcoding/BUILD new file mode 100644 index 00000000000..83c77985357 --- /dev/null +++ b/contrib/endpoints/src/grpc/transcoding/BUILD @@ -0,0 +1,377 @@ +# Copyright (C) Extensible Service Proxy Authors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +################################################################################ +# +package(default_visibility = ["//visibility:private"]) + +load("@protobuf_git//:protobuf.bzl", "cc_proto_library") + +cc_library( + name = "prefix_writer", + srcs = [ + "prefix_writer.cc", + ], + hdrs = [ + "prefix_writer.h", + ], + deps = [ + "//external:protobuf", + ], +) + +cc_library( + name = "request_weaver", + srcs = [ + "request_weaver.cc", + ], + hdrs = [ + "request_weaver.h", + ], + deps = [ + "//external:protobuf", + ], +) + +cc_library( + name = "type_helper", + srcs = [ + "type_helper.cc", + ], + hdrs = [ + "type_helper.h", + ], + deps = [ + "//external:protobuf", + "//contrib/endpoints/include:headers_only", + ], +) + +cc_library( + name = "message_stream", + srcs = [ + "message_stream.cc", + ], + hdrs = [ + "message_stream.h", + ], + deps = [ + "//external:protobuf", + ], +) + +cc_library( + name = "request_message_translator", + srcs = [ + "request_message_translator.cc", + ], + hdrs = [ + "request_message_translator.h", + ], + deps = [ + ":message_stream", + ":prefix_writer", + ":request_weaver", + "//external:protobuf", + ], +) + +cc_library( + name = "request_stream_translator", + srcs = [ + "request_stream_translator.cc", + ], + hdrs = [ + "request_stream_translator.h", + ], + deps = [ + ":request_message_translator", + "//external:protobuf", + ], +) + +cc_library( + name = "json_request_translator", + srcs = [ + "json_request_translator.cc", + ], + hdrs = [ + "json_request_translator.h", + ], + deps = [ + ":request_message_translator", + ":request_stream_translator", + "//external:protobuf", + ], +) + +cc_library( + name = "message_reader", + srcs = [ + "message_reader.cc", + ], + hdrs = [ + "message_reader.h", + ], + deps = [ + "//external:protobuf", + ], +) + +cc_library( + name = "response_to_json_translator", + srcs = [ + "response_to_json_translator.cc", + ], + hdrs = [ + "response_to_json_translator.h", + ], + deps = [ + ":message_reader", + ":message_stream", + "//external:protobuf", + ], +) + +cc_library( + name = "transcoding", + srcs = [ + "transcoder_factory.cc", + ], + hdrs = [ + "transcoder_factory.h", + "transcoder.h", + ], + visibility = ["//visibility:public"], + deps = [ + ":json_request_translator", + ":message_stream", + ":response_to_json_translator", + ":type_helper", + "//external:protobuf", + "//contrib/endpoints/include:headers_only", + "//external:service_config", + ], +) + +cc_test( + name = "prefix_writer_test", + size = "small", + srcs = [ + "prefix_writer_test.cc", + ], + deps = [ + ":prefix_writer", + "//external:googletest_main", + ], +) + +cc_test( + name = "request_weaver_test", + size = "small", + srcs = [ + "request_weaver_test.cc", + ], + deps = [ + ":request_weaver", + "//external:googletest_main", + ], +) + +cc_test( + name = "type_helper_test", + size = "small", + srcs = [ + "type_helper_test.cc", + ], + data = [ + "testdata/bookstore_service.pb.txt", + ], + deps = [ + ":test_common", + ":type_helper", + "//external:googletest_main", + "//external:service_config", + ], +) + +cc_proto_library( + name = "bookstore_test_proto", + testonly = 1, + srcs = ["bookstore.proto"], + default_runtime = "//external:protobuf", + protoc = "//external:protoc", + deps = [ + "//external:cc_wkt_protos", + ], +) + +cc_library( + name = "test_common", + testonly = 1, + srcs = ["test_common.cc"], + hdrs = ["test_common.h"], + deps = [ + "//external:googletest", + "//external:protobuf", + "//external:service_config", + ], +) + +cc_library( + name = "request_translator_test_base", + testonly = 1, + srcs = [ + "proto_stream_tester.cc", + "proto_stream_tester.h", + "request_translator_test_base.cc", + ], + hdrs = [ + "request_translator_test_base.h", + ], + deps = [ + ":bookstore_test_proto", + ":request_message_translator", + ":test_common", + ":type_helper", + "//external:googletest", + "//external:protobuf", + "//external:service_config", + ], +) + +cc_test( + name = "request_message_translator_test", + size = "small", + srcs = [ + "request_message_translator_test.cc", + ], + data = [ + "testdata/bookstore_service.pb.txt", + ], + deps = [ + ":bookstore_test_proto", + ":request_message_translator", + ":request_translator_test_base", + ":test_common", + "//external:googletest_main", + ], +) + +cc_test( + name = "request_stream_translator_test", + size = "small", + srcs = [ + "request_stream_translator_test.cc", + ], + data = [ + "testdata/bookstore_service.pb.txt", + ], + deps = [ + ":bookstore_test_proto", + ":request_stream_translator", + ":request_translator_test_base", + "//external:googletest_main", + ], +) + +cc_test( + name = "json_request_translator_test", + size = "small", + srcs = [ + "json_request_translator_test.cc", + ], + data = [ + "testdata/bookstore_service.pb.txt", + ], + deps = [ + ":bookstore_test_proto", + ":json_request_translator", + ":request_translator_test_base", + ":test_common", + "//external:googletest_main", + ], +) + +cc_test( + name = "message_reader_test", + size = "small", + srcs = [ + "message_reader_test.cc", + ], + deps = [ + ":message_reader", + ":test_common", + "//external:googletest_main", + ], +) + +cc_test( + name = "response_to_json_translator_test", + size = "small", + srcs = [ + "response_to_json_translator_test.cc", + ], + data = [ + "testdata/bookstore_service.pb.txt", + ], + deps = [ + ":bookstore_test_proto", + ":message_reader", + ":response_to_json_translator", + ":test_common", + ":type_helper", + "//external:googletest_main", + ], +) + +cc_test( + name = "message_stream_test", + size = "small", + srcs = [ + "message_stream_test.cc", + ], + deps = [ + ":message_stream", + ":test_common", + "//external:googletest_main", + ], +) + +cc_test( + name = "transcoder_test", + size = "small", + srcs = [ + "transcoder_test.cc", + ], + data = [ + "testdata/bookstore_service.pb.txt", + ], + deps = [ + ":bookstore_test_proto", + ":test_common", + ":transcoding", + "//external:googletest_main", + ], +) diff --git a/contrib/endpoints/src/grpc/transcoding/json_request_translator.cc b/contrib/endpoints/src/grpc/transcoding/json_request_translator.cc index 3ab1591d116..c72e88921c7 100644 --- a/contrib/endpoints/src/grpc/transcoding/json_request_translator.cc +++ b/contrib/endpoints/src/grpc/transcoding/json_request_translator.cc @@ -14,17 +14,17 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/json_request_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/json_request_translator.h" #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/request_stream_translator.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/stubs/status.h" #include "google/protobuf/util/internal/json_stream_parser.h" #include "google/protobuf/util/internal/object_writer.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/request_message_translator.h" -#include "src/grpc/transcoding/request_stream_translator.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/json_request_translator.h b/contrib/endpoints/src/grpc/transcoding/json_request_translator.h index bc1490f2ada..5c026e492b4 100644 --- a/contrib/endpoints/src/grpc/transcoding/json_request_translator.h +++ b/contrib/endpoints/src/grpc/transcoding/json_request_translator.h @@ -12,16 +12,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifndef GRPC_TRANSCODING_JSON_REQUEST_TRANSLATOR_H_ #define GRPC_TRANSCODING_JSON_REQUEST_TRANSLATOR_H_ #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/request_stream_translator.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/util/internal/json_stream_parser.h" #include "google/protobuf/util/type_resolver.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/request_message_translator.h" -#include "src/grpc/transcoding/request_stream_translator.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/json_request_translator_test.cc b/contrib/endpoints/src/grpc/transcoding/json_request_translator_test.cc index 9d05181223b..3bf74a28e2e 100644 --- a/contrib/endpoints/src/grpc/transcoding/json_request_translator_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/json_request_translator_test.cc @@ -14,18 +14,18 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/json_request_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/json_request_translator.h" #include #include #include +#include "contrib/endpoints/src/grpc/transcoding/bookstore.pb.h" +#include "contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h" +#include "contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h" +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" #include "google/protobuf/io/zero_copy_stream.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/bookstore.pb.h" -#include "src/grpc/transcoding/proto_stream_tester.h" -#include "src/grpc/transcoding/request_translator_test_base.h" -#include "src/grpc/transcoding/test_common.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/message_reader.cc b/contrib/endpoints/src/grpc/transcoding/message_reader.cc index 5568b160d47..e5e4aeeae14 100644 --- a/contrib/endpoints/src/grpc/transcoding/message_reader.cc +++ b/contrib/endpoints/src/grpc/transcoding/message_reader.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/message_reader.h" +#include "contrib/endpoints/src/grpc/transcoding/message_reader.h" #include diff --git a/contrib/endpoints/src/grpc/transcoding/message_reader_test.cc b/contrib/endpoints/src/grpc/transcoding/message_reader_test.cc index 40a2f6eafb7..7bf9a878a95 100644 --- a/contrib/endpoints/src/grpc/transcoding/message_reader_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/message_reader_test.cc @@ -14,15 +14,15 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/message_reader.h" +#include "contrib/endpoints/src/grpc/transcoding/message_reader.h" #include #include #include #include +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/test_common.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/message_stream.cc b/contrib/endpoints/src/grpc/transcoding/message_stream.cc index ce3e62e8a99..11af66bb170 100644 --- a/contrib/endpoints/src/grpc/transcoding/message_stream.cc +++ b/contrib/endpoints/src/grpc/transcoding/message_stream.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" #include #include diff --git a/contrib/endpoints/src/grpc/transcoding/message_stream_test.cc b/contrib/endpoints/src/grpc/transcoding/message_stream_test.cc index ab3c24f8e14..3699b499bfc 100644 --- a/contrib/endpoints/src/grpc/transcoding/message_stream_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/message_stream_test.cc @@ -14,13 +14,13 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" #include #include +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/test_common.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/prefix_writer.cc b/contrib/endpoints/src/grpc/transcoding/prefix_writer.cc index e04cfcbfc65..5d312d7037b 100644 --- a/contrib/endpoints/src/grpc/transcoding/prefix_writer.cc +++ b/contrib/endpoints/src/grpc/transcoding/prefix_writer.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/prefix_writer.h" +#include "contrib/endpoints/src/grpc/transcoding/prefix_writer.h" #include diff --git a/contrib/endpoints/src/grpc/transcoding/prefix_writer_test.cc b/contrib/endpoints/src/grpc/transcoding/prefix_writer_test.cc index 7727367274b..2bc33f3af5f 100644 --- a/contrib/endpoints/src/grpc/transcoding/prefix_writer_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/prefix_writer_test.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/prefix_writer.h" +#include "contrib/endpoints/src/grpc/transcoding/prefix_writer.h" #include #include diff --git a/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.cc b/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.cc index f45d223ac18..670e868f04f 100644 --- a/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.cc +++ b/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/proto_stream_tester.h" +#include "contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h" #include diff --git a/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h b/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h index 73529d877f1..0dd70d65a5d 100644 --- a/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h +++ b/contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h @@ -17,11 +17,11 @@ #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" #include "google/protobuf/stubs/status.h" #include "google/protobuf/text_format.h" #include "google/protobuf/util/message_differencer.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/message_stream.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_message_translator.cc b/contrib/endpoints/src/grpc/transcoding/request_message_translator.cc index 79b6e79c80e..352ac693167 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_message_translator.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_message_translator.cc @@ -14,15 +14,15 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_message_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" #include +#include "contrib/endpoints/src/grpc/transcoding/prefix_writer.h" +#include "contrib/endpoints/src/grpc/transcoding/request_weaver.h" #include "google/protobuf/stubs/bytestream.h" #include "google/protobuf/util/internal/error_listener.h" #include "google/protobuf/util/internal/protostream_objectwriter.h" -#include "src/grpc/transcoding/prefix_writer.h" -#include "src/grpc/transcoding/request_weaver.h" namespace pb = ::google::protobuf; namespace pbutil = ::google::protobuf::util; diff --git a/contrib/endpoints/src/grpc/transcoding/request_message_translator.h b/contrib/endpoints/src/grpc/transcoding/request_message_translator.h index dfe802246b5..3454d16267f 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_message_translator.h +++ b/contrib/endpoints/src/grpc/transcoding/request_message_translator.h @@ -18,14 +18,14 @@ #include #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/prefix_writer.h" +#include "contrib/endpoints/src/grpc/transcoding/request_weaver.h" #include "google/protobuf/stubs/bytestream.h" #include "google/protobuf/type.pb.h" #include "google/protobuf/util/internal/error_listener.h" #include "google/protobuf/util/internal/protostream_objectwriter.h" #include "google/protobuf/util/type_resolver.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/prefix_writer.h" -#include "src/grpc/transcoding/request_weaver.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_message_translator_test.cc b/contrib/endpoints/src/grpc/transcoding/request_message_translator_test.cc index 50940c21535..ba5d845a37a 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_message_translator_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_message_translator_test.cc @@ -14,17 +14,17 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_message_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" #include #include +#include "contrib/endpoints/src/grpc/transcoding/bookstore.pb.h" +#include "contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h" +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" #include "google/protobuf/struct.pb.h" #include "google/protobuf/type.pb.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/bookstore.pb.h" -#include "src/grpc/transcoding/request_translator_test_base.h" -#include "src/grpc/transcoding/test_common.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_stream_translator.cc b/contrib/endpoints/src/grpc/transcoding/request_stream_translator.cc index a6963eef52d..cf95e66317e 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_stream_translator.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_stream_translator.cc @@ -14,13 +14,13 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_stream_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/request_stream_translator.h" #include #include +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" #include "google/protobuf/stubs/stringpiece.h" -#include "src/grpc/transcoding/request_message_translator.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_stream_translator.h b/contrib/endpoints/src/grpc/transcoding/request_stream_translator.h index 1f512d2002f..97fca46286c 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_stream_translator.h +++ b/contrib/endpoints/src/grpc/transcoding/request_stream_translator.h @@ -19,11 +19,11 @@ #include #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" #include "google/protobuf/stubs/stringpiece.h" #include "google/protobuf/util/internal/object_writer.h" #include "google/protobuf/util/type_resolver.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/request_message_translator.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_stream_translator_test.cc b/contrib/endpoints/src/grpc/transcoding/request_stream_translator_test.cc index f086d5259fc..5abbf4580a3 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_stream_translator_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_stream_translator_test.cc @@ -14,15 +14,15 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_stream_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/request_stream_translator.h" #include #include +#include "contrib/endpoints/src/grpc/transcoding/bookstore.pb.h" +#include "contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h" #include "google/protobuf/type.pb.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/bookstore.pb.h" -#include "src/grpc/transcoding/request_translator_test_base.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.cc b/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.cc index 38254142e4e..3480901b970 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_translator_test_base.h" +#include "contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h" #include #include @@ -22,14 +22,14 @@ #include #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" #include "google/api/service.pb.h" #include "google/protobuf/stubs/strutil.h" #include "google/protobuf/text_format.h" #include "google/protobuf/type.pb.h" #include "google/protobuf/util/internal/type_info.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/test_common.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h b/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h index 05d2c7a5fc3..2e68ed94563 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h +++ b/contrib/endpoints/src/grpc/transcoding/request_translator_test_base.h @@ -19,14 +19,14 @@ #include #include +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/proto_stream_tester.h" +#include "contrib/endpoints/src/grpc/transcoding/request_message_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/type_helper.h" #include "google/api/service.pb.h" #include "google/protobuf/type.pb.h" #include "google/protobuf/util/type_resolver.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/proto_stream_tester.h" -#include "src/grpc/transcoding/request_message_translator.h" -#include "src/grpc/transcoding/type_helper.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/request_weaver.cc b/contrib/endpoints/src/grpc/transcoding/request_weaver.cc index b380c526513..a01030feb34 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_weaver.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_weaver.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_weaver.h" +#include "contrib/endpoints/src/grpc/transcoding/request_weaver.h" #include #include diff --git a/contrib/endpoints/src/grpc/transcoding/request_weaver_test.cc b/contrib/endpoints/src/grpc/transcoding/request_weaver_test.cc index 2c09324a4a9..1ee16316937 100644 --- a/contrib/endpoints/src/grpc/transcoding/request_weaver_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/request_weaver_test.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/request_weaver.h" +#include "contrib/endpoints/src/grpc/transcoding/request_weaver.h" #include #include diff --git a/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.cc b/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.cc index 3a58d507034..eb5e54f9bec 100644 --- a/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.cc +++ b/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/response_to_json_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h" #include diff --git a/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h b/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h index c88b56362e4..e41791467f8 100644 --- a/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h +++ b/contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h @@ -17,11 +17,11 @@ #include +#include "contrib/endpoints/src/grpc/transcoding/message_reader.h" +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/stubs/status.h" #include "google/protobuf/util/type_resolver.h" -#include "src/grpc/transcoding/message_reader.h" -#include "src/grpc/transcoding/message_stream.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/response_to_json_translator_test.cc b/contrib/endpoints/src/grpc/transcoding/response_to_json_translator_test.cc index f012a7ce1e6..c12ac73839c 100644 --- a/contrib/endpoints/src/grpc/transcoding/response_to_json_translator_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/response_to_json_translator_test.cc @@ -14,19 +14,19 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/response_to_json_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h" #include #include #include #include +#include "contrib/endpoints/src/grpc/transcoding/bookstore.pb.h" +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" +#include "contrib/endpoints/src/grpc/transcoding/type_helper.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/text_format.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/bookstore.pb.h" -#include "src/grpc/transcoding/test_common.h" -#include "src/grpc/transcoding/type_helper.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/test_common.cc b/contrib/endpoints/src/grpc/transcoding/test_common.cc index 3550cb766c1..269bc1172d7 100644 --- a/contrib/endpoints/src/grpc/transcoding/test_common.cc +++ b/contrib/endpoints/src/grpc/transcoding/test_common.cc @@ -187,7 +187,7 @@ std::string GenerateInput(const std::string& seed, size_t size) { namespace { std::string LoadFile(const std::string& input_file_name) { - const char kTestdata[] = "src/grpc/transcoding/testdata/"; + const char kTestdata[] = "contrib/endpoints/src/grpc/transcoding/testdata/"; std::string file_name = std::string(kTestdata) + input_file_name; std::ifstream ifs(file_name); diff --git a/contrib/endpoints/src/grpc/transcoding/transcoder_factory.cc b/contrib/endpoints/src/grpc/transcoding/transcoder_factory.cc index 5b245666916..2dfcf511a17 100644 --- a/contrib/endpoints/src/grpc/transcoding/transcoder_factory.cc +++ b/contrib/endpoints/src/grpc/transcoding/transcoder_factory.cc @@ -14,21 +14,21 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/transcoder_factory.h" +#include "contrib/endpoints/src/grpc/transcoding/transcoder_factory.h" #include #include #include +#include "contrib/endpoints/include/api_manager/method_call_info.h" +#include "contrib/endpoints/src/grpc/transcoding/json_request_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/message_stream.h" +#include "contrib/endpoints/src/grpc/transcoding/response_to_json_translator.h" +#include "contrib/endpoints/src/grpc/transcoding/type_helper.h" #include "google/api/service.pb.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/stubs/common.h" #include "google/protobuf/stubs/status.h" -#include "include/api_manager/method_call_info.h" -#include "src/grpc/transcoding/json_request_translator.h" -#include "src/grpc/transcoding/message_stream.h" -#include "src/grpc/transcoding/response_to_json_translator.h" -#include "src/grpc/transcoding/type_helper.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/transcoder_factory.h b/contrib/endpoints/src/grpc/transcoding/transcoder_factory.h index bbe7b96a021..b7c10865025 100644 --- a/contrib/endpoints/src/grpc/transcoding/transcoder_factory.h +++ b/contrib/endpoints/src/grpc/transcoding/transcoder_factory.h @@ -17,12 +17,12 @@ #include +#include "contrib/endpoints/include/api_manager/method_call_info.h" +#include "contrib/endpoints/src/grpc/transcoding/transcoder.h" +#include "contrib/endpoints/src/grpc/transcoding/type_helper.h" #include "google/api/service.pb.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/stubs/status.h" -#include "include/api_manager/method_call_info.h" -#include "src/grpc/transcoding/transcoder.h" -#include "src/grpc/transcoding/type_helper.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/transcoder_test.cc b/contrib/endpoints/src/grpc/transcoding/transcoder_test.cc index 569e7b4b404..eb2a38eaf5d 100644 --- a/contrib/endpoints/src/grpc/transcoding/transcoder_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/transcoder_test.cc @@ -19,17 +19,17 @@ #include #include +#include "contrib/endpoints/include/api_manager/method.h" +#include "contrib/endpoints/include/api_manager/method_call_info.h" +#include "contrib/endpoints/src/grpc/transcoding/bookstore.pb.h" +#include "contrib/endpoints/src/grpc/transcoding/message_reader.h" +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" +#include "contrib/endpoints/src/grpc/transcoding/transcoder.h" +#include "contrib/endpoints/src/grpc/transcoding/transcoder_factory.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/stubs/strutil.h" #include "google/protobuf/util/message_differencer.h" #include "gtest/gtest.h" -#include "include/api_manager/method.h" -#include "include/api_manager/method_call_info.h" -#include "src/grpc/transcoding/bookstore.pb.h" -#include "src/grpc/transcoding/message_reader.h" -#include "src/grpc/transcoding/test_common.h" -#include "src/grpc/transcoding/transcoder.h" -#include "src/grpc/transcoding/transcoder_factory.h" namespace google { namespace api_manager { diff --git a/contrib/endpoints/src/grpc/transcoding/type_helper.cc b/contrib/endpoints/src/grpc/transcoding/type_helper.cc index af0cac5a48e..0d2e63396ed 100644 --- a/contrib/endpoints/src/grpc/transcoding/type_helper.cc +++ b/contrib/endpoints/src/grpc/transcoding/type_helper.cc @@ -14,7 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/type_helper.h" +#include "contrib/endpoints/src/grpc/transcoding/type_helper.h" #include "google/protobuf/stubs/strutil.h" #include "google/protobuf/type.pb.h" diff --git a/contrib/endpoints/src/grpc/transcoding/type_helper_test.cc b/contrib/endpoints/src/grpc/transcoding/type_helper_test.cc index d943bf2f71c..c653e041035 100644 --- a/contrib/endpoints/src/grpc/transcoding/type_helper_test.cc +++ b/contrib/endpoints/src/grpc/transcoding/type_helper_test.cc @@ -14,18 +14,18 @@ // //////////////////////////////////////////////////////////////////////////////// // -#include "src/grpc/transcoding/type_helper.h" +#include "contrib/endpoints/src/grpc/transcoding/type_helper.h" #include #include #include #include +#include "contrib/endpoints/src/grpc/transcoding/test_common.h" #include "google/api/service.pb.h" #include "google/protobuf/text_format.h" #include "google/protobuf/type.pb.h" #include "gtest/gtest.h" -#include "src/grpc/transcoding/test_common.h" namespace pb = ::google::protobuf;