import type { _NSCachedURLResponse } from "./NSCachedURLResponse.js";
import type { _NSData } from "./NSData.js";
import type { _NSError } from "./NSError.js";
import type { _NSURLAuthenticationChallenge } from "./NSURLAuthenticationChallenge.js";
import type { _NSURLProtocol } from "./NSURLProtocol.js";
import type { _NSURLRequest } from "./NSURLRequest.js";
import type { _NSURLResponse } from "./NSURLResponse.js";
import type { NSURLCacheStoragePolicy } from "./NSURLCacheStoragePolicy.js";
export interface _NSURLProtocolClient {
    /**
     * @method URLProtocol:wasRedirectedToRequest: @abstract Indicates to an NSURLProtocolClient that a redirect has occurred. @param protocol the NSURLProtocol object sending the message. @param request the NSURLRequest to which the protocol implementation has redirected.
     */
    URLProtocol$wasRedirectedToRequest$redirectResponse$?(protocol: _NSURLProtocol, request: _NSURLRequest, redirectResponse: _NSURLResponse): void;
    /**
     * @method URLProtocol:cachedResponseIsValid: @abstract Indicates to an NSURLProtocolClient that the protocol implementation has examined a cached response and has determined that it is valid. @param protocol the NSURLProtocol object sending the message. @param cachedResponse the NSCachedURLResponse object that has examined and is valid.
     */
    URLProtocol$cachedResponseIsValid$?(protocol: _NSURLProtocol, cachedResponse: _NSCachedURLResponse): void;
    /**
     * @method URLProtocol:didReceiveResponse: @abstract Indicates to an NSURLProtocolClient that the protocol implementation has created an NSURLResponse for the current load. @param protocol the NSURLProtocol object sending the message. @param response the NSURLResponse object the protocol implementation has created. @param policy The NSURLCacheStoragePolicy the protocol has determined should be used for the given response if the response is to be stored in a cache.
     */
    URLProtocol$didReceiveResponse$cacheStoragePolicy$?(protocol: _NSURLProtocol, response: _NSURLResponse, policy: NSURLCacheStoragePolicy): void;
    /**
     * @method URLProtocol:didLoadData: @abstract Indicates to an NSURLProtocolClient that the protocol implementation has loaded URL data. @discussion The data object must contain only new data loaded since the previous call to this method (if any), not cumulative data for the entire load. @param protocol the NSURLProtocol object sending the message. @param data URL load data being made available.
     */
    URLProtocol$didLoadData$?(protocol: _NSURLProtocol, data: _NSData): void;
    /**
     * @method URLProtocolDidFinishLoading: @abstract Indicates to an NSURLProtocolClient that the protocol implementation has finished loading successfully. @param protocol the NSURLProtocol object sending the message.
     */
    URLProtocolDidFinishLoading$?(protocol: _NSURLProtocol): void;
    /**
     * @method URLProtocol:didFailWithError: @abstract Indicates to an NSURLProtocolClient that the protocol implementation has failed to load successfully. @param protocol the NSURLProtocol object sending the message. @param error The error that caused the load to fail.
     */
    URLProtocol$didFailWithError$?(protocol: _NSURLProtocol, error: _NSError): void;
    /**
     * @method URLProtocol:didReceiveAuthenticationChallenge: @abstract Start authentication for the specified request @param protocol The protocol object requesting authentication. @param challenge The authentication challenge. @discussion The protocol client guarantees that it will answer the request on the same thread that called this method. It may add a default credential to the challenge it issues to the connection delegate, if the protocol did not provide one.
     */
    URLProtocol$didReceiveAuthenticationChallenge$?(protocol: _NSURLProtocol, challenge: _NSURLAuthenticationChallenge): void;
    /**
     * @method URLProtocol:didCancelAuthenticationChallenge: @abstract Cancel authentication for the specified request @param protocol The protocol object cancelling authentication. @param challenge The authentication challenge.
     */
    URLProtocol$didCancelAuthenticationChallenge$?(protocol: _NSURLProtocol, challenge: _NSURLAuthenticationChallenge): void;
}
