clang-format

pull/19704/head
Muxi Yan 6 years ago
parent 25432e011a
commit 9d77037106
  1. 2
      gRPC-ProtoRPC.podspec
  2. 4
      src/compiler/objective_c_plugin.cc
  3. 3
      src/objective-c/BUILD
  4. 13
      src/objective-c/GRPCClient/GRPCCallOptions.h
  5. 13
      src/objective-c/GRPCClient/GRPCTypes.h
  6. 13
      src/objective-c/ProtoRPC/ProtoService.h
  7. 13
      src/objective-c/ProtoRPC/ProtoServiceLegacy.h
  8. 2
      src/objective-c/ProtoRPC/ProtoServiceLegacy.m
  9. 2
      templates/gRPC-ProtoRPC.podspec.template

@ -69,7 +69,7 @@ Pod::Spec.new do |s|
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
"src/objective-c/ProtoRPC/ProtoServiceLegacy.{h,m}"
"src/objective-c/ProtoRPC/ProtoServiceLegacy.m"
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.

@ -138,9 +138,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
}
::grpc::string system_imports =
(generator_params.no_v1_compatibility
? SystemImport("ProtoRPC/ProtoService.h")
: SystemImport("ProtoRPC/ProtoServiceLegacy.h")) +
SystemImport("ProtoRPC/ProtoService.h") +
(generator_params.no_v1_compatibility
? SystemImport("ProtoRPC/ProtoRPC.h")
: SystemImport("ProtoRPC/ProtoRPCLegacy.h"));

@ -168,9 +168,6 @@ grpc_objc_library(
"ProtoRPC/ProtoRPCLegacy.m",
"ProtoRPC/ProtoServiceLegacy.m",
],
hdrs = [
"ProtoRPC/ProtoServiceLegacy.h",
],
deps = [
":rx_library",
":proto_objc_rpc_v2",

@ -24,19 +24,6 @@ NS_ASSUME_NONNULL_BEGIN
@protocol GRPCInterceptorFactory;
/**
* Implement this protocol to provide a token to gRPC when a call is initiated.
*/
@protocol GRPCAuthorizationProtocol
/**
* This method is called when gRPC is about to start the call. When OAuth token is acquired,
* \a handler is expected to be called with \a token being the new token to be used for this call.
*/
- (void)getTokenWithHandler:(void (^)(NSString *_Nullable token))handler;
@end
@interface GRPCCallOptions : NSObject<NSCopying, NSMutableCopying>
// Call parameters

@ -172,3 +172,16 @@ extern NSString* const kGRPCTrailersKey;
/** The id of a transport implementation. */
typedef char* GRPCTransportId;
/**
* Implement this protocol to provide a token to gRPC when a call is initiated.
*/
@protocol GRPCAuthorizationProtocol
/**
* This method is called when gRPC is about to start the call. When OAuth token is acquired,
* \a handler is expected to be called with \a token being the new token to be used for this call.
*/
- (void)getTokenWithHandler:(void (^)(NSString* _Nullable token))handler;
@end

@ -26,6 +26,7 @@
@class GRPCUnaryProtoCall;
@class GRPCStreamingProtoCall;
@protocol GRPCProtoResponseHandler;
@protocol GRXWriteable;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability-completeness"
@ -49,6 +50,18 @@ __attribute__((deprecated("Please use GRPCProtoService."))) @interface ProtoServ
callOptions:(nullable GRPCCallOptions *)callOptions
responseClass:(nonnull Class)responseClass;
@end
@interface ProtoService(Legacy)
- (instancetype)initWithHost : (NSString *)host packageName
: (NSString *)packageName serviceName : (NSString *)serviceName;
- (GRPCProtoCall *)RPCToMethod:(NSString *)method
requestsWriter:(GRXWriter *)requestsWriter
responseClass:(Class)responseClass
responsesWriteable:(id<GRXWriteable>)responsesWriteable;
@end
#pragma clang diagnostic pop

@ -21,16 +21,3 @@
@class GRPCProtoCall;
@class GRXWriter;
@protocol GRXWriteable;
@interface ProtoService (Legacy)
- (instancetype)initWithHost:(NSString *)host
packageName:(NSString *)packageName
serviceName:(NSString *)serviceName;
- (GRPCProtoCall *)RPCToMethod:(NSString *)method
requestsWriter:(GRXWriter *)requestsWriter
responseClass:(Class)responseClass
responsesWriteable:(id<GRXWriteable>)responsesWriteable;
@end

@ -20,7 +20,7 @@
#import "ProtoMethod.h"
#import "ProtoRPCLegacy.h"
#import "ProtoServiceLegacy.h"
#import "ProtoService.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"

@ -71,7 +71,7 @@
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
"src/objective-c/ProtoRPC/ProtoServiceLegacy.{h,m}"
"src/objective-c/ProtoRPC/ProtoServiceLegacy.m"
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.

Loading…
Cancel
Save