addToBuilderAsBlocking static method
void
addToBuilderAsBlocking(
- ObjCProtocolBuilder builder, {
- NSURLRequest? connection_willSendRequest_redirectResponse_()?,
- void connection_didReceiveResponse_()?,
- void connection_didReceiveData_(
- NSURLConnection,
- NSData
- NSInputStream? connection_needNewBodyStream_()?,
- void connection_didSendBodyData_totalBytesWritten_totalBytesExpectedToWrite_()?,
- NSCachedURLResponse? connection_willCacheResponse_()?,
- void connectionDidFinishLoading_()?,
- void connection_didFailWithError_(
- NSURLConnection,
- NSError
- bool connectionShouldUseCredentialStorage_()?,
- void connection_willSendRequestForAuthenticationChallenge_()?,
- bool connection_canAuthenticateAgainstProtectionSpace_()?,
- void connection_didReceiveAuthenticationChallenge_()?,
- void connection_didCancelAuthenticationChallenge_()?,
- bool $keepIsolateAlive = true,
override
Adds the implementation of the NSURLConnectionDataDelegate protocol to an existing
objc.ObjCProtocolBuilder. All methods that can be implemented as blocking
listeners will be.
Note: You cannot call this method after you have called builder.build.
Implementation
static void addToBuilderAsBlocking(
objc.ObjCProtocolBuilder builder, {
NSURLRequest? Function(NSURLConnection, NSURLRequest, NSURLResponse?)?
connection_willSendRequest_redirectResponse_,
void Function(NSURLConnection, NSURLResponse)?
connection_didReceiveResponse_,
void Function(NSURLConnection, objc.NSData)? connection_didReceiveData_,
objc.NSInputStream? Function(NSURLConnection, NSURLRequest)?
connection_needNewBodyStream_,
void Function(NSURLConnection, DartNSInteger, DartNSInteger, DartNSInteger)?
connection_didSendBodyData_totalBytesWritten_totalBytesExpectedToWrite_,
NSCachedURLResponse? Function(NSURLConnection, NSCachedURLResponse)?
connection_willCacheResponse_,
void Function(NSURLConnection)? connectionDidFinishLoading_,
void Function(NSURLConnection, objc.NSError)? connection_didFailWithError_,
bool Function(NSURLConnection)? connectionShouldUseCredentialStorage_,
void Function(NSURLConnection, NSURLAuthenticationChallenge)?
connection_willSendRequestForAuthenticationChallenge_,
bool Function(NSURLConnection, NSURLProtectionSpace)?
connection_canAuthenticateAgainstProtectionSpace_,
void Function(NSURLConnection, NSURLAuthenticationChallenge)?
connection_didReceiveAuthenticationChallenge_,
void Function(NSURLConnection, NSURLAuthenticationChallenge)?
connection_didCancelAuthenticationChallenge_,
bool $keepIsolateAlive = true,
}) {
NSURLConnectionDataDelegate.connection_willSendRequest_redirectResponse_
.implement(builder, connection_willSendRequest_redirectResponse_);
NSURLConnectionDataDelegate.connection_didReceiveResponse_
.implementAsBlocking(builder, connection_didReceiveResponse_);
NSURLConnectionDataDelegate.connection_didReceiveData_.implementAsBlocking(
builder,
connection_didReceiveData_,
);
NSURLConnectionDataDelegate.connection_needNewBodyStream_.implement(
builder,
connection_needNewBodyStream_,
);
NSURLConnectionDataDelegate
.connection_didSendBodyData_totalBytesWritten_totalBytesExpectedToWrite_
.implementAsBlocking(
builder,
connection_didSendBodyData_totalBytesWritten_totalBytesExpectedToWrite_,
);
NSURLConnectionDataDelegate.connection_willCacheResponse_.implement(
builder,
connection_willCacheResponse_,
);
NSURLConnectionDataDelegate.connectionDidFinishLoading_.implementAsBlocking(
builder,
connectionDidFinishLoading_,
);
NSURLConnectionDataDelegate.connection_didFailWithError_
.implementAsBlocking(builder, connection_didFailWithError_);
NSURLConnectionDataDelegate.connectionShouldUseCredentialStorage_.implement(
builder,
connectionShouldUseCredentialStorage_,
);
NSURLConnectionDataDelegate
.connection_willSendRequestForAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_willSendRequestForAuthenticationChallenge_,
);
NSURLConnectionDataDelegate
.connection_canAuthenticateAgainstProtectionSpace_
.implement(builder, connection_canAuthenticateAgainstProtectionSpace_);
NSURLConnectionDataDelegate.connection_didReceiveAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_didReceiveAuthenticationChallenge_,
);
NSURLConnectionDataDelegate.connection_didCancelAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_didCancelAuthenticationChallenge_,
);
builder.addProtocol($protocol);
}