import type { _NSError } from "./NSError.js";
import type { _NSURLAuthenticationChallenge } from "./NSURLAuthenticationChallenge.js";
import type { _NSURLCredential } from "./NSURLCredential.js";
import type { _NSURLSession } from "./NSURLSession.js";
import type { NSURLSessionAuthChallengeDisposition } from "./NSURLSessionAuthChallengeDisposition.js";
export interface _NSURLSessionDelegate {
    /**
     * The last message a session receives. A session will only become invalid because of a systemic error or when it has been explicitly invalidated, in which case the error parameter will be nil.
     */
    URLSession$didBecomeInvalidWithError$?(session: _NSURLSession, error: _NSError | null): void;
    /**
     * If implemented, when a connection level authentication challenge has occurred, this delegate will be given the opportunity to provide authentication credentials to the underlying connection. Some types of authentication will apply to more than one request on a given connection to a server (SSL Server Trust challenges). If this delegate message is not implemented, the behavior will be to use the default handling, which may involve user interaction.
     */
    URLSession$didReceiveChallenge$completionHandler$?(session: _NSURLSession, challenge: _NSURLAuthenticationChallenge, completionHandler: ((disposition: NSURLSessionAuthChallengeDisposition, credential: _NSURLCredential) => void) | null): void;
    /**
     * If an application has received an -application:handleEventsForBackgroundURLSession:completionHandler: message, the session delegate will receive this message to indicate that all messages previously enqueued for this session have been delivered. At this time it is safe to invoke the previously stored completion handler, or to begin any internal updates that will result in invoking the completion handler.
     */
    URLSessionDidFinishEventsForBackgroundURLSession$?(session: _NSURLSession): void;
}
