aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-02-10 12:42:53 -0800
committerGravatar yang-g <yangg@google.com>2016-02-10 12:42:53 -0800
commitd59ad7ef393c7624c7035a09b488f630cbd96730 (patch)
tree6a3a233679828c63716d3e33314db93136c9d20e /include
parent852acc7deed2fb4587d930fb5c15bd72abc39c26 (diff)
Provide explicit API for user to set user agent string prefix
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/support/channel_arguments.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h
index a2960a7ecc..72f52657cd 100644
--- a/include/grpc++/support/channel_arguments.h
+++ b/include/grpc++/support/channel_arguments.h
@@ -51,7 +51,7 @@ class ChannelArgumentsTest;
/// concrete setters are provided.
class ChannelArguments {
public:
- ChannelArguments() {}
+ ChannelArguments();
~ChannelArguments() {}
ChannelArguments(const ChannelArguments& other);
@@ -62,8 +62,8 @@ class ChannelArguments {
void Swap(ChannelArguments& other);
- /// Populates this instance with the arguments from \a channel_args. Does not
- /// take ownership of \a channel_args.
+ /// 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.
@@ -77,6 +77,9 @@ class ChannelArguments {
/// Set the compression algorithm for the channel.
void SetCompressionAlgorithm(grpc_compression_algorithm algorithm);
+ /// The given string will be sent at the front of the user agent string.
+ void SetUserAgentPrefix(const grpc::string& user_agent_prefix);
+
// 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);