More specific typing in response handlers

pull/16190/head
Muxi Yan 6 years ago
parent 9925c13b27
commit 2d903f4732
  1. 2
      src/objective-c/GRPCClient/GRPCCall.h
  2. 2
      src/objective-c/ProtoRPC/ProtoRPC.h
  3. 2
      src/objective-c/ProtoRPC/ProtoRPC.m
  4. 2
      src/objective-c/tests/GRPCClientTests.m
  5. 2
      src/objective-c/tests/InteropTests.m

@ -160,7 +160,7 @@ extern id const kGRPCTrailersKey;
* Issued when a message is received from the server. The message is the raw data received from the
* server, with decompression and without proto deserialization.
*/
- (void)receivedRawMessage:(id)message;
- (void)receivedRawMessage:(NSData *)message;
/**
* Issued when a call finished. If the call finished successfully, \a error is nil and \a

@ -34,7 +34,7 @@
/**
* Issued when a message is received from the server. The message is the deserialized proto object.
*/
- (void)receivedProtoMessage:(id)message;
- (void)receivedProtoMessage:(GPBMessage *)message;
/**
* Issued when a call finished. If the call finished successfully, \a error is nil and \a

@ -168,7 +168,7 @@
if (_handler) {
id<GRPCProtoResponseHandler> handler = _handler;
NSError *error = nil;
id parsed = [_responseClass parseFromData:message error:&error];
GPBMessage *parsed = [_responseClass parseFromData:message error:&error];
if (parsed) {
if ([handler respondsToSelector:@selector(receivedProtoMessage:)]) {
dispatch_async(handler.dispatchQueue, ^{

@ -120,7 +120,7 @@ static GRPCProtoMethod *kFullDuplexCallMethod;
}
}
- (void)receivedProtoMessage:(id)message {
- (void)receivedProtoMessage:(GPBMessage *)message {
if (_messageCallback) {
_messageCallback(message);
}

@ -108,7 +108,7 @@ BOOL isRemoteInteropTest(NSString *host) {
}
}
- (void)receivedProtoMessage:(id)message {
- (void)receivedProtoMessage:(GPBMessage *)message {
if (_messageCallback) {
_messageCallback(message);
}

Loading…
Cancel
Save