diff options
author | 2016-02-18 16:37:51 -0800 | |
---|---|---|
committer | 2016-02-18 16:37:51 -0800 | |
commit | 5152cd29f8541d7600b7ddc3d9db188ad59ea673 (patch) | |
tree | dc7c6693ee4c9101468a1a68bd0038e71d046029 /test/cpp/util/test_credentials_provider.h | |
parent | 7d2a3e1917ebfd4e1262020b021b3bf09d238c86 (diff) |
make an enum
Diffstat (limited to 'test/cpp/util/test_credentials_provider.h')
-rw-r--r-- | test/cpp/util/test_credentials_provider.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/cpp/util/test_credentials_provider.h b/test/cpp/util/test_credentials_provider.h index 4f25e3be66..005254a652 100644 --- a/test/cpp/util/test_credentials_provider.h +++ b/test/cpp/util/test_credentials_provider.h @@ -43,17 +43,22 @@ namespace grpc { namespace testing { -const char kInsecureCredentialsType[] = "INSECURE_CREDENTIALS"; -const char kTlsCredentialsType[] = "TLS_CREDENTIALS"; +enum TestCredentialsType { + INSECURE_CREDENTIALS = 0, + TLS_CREDENTIALS, + MAX_CREDENTIALS_TYPE +}; // Provide channel credentials according to the given type. Alter the channel // arguments if needed. std::shared_ptr<ChannelCredentials> GetChannelCredentials( - const grpc::string& type, ChannelArguments* args); + TestCredentialsType type, ChannelArguments* args); // Provide server credentials according to the given type. std::shared_ptr<ServerCredentials> GetServerCredentials( - const grpc::string& type); + TestCredentialsType type); + +grpc::string TestCredentialsTypeToString(TestCredentialsType type); } // namespace testing } // namespace grpc |