addToBuilderAsBlocking static method
void
addToBuilderAsBlocking(
- ObjCProtocolBuilder builder, {
- void connection_didWriteData_totalBytesWritten_expectedTotalBytes_()?,
- void connectionDidResumeDownloading_totalBytesWritten_expectedTotalBytes_()?,
- required void connectionDidFinishDownloading_destinationURL_(
- NSURLConnection,
- NSURL
- 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 NSURLConnectionDownloadDelegate 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, {
void Function(NSURLConnection, int, int, int)?
connection_didWriteData_totalBytesWritten_expectedTotalBytes_,
void Function(NSURLConnection, int, int)?
connectionDidResumeDownloading_totalBytesWritten_expectedTotalBytes_,
required void Function(NSURLConnection, objc.NSURL)
connectionDidFinishDownloading_destinationURL_,
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,
}) {
NSURLConnectionDownloadDelegate
.connection_didWriteData_totalBytesWritten_expectedTotalBytes_
.implementAsBlocking(
builder,
connection_didWriteData_totalBytesWritten_expectedTotalBytes_,
);
NSURLConnectionDownloadDelegate
.connectionDidResumeDownloading_totalBytesWritten_expectedTotalBytes_
.implementAsBlocking(
builder,
connectionDidResumeDownloading_totalBytesWritten_expectedTotalBytes_,
);
NSURLConnectionDownloadDelegate
.connectionDidFinishDownloading_destinationURL_
.implementAsBlocking(
builder,
connectionDidFinishDownloading_destinationURL_,
);
NSURLConnectionDownloadDelegate.connection_didFailWithError_
.implementAsBlocking(builder, connection_didFailWithError_);
NSURLConnectionDownloadDelegate.connectionShouldUseCredentialStorage_
.implement(builder, connectionShouldUseCredentialStorage_);
NSURLConnectionDownloadDelegate
.connection_willSendRequestForAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_willSendRequestForAuthenticationChallenge_,
);
NSURLConnectionDownloadDelegate
.connection_canAuthenticateAgainstProtectionSpace_
.implement(builder, connection_canAuthenticateAgainstProtectionSpace_);
NSURLConnectionDownloadDelegate
.connection_didReceiveAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_didReceiveAuthenticationChallenge_,
);
NSURLConnectionDownloadDelegate.connection_didCancelAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_didCancelAuthenticationChallenge_,
);
builder.addProtocol($protocol);
}