aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/support
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-01-26 15:39:32 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-02-15 14:49:34 -0800
commit0e00c430827e81d61e1e7164ef04ca21ccbfaa77 (patch)
tree9246301d4f3583a4befd834f7ea426663b8eb622 /include/grpc++/support
parent8224c45866c6a2cfa29ede0c91a6ae9f40572658 (diff)
Move headers from grpc++ to grpcpp
Diffstat (limited to 'include/grpc++/support')
-rw-r--r--include/grpc++/support/async_stream.h8
-rw-r--r--include/grpc++/support/async_unary_call.h8
-rw-r--r--include/grpc++/support/byte_buffer.h15
-rw-r--r--include/grpc++/support/channel_arguments.h126
-rw-r--r--include/grpc++/support/config.h8
-rw-r--r--include/grpc++/support/error_details.h30
-rw-r--r--include/grpc++/support/slice.h10
-rw-r--r--include/grpc++/support/status.h8
-rw-r--r--include/grpc++/support/status_code_enum.h8
-rw-r--r--include/grpc++/support/string_ref.h8
-rw-r--r--include/grpc++/support/stub_options.h8
-rw-r--r--include/grpc++/support/sync_stream.h8
-rw-r--r--include/grpc++/support/time.h8
13 files changed, 78 insertions, 175 deletions
diff --git a/include/grpc++/support/async_stream.h b/include/grpc++/support/async_stream.h
index f2cab848f0..9bb2b725c3 100644
--- a/include/grpc++/support/async_stream.h
+++ b/include/grpc++/support/async_stream.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_ASYNC_STREAM_H
#define GRPCXX_SUPPORT_ASYNC_STREAM_H
-#include <grpc++/impl/codegen/async_stream.h>
+#include <grpcpp/support/async_stream.h>
#endif // GRPCXX_SUPPORT_ASYNC_STREAM_H
diff --git a/include/grpc++/support/async_unary_call.h b/include/grpc++/support/async_unary_call.h
index 4947c442a9..56fbf31417 100644
--- a/include/grpc++/support/async_unary_call.h
+++ b/include/grpc++/support/async_unary_call.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_ASYNC_UNARY_CALL_H
#define GRPCXX_SUPPORT_ASYNC_UNARY_CALL_H
-#include <grpc++/impl/codegen/async_unary_call.h>
+#include <grpcpp/support/async_unary_call.h>
#endif // GRPCXX_SUPPORT_ASYNC_UNARY_CALL_H
diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h
index 81fa3b0a18..ec607ee01a 100644
--- a/include/grpc++/support/byte_buffer.h
+++ b/include/grpc++/support/byte_buffer.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,16 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_BYTE_BUFFER_H
#define GRPCXX_SUPPORT_BYTE_BUFFER_H
-#include <grpc++/impl/codegen/byte_buffer.h>
-#include <grpc++/impl/serialization_traits.h>
-#include <grpc++/support/config.h>
-#include <grpc++/support/slice.h>
-#include <grpc++/support/status.h>
-#include <grpc/byte_buffer.h>
-#include <grpc/grpc.h>
-#include <grpc/support/log.h>
+#include <grpcpp/support/byte_buffer.h>
#endif // GRPCXX_SUPPORT_BYTE_BUFFER_H
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h
index c9879d8a28..6d5300ccb7 100644
--- a/include/grpc++/support/channel_arguments.h
+++ b/include/grpc++/support/channel_arguments.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,127 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H
#define GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H
-#include <list>
-#include <vector>
-
-#include <grpc++/support/config.h>
-#include <grpc/compression.h>
-#include <grpc/grpc.h>
-
-namespace grpc {
-namespace testing {
-class ChannelArgumentsTest;
-} // namespace testing
-
-class ResourceQuota;
-
-/// Options for channel creation. The user can use generic setters to pass
-/// key value pairs down to C channel creation code. For gRPC related options,
-/// concrete setters are provided.
-class ChannelArguments {
- public:
- ChannelArguments();
- ~ChannelArguments();
-
- ChannelArguments(const ChannelArguments& other);
- ChannelArguments& operator=(ChannelArguments other) {
- Swap(other);
- return *this;
- }
-
- void Swap(ChannelArguments& other);
-
- /// Dump arguments in this instance to \a channel_args. Does not take
- /// ownership of \a channel_args.
- ///
- /// Note that the underlying arguments are shared. Changes made to either \a
- /// channel_args or this instance would be reflected on both.
- void SetChannelArgs(grpc_channel_args* channel_args) const;
-
- // gRPC specific channel argument setters
- /// Set target name override for SSL host name checking. This option is for
- /// testing only and should never be used in production.
- void SetSslTargetNameOverride(const grpc::string& name);
- // TODO(yangg) add flow control options
- /// Set the compression algorithm for the channel.
- void SetCompressionAlgorithm(grpc_compression_algorithm algorithm);
-
- /// Set the grpclb fallback timeout (in ms) for the channel. If this amount
- /// of time has passed but we have not gotten any non-empty \a serverlist from
- /// the balancer, we will fall back to use the backend address(es) returned by
- /// the resolver.
- void SetGrpclbFallbackTimeout(int fallback_timeout);
-
- /// Set the socket mutator for the channel.
- void SetSocketMutator(grpc_socket_mutator* mutator);
-
- /// Set the string to prepend to the user agent.
- void SetUserAgentPrefix(const grpc::string& user_agent_prefix);
-
- /// Set the buffer pool to be attached to the constructed channel.
- void SetResourceQuota(const ResourceQuota& resource_quota);
-
- /// Set the max receive and send message sizes.
- void SetMaxReceiveMessageSize(int size);
- void SetMaxSendMessageSize(int size);
-
- /// Set LB policy name.
- /// Note that if the name resolver returns only balancer addresses, the
- /// grpclb LB policy will be used, regardless of what is specified here.
- void SetLoadBalancingPolicyName(const grpc::string& lb_policy_name);
-
- /// Set service config in JSON form.
- /// Primarily meant for use in unit tests.
- void SetServiceConfigJSON(const grpc::string& service_config_json);
-
- // Generic channel argument setters. Only for advanced use cases.
- /// Set an integer argument \a value under \a key.
- void SetInt(const grpc::string& key, int value);
-
- // Generic channel argument setter. Only for advanced use cases.
- /// Set a pointer argument \a value under \a key. Owership is not transferred.
- void SetPointer(const grpc::string& key, void* value);
-
- void SetPointerWithVtable(const grpc::string& key, void* value,
- const grpc_arg_pointer_vtable* vtable);
-
- /// Set a textual argument \a value under \a key.
- void SetString(const grpc::string& key, const grpc::string& value);
-
- /// Return (by value) a C \a grpc_channel_args structure which points to
- /// arguments owned by this \a ChannelArguments instance
- grpc_channel_args c_channel_args() const {
- grpc_channel_args out;
- out.num_args = args_.size();
- out.args = args_.empty() ? NULL : const_cast<grpc_arg*>(&args_[0]);
- return out;
- }
-
- private:
- friend class SecureChannelCredentials;
- friend class testing::ChannelArgumentsTest;
-
- /// Default pointer argument operations.
- struct PointerVtableMembers {
- static void* Copy(void* in) { return in; }
- static void Destroy(void* in) {}
- static int Compare(void* a, void* b) {
- if (a < b) return -1;
- if (a > b) return 1;
- return 0;
- }
- };
-
- // Returns empty string when it is not set.
- grpc::string GetSslTargetNameOverride() const;
-
- std::vector<grpc_arg> args_;
- std::list<grpc::string> strings_;
-};
-
-} // namespace grpc
+#include <grpcpp/support/channel_arguments.h>
#endif // GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H
diff --git a/include/grpc++/support/config.h b/include/grpc++/support/config.h
index b65af3121b..f8eee5075a 100644
--- a/include/grpc++/support/config.h
+++ b/include/grpc++/support/config.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_CONFIG_H
#define GRPCXX_SUPPORT_CONFIG_H
-#include <grpc++/impl/codegen/config.h>
+#include <grpcpp/support/config.h>
#endif // GRPCXX_SUPPORT_CONFIG_H
diff --git a/include/grpc++/support/error_details.h b/include/grpc++/support/error_details.h
index 8925fa843a..7ace308e52 100644
--- a/include/grpc++/support/error_details.h
+++ b/include/grpc++/support/error_details.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2017 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,31 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_ERROR_DETAILS_H
#define GRPCXX_SUPPORT_ERROR_DETAILS_H
-#include <grpc++/support/status.h>
-
-namespace google {
-namespace rpc {
-class Status;
-} // namespace rpc
-} // namespace google
-
-namespace grpc {
-
-/// Map a \a grpc::Status to a \a google::rpc::Status.
-/// The given \a to object will be cleared.
-/// On success, returns status with OK.
-/// Returns status with \a INVALID_ARGUMENT, if failed to deserialize.
-/// Returns status with \a FAILED_PRECONDITION, if \a to is nullptr.
-Status ExtractErrorDetails(const Status& from, ::google::rpc::Status* to);
-
-/// Map \a google::rpc::Status to a \a grpc::Status.
-/// Returns OK on success.
-/// Returns status with \a FAILED_PRECONDITION if \a to is nullptr.
-Status SetErrorDetails(const ::google::rpc::Status& from, Status* to);
-
-} // namespace grpc
+#include <grpcpp/support/error_details.h>
#endif // GRPCXX_SUPPORT_ERROR_DETAILS_H
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h
index 10db10d79c..b02b1a977e 100644
--- a/include/grpc++/support/slice.h
+++ b/include/grpc++/support/slice.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_SLICE_H
#define GRPCXX_SUPPORT_SLICE_H
-#include <grpc++/impl/codegen/slice.h>
-#include <grpc++/support/config.h>
-#include <grpc/slice.h>
+#include <grpcpp/support/slice.h>
#endif // GRPCXX_SUPPORT_SLICE_H
diff --git a/include/grpc++/support/status.h b/include/grpc++/support/status.h
index 1fa910a68c..e58a18bdf9 100644
--- a/include/grpc++/support/status.h
+++ b/include/grpc++/support/status.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_STATUS_H
#define GRPCXX_SUPPORT_STATUS_H
-#include <grpc++/impl/codegen/status.h>
+#include <grpcpp/support/status.h>
#endif // GRPCXX_SUPPORT_STATUS_H
diff --git a/include/grpc++/support/status_code_enum.h b/include/grpc++/support/status_code_enum.h
index d320c0cf10..c278add0c6 100644
--- a/include/grpc++/support/status_code_enum.h
+++ b/include/grpc++/support/status_code_enum.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_STATUS_CODE_ENUM_H
#define GRPCXX_SUPPORT_STATUS_CODE_ENUM_H
-#include <grpc++/impl/codegen/status_code_enum.h>
+#include <grpcpp/support/status_code_enum.h>
#endif // GRPCXX_SUPPORT_STATUS_CODE_ENUM_H
diff --git a/include/grpc++/support/string_ref.h b/include/grpc++/support/string_ref.h
index 873be63cee..49de6dafce 100644
--- a/include/grpc++/support/string_ref.h
+++ b/include/grpc++/support/string_ref.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_STRING_REF_H
#define GRPCXX_SUPPORT_STRING_REF_H
-#include <grpc++/impl/codegen/string_ref.h>
+#include <grpcpp/support/string_ref.h>
#endif // GRPCXX_SUPPORT_STRING_REF_H
diff --git a/include/grpc++/support/stub_options.h b/include/grpc++/support/stub_options.h
index 87843cf34f..a712ce8716 100644
--- a/include/grpc++/support/stub_options.h
+++ b/include/grpc++/support/stub_options.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_STUB_OPTIONS_H
#define GRPCXX_SUPPORT_STUB_OPTIONS_H
-#include <grpc++/impl/codegen/stub_options.h>
+#include <grpcpp/support/stub_options.h>
#endif // GRPCXX_SUPPORT_STUB_OPTIONS_H
diff --git a/include/grpc++/support/sync_stream.h b/include/grpc++/support/sync_stream.h
index 6a6e0c797f..c118df9f7b 100644
--- a/include/grpc++/support/sync_stream.h
+++ b/include/grpc++/support/sync_stream.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_SYNC_STREAM_H
#define GRPCXX_SUPPORT_SYNC_STREAM_H
-#include <grpc++/impl/codegen/sync_stream.h>
+#include <grpcpp/support/sync_stream.h>
#endif // GRPCXX_SUPPORT_SYNC_STREAM_H
diff --git a/include/grpc++/support/time.h b/include/grpc++/support/time.h
index e47a593ac9..d356b91001 100644
--- a/include/grpc++/support/time.h
+++ b/include/grpc++/support/time.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,13 @@
*
*/
+// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the
+// headers in include/grpcpp instead. This header exists only for backwards
+// compatibility.
+
#ifndef GRPCXX_SUPPORT_TIME_H
#define GRPCXX_SUPPORT_TIME_H
-#include <grpc++/impl/codegen/time.h>
+#include <grpcpp/support/time.h>
#endif // GRPCXX_SUPPORT_TIME_H