aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD2
-rw-r--r--Makefile2
-rw-r--r--build.json1
-rw-r--r--include/grpc++/stub_options.h43
-rw-r--r--src/compiler/cpp_generator.cc8
-rw-r--r--tools/doxygen/Doxyfile.c++1
-rw-r--r--tools/doxygen/Doxyfile.c++.internal1
-rw-r--r--tools/run_tests/sources_and_headers.json4
-rw-r--r--vsprojects/grpc++/grpc++.vcxproj1
-rw-r--r--vsprojects/grpc++/grpc++.vcxproj.filters3
-rw-r--r--vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj1
-rw-r--r--vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters3
12 files changed, 67 insertions, 3 deletions
diff --git a/BUILD b/BUILD
index b4d11d5ba8..02c9061d88 100644
--- a/BUILD
+++ b/BUILD
@@ -721,6 +721,7 @@ cc_library(
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
],
@@ -808,6 +809,7 @@ cc_library(
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
],
diff --git a/Makefile b/Makefile
index 5253e7cabf..a043cd33dd 100644
--- a/Makefile
+++ b/Makefile
@@ -4257,6 +4257,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/status.h \
include/grpc++/status_code_enum.h \
include/grpc++/stream.h \
+ include/grpc++/stub_options.h \
include/grpc++/thread_pool_interface.h \
include/grpc++/time.h \
@@ -4500,6 +4501,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/status.h \
include/grpc++/status_code_enum.h \
include/grpc++/stream.h \
+ include/grpc++/stub_options.h \
include/grpc++/thread_pool_interface.h \
include/grpc++/time.h \
diff --git a/build.json b/build.json
index 9fb43c3464..516e2f19c0 100644
--- a/build.json
+++ b/build.json
@@ -69,6 +69,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h"
],
diff --git a/include/grpc++/stub_options.h b/include/grpc++/stub_options.h
new file mode 100644
index 0000000000..c7c16dcd55
--- /dev/null
+++ b/include/grpc++/stub_options.h
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ */
+
+#ifndef GRPCXX_STUB_OPTIONS_H
+#define GRPCXX_STUB_OPTIONS_H
+
+namespace grpc {
+
+class StubOptions {};
+
+} // namespace grpc
+
+#endif // GRPCXX_STUB_OPTIONS_H
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index 75659947df..ea487bcd89 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -119,6 +119,7 @@ grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file,
"#include <grpc++/async_unary_call.h>\n"
"#include <grpc++/status.h>\n"
"#include <grpc++/stream.h>\n"
+ "#include <grpc++/stub_options.h>\n"
"\n"
"namespace grpc {\n"
"class CompletionQueue;\n"
@@ -574,8 +575,8 @@ void PrintHeaderService(grpc::protobuf::io::Printer *printer,
printer->Print("};\n");
printer->Print(
"static std::unique_ptr<Stub> NewStub(const std::shared_ptr< "
- "::grpc::ChannelInterface>& "
- "channel);\n");
+ "::grpc::ChannelInterface>& channel, "
+ "const ::grpc::StubOptions& options = ::grpc::StubOptions());\n");
printer->Print("\n");
@@ -966,7 +967,8 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
printer->Print(
*vars,
"std::unique_ptr< $ns$$Service$::Stub> $ns$$Service$::NewStub("
- "const std::shared_ptr< ::grpc::ChannelInterface>& channel) {\n"
+ "const std::shared_ptr< ::grpc::ChannelInterface>& channel, "
+ "const ::grpc::StubOptions& options) {\n"
" std::unique_ptr< $ns$$Service$::Stub> stub(new "
"$ns$$Service$::Stub(channel));\n"
" return stub;\n"
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index 6b1302d4bd..eb14925fff 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -799,6 +799,7 @@ include/grpc++/slice.h \
include/grpc++/status.h \
include/grpc++/status_code_enum.h \
include/grpc++/stream.h \
+include/grpc++/stub_options.h \
include/grpc++/thread_pool_interface.h \
include/grpc++/time.h
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 9cbf23e1a7..3d6649bef6 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -799,6 +799,7 @@ include/grpc++/slice.h \
include/grpc++/status.h \
include/grpc++/status_code_enum.h \
include/grpc++/stream.h \
+include/grpc++/stub_options.h \
include/grpc++/thread_pool_interface.h \
include/grpc++/time.h \
src/cpp/client/secure_credentials.h \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index f43306dcfc..1ad371f0a4 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -11812,6 +11812,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
"src/cpp/client/channel.h",
@@ -11862,6 +11863,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
"src/cpp/client/channel.cc",
@@ -11986,6 +11988,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
"src/cpp/client/channel.h",
@@ -12033,6 +12036,7 @@
"include/grpc++/status.h",
"include/grpc++/status_code_enum.h",
"include/grpc++/stream.h",
+ "include/grpc++/stub_options.h",
"include/grpc++/thread_pool_interface.h",
"include/grpc++/time.h",
"src/cpp/client/channel.cc",
diff --git a/vsprojects/grpc++/grpc++.vcxproj b/vsprojects/grpc++/grpc++.vcxproj
index 7587cfed77..58474511fc 100644
--- a/vsprojects/grpc++/grpc++.vcxproj
+++ b/vsprojects/grpc++/grpc++.vcxproj
@@ -252,6 +252,7 @@
<ClInclude Include="..\..\include\grpc++\status.h" />
<ClInclude Include="..\..\include\grpc++\status_code_enum.h" />
<ClInclude Include="..\..\include\grpc++\stream.h" />
+ <ClInclude Include="..\..\include\grpc++\stub_options.h" />
<ClInclude Include="..\..\include\grpc++\thread_pool_interface.h" />
<ClInclude Include="..\..\include\grpc++\time.h" />
</ItemGroup>
diff --git a/vsprojects/grpc++/grpc++.vcxproj.filters b/vsprojects/grpc++/grpc++.vcxproj.filters
index 85b743a8fb..2a8ee08b08 100644
--- a/vsprojects/grpc++/grpc++.vcxproj.filters
+++ b/vsprojects/grpc++/grpc++.vcxproj.filters
@@ -213,6 +213,9 @@
<ClInclude Include="..\..\include\grpc++\stream.h">
<Filter>include\grpc++</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\grpc++\stub_options.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
<ClInclude Include="..\..\include\grpc++\thread_pool_interface.h">
<Filter>include\grpc++</Filter>
</ClInclude>
diff --git a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj
index ea1f747e6b..0d989c4a93 100644
--- a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj
+++ b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj
@@ -252,6 +252,7 @@
<ClInclude Include="..\..\include\grpc++\status.h" />
<ClInclude Include="..\..\include\grpc++\status_code_enum.h" />
<ClInclude Include="..\..\include\grpc++\stream.h" />
+ <ClInclude Include="..\..\include\grpc++\stub_options.h" />
<ClInclude Include="..\..\include\grpc++\thread_pool_interface.h" />
<ClInclude Include="..\..\include\grpc++\time.h" />
</ItemGroup>
diff --git a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
index 7f109a2557..71d42e5c6d 100644
--- a/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
+++ b/vsprojects/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
@@ -198,6 +198,9 @@
<ClInclude Include="..\..\include\grpc++\stream.h">
<Filter>include\grpc++</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\grpc++\stub_options.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
<ClInclude Include="..\..\include\grpc++\thread_pool_interface.h">
<Filter>include\grpc++</Filter>
</ClInclude>