Add StubOptions
diff --git a/BUILD b/BUILD
index 9c170f1..979ecdc 100644
--- a/BUILD
+++ b/BUILD
@@ -725,6 +725,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",
],
@@ -812,6 +813,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/Makefile b/Makefile
index 8a38a68..09ce11c 100644
--- a/Makefile
+++ b/Makefile
@@ -4223,6 +4223,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 \
@@ -4466,6 +4467,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/build.json b/build.json
index deb8640..6f40db8 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 0000000..c7c16dc
--- /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 7565994..ea487bc 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -119,6 +119,7 @@
"#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 @@
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 @@
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 785779b..48bbc59 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -799,6 +799,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/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 5cf6168..ee76ae3 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -799,6 +799,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/secure_credentials.h \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index d2cf07f..c72008f 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -11766,6 +11766,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",
@@ -11816,6 +11817,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",
@@ -11940,6 +11942,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",
@@ -11987,6 +11990,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 7587cfe..5847451 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 85b743a..2a8ee08 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 ea1f747..0d989c4 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 7f109a2..71d42e5 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>