Slight change to surface API.

pull/6586/head
Makarand Dharmapurikar 9 years ago
parent de733bd78c
commit 6d2ed00a1a
  1. 2
      src/objective-c/CronetFramework.podspec
  2. 3
      src/objective-c/GRPCClient/GRPCCall+Cronet.h
  3. 5
      src/objective-c/GRPCClient/GRPCCall+Cronet.m
  4. 2
      src/objective-c/tests/InteropTests.m

@ -35,7 +35,7 @@ Pod::Spec.new do |s|
s.homepage = "http://chromium.org" s.homepage = "http://chromium.org"
s.license = { :type => 'BSD' } s.license = { :type => 'BSD' }
s.vendored_framework = "Cronet.framework" s.vendored_framework = "Cronet.framework"
s.author = "" s.author = "The Chromium Authors"
s.ios.deployment_target = "8.0" s.ios.deployment_target = "8.0"
s.source = { :http => 'https://storage.googleapis.com/grpc-precompiled-binaries/cronet/Cronet.framework.zip' } s.source = { :http => 'https://storage.googleapis.com/grpc-precompiled-binaries/cronet/Cronet.framework.zip' }
s.preserve_paths = "Cronet.framework" s.preserve_paths = "Cronet.framework"

@ -39,8 +39,7 @@
*/ */
@interface GRPCCall (Cronet) @interface GRPCCall (Cronet)
+(void) setUseCronet:(BOOL) useCronet +(void)useCronet:(cronet_engine *)cronet_engine;
:(cronet_engine *)cronet_engine;
+(void *)getCronetEngine; +(void *)getCronetEngine;

@ -38,9 +38,8 @@ static void *g_cronet_engine;
@implementation GRPCCall (Cronet) @implementation GRPCCall (Cronet)
+ (void)setUseCronet:(BOOL)useCronet + (void)useCronet:(cronet_engine *)cronet_engine {
:(cronet_engine *)cronet_engine { use_cronet = YES;
use_cronet = useCronet;
g_cronet_engine = cronet_engine; g_cronet_engine = cronet_engine;
} }

@ -98,7 +98,7 @@ static cronet_engine *_engine = NULL;
[Cronet setSslKeyLogFileName:@"cronetkeylogfile.pem"]; [Cronet setSslKeyLogFileName:@"cronetkeylogfile.pem"];
[Cronet start]; [Cronet start];
_engine = [Cronet getGlobalEngine]; _engine = [Cronet getGlobalEngine];
[GRPCCall setUseCronet:true :_engine]; [GRPCCall useCronet:_engine];
} }
#endif #endif
} }

Loading…
Cancel
Save