Skip to content

Commit

Permalink
Revert format changes of unrelated files
Browse files Browse the repository at this point in the history
  • Loading branch information
Muxi Yan committed Oct 28, 2016
1 parent e53707c commit 2c88b46
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 232 deletions.
17 changes: 7 additions & 10 deletions src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,15 @@
@interface GRPCCall (ChannelArg)

/**
* Use the provided @c userAgentPrefix at the beginning of the HTTP User Agent
* string for all calls to the specified @c host.
* Use the provided @c userAgentPrefix at the beginning of the HTTP User Agent string for all calls
* to the specified @c host.
*/
+ (void)setUserAgentPrefix:(nonnull NSString *)userAgentPrefix
forHost:(nonnull NSString *)host;
+ (void)setUserAgentPrefix:(nonnull NSString *)userAgentPrefix forHost:(nonnull NSString *)host;

/** The default response size limit is 4MB. Set this to override that default.
*/
/** The default response size limit is 4MB. Set this to override that default. */
+ (void)setResponseSizeLimit:(NSUInteger)limit forHost:(nonnull NSString *)host;

+ (void)closeOpenConnections DEPRECATED_MSG_ATTRIBUTE(
"The API for this feature is experimental, "
"and might be removed or modified at any "
"time.");
+ (void)closeOpenConnections DEPRECATED_MSG_ATTRIBUTE("The API for this feature is experimental, "
"and might be removed or modified at any "
"time.");
@end
16 changes: 7 additions & 9 deletions src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,24 @@

#import "GRPCCall.h"

/** Helpers for setting TLS Trusted Roots, Client Certificates, and Private Key
*/
/** Helpers for setting TLS Trusted Roots, Client Certificates, and Private Key */
@interface GRPCCall (ChannelCredentials)

/**
* Use the provided @c pemRootCert as the set of trusted root Certificate
* Authorities for @c host.
* Use the provided @c pemRootCert as the set of trusted root Certificate Authorities for @c host.
*/
+ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCert
forHost:(nonnull NSString *)host
error:(NSError *_Nullable *_Nullable)errorPtr;
error:(NSError * _Nullable * _Nullable)errorPtr;
/**
* Configures @c host with TLS/SSL Client Credentials and optionally trusted
* root Certificate Authorities. If @c pemRootCerts is nil, the default CA
* Certificates bundled with gRPC will be used.
* Configures @c host with TLS/SSL Client Credentials and optionally trusted root Certificate
* Authorities. If @c pemRootCerts is nil, the default CA Certificates bundled with gRPC will be
* used.
*/
+ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts
withPrivateKey:(nullable NSString *)pemPrivateKey
withCertChain:(nullable NSString *)pemCertChain
forHost:(nonnull NSString *)host
error:(NSError *_Nullable *_Nullable)errorPtr;
error:(NSError * _Nullable * _Nullable)errorPtr;

@end
14 changes: 6 additions & 8 deletions src/objective-c/GRPCClient/GRPCCall+OAuth2.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,15 @@
@interface GRPCCall (OAuth2)

/**
* Setting this property is equivalent to setting "Bearer <passed token>" as the
* value of the request header with key "authorization" (the authorization
* header). Setting it to nil removes the authorization header from the request.
* The value obtained by getting the property is the OAuth2 bearer token if the
* authorization header of the request has the form "Bearer <token>", or nil
* otherwise.
* Setting this property is equivalent to setting "Bearer <passed token>" as the value of the
* request header with key "authorization" (the authorization header). Setting it to nil removes the
* authorization header from the request.
* The value obtained by getting the property is the OAuth2 bearer token if the authorization header
* of the request has the form "Bearer <token>", or nil otherwise.
*/
@property(atomic, copy) NSString *oauth2AccessToken;

/** Returns the value (if any) of the "www-authenticate" response header (the
* challenge header). */
/** Returns the value (if any) of the "www-authenticate" response header (the challenge header). */
@property(atomic, readonly) NSString *oauth2ChallengeHeader;

@end
25 changes: 11 additions & 14 deletions src/objective-c/GRPCClient/GRPCCall+Tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,33 @@
#import "GRPCCall.h"

/**
* Methods to let tune down the security of gRPC connections for specific hosts.
* These shouldn't be used in releases, but are sometimes needed for testing.
* Methods to let tune down the security of gRPC connections for specific hosts. These shouldn't be
* used in releases, but are sometimes needed for testing.
*/
@interface GRPCCall (Tests)

/**
* Establish all SSL connections to the provided host using the passed SSL
* target name and the root certificates found in the file at |certsPath|.
* Establish all SSL connections to the provided host using the passed SSL target name and the root
* certificates found in the file at |certsPath|.
*
* Must be called before any gRPC call to that host is made. It's illegal to
* pass the same host to more than one invocation of the methods of this
* category.
* Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
* more than one invocation of the methods of this category.
*/
+ (void)useTestCertsPath:(NSString *)certsPath
testName:(NSString *)testName
forHost:(NSString *)host;

/**
* Establish all connections to the provided host using cleartext instead of
* SSL.
* Establish all connections to the provided host using cleartext instead of SSL.
*
* Must be called before any gRPC call to that host is made. It's illegal to
* pass the same host to more than one invocation of the methods of this
* category.
* Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
* more than one invocation of the methods of this category.
*/
+ (void)useInsecureConnectionsForHost:(NSString *)host;

/**
* Resets all host configurations to their default values, and flushes all
* connections from the cache.
* Resets all host configurations to their default values, and flushes all connections from the
* cache.
*/
+ (void)resetHostSettings;
@end
Loading

0 comments on commit 2c88b46

Please sign in to comment.