import type { _NEAppProxyFlow } from "./NEAppProxyFlow.js";
import type { _NEAppProxyUDPFlow } from "./NEAppProxyUDPFlow.js";
import type { _NETunnelProvider } from "./NETunnelProvider.js";
import type { _NWEndpoint } from "./NWEndpoint.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { NEProviderStopReason } from "./NEProviderStopReason.js";
export declare class _NEAppProxyProvider extends _NETunnelProvider {
    static alloc(): _NEAppProxyProvider;
    static new(): _NEAppProxyProvider;
    init(): _NEAppProxyProvider;
    /**
     * @method startProxyWithOptions:completionHandler: @discussion This function is called by the framework when a new proxy instance is being created. Subclasses must override this method to perform whatever steps are necessary to ready the proxy for handling flows of network data. @param options A dictionary containing keys and values passed by the provider's containing app. If the containing app did not start the proxy then this parameter will be nil. @param completionHandler A block that must be called when the process of starting the proxy is complete. If the proxy cannot be started then the subclass' implementation of this method must pass a non-nil NSError object to this block. A value of nil passed to the completion handler indicates that the proxy was successfully started.
     */
    startProxyWithOptions$completionHandler$(options: _NSDictionary | null, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * @method stopProxyWithReason:completionHandler: @discussion This function is called by the framework when the proxy is being stopped. Subclasses must override this method to perform whatever steps are necessary to stop the proxy. @param reason An NEProviderStopReason indicating why the proxy is being stopped. @param completionHandler A block that must be called when the proxy is completely stopped.
     */
    stopProxyWithReason$completionHandler$(reason: NEProviderStopReason, completionHandler: () => void): void;
    /**
     * @method cancelProxyWithError: @discussion This function is called by proxy provider implementations to stop the proxy when a network error is encountered that renders the proxy no longer viable. Subclasses should not override this method. @param error An NSError object containing details about the error that the proxy provider implementation encountered.
     */
    cancelProxyWithError$(error: _NSError | null): void;
    /**
     * @method handleNewFlow: @discussion This function is called by the framework to deliver a new network data flow to the proxy provider implementation. Subclasses must override this method to perform whatever steps are necessary to ready the proxy to receive data from the flow. The proxy provider implementation indicates that the proxy is ready to handle flow data by calling -[NEAppProxyFlow openWithLocalFlowEndpoint:completionHandler:] on the flow. If the proxy implementation decides to not handle the flow and instead terminate it, the subclass implementation of this method should return NO. If the proxy implementation decides to handle the flow, the subclass implementation of this method should return YES. In this case the proxy implementation is responsible for retaining the NEAppProxyFlow object. @param flow The new flow @return YES if the proxy implementation has retained the flow and intends to handle the flow data. NO if the proxy implementation has not retained the flow and will not handle the flow data. In NETransparentProxyProvider sub-classes returning NO causes the flow to be handled by the networking stack without any proxy. In all other cases the flow is terminated when NO is returned.
     */
    handleNewFlow$(flow: _NEAppProxyFlow): boolean;
    /**
     * @method handleNewUDPFlow:initialRemoteFlowEndpoint: @discussion This function is called by the framework to deliver a new UDP data flow to the proxy provider implementation. Subclasses can override this method to perform whatever steps are necessary to ready the proxy to receive data from the flow. The proxy provider implementation indicates that the proxy is ready to handle flow data by calling -[NEAppProxyFlow openWithLocalFlowEndpoint:completionHandler:] on the flow. If the proxy implementation decides to not handle the flow and instead terminate it, the subclass implementation of this method should return NO. If the proxy implementation decides to handle the flow, the subclass implementation of this method should return YES. In this case the proxy implementation is responsible for retaining the NEAppProxyUDPFlow object. The default implementation of this method calls -[NEAppProxyProvider handleNewFlow:] and returns its result. @seealso NEAppProxyUDPFlowHandling for Swift subclasses. @param flow The new UDP flow @param remoteEndpoint The initial remote endpoint provided by the proxied app when the flow was opened. @return YES if the proxy implementation has retained the flow and intends to handle the flow data. NO if the proxy implementation has not retained the flow and will not handle the flow data. In this case the flow is terminated.
     */
    handleNewUDPFlow$initialRemoteFlowEndpoint$(flow: _NEAppProxyUDPFlow, remoteEndpoint: _NSObject): boolean;
    /**
     * @method handleNewUDPFlow:initialRemoteEndpoint: @discussion This function is called by the framework to deliver a new UDP data flow to the proxy provider implementation. Subclasses can override this method to perform whatever steps are necessary to ready the proxy to receive data from the flow. The proxy provider implementation indicates that the proxy is ready to handle flow data by calling -[NEAppProxyFlow openWithLocalEndpoint:completionHandler:] on the flow. If the proxy implementation decides to not handle the flow and instead terminate it, the subclass implementation of this method should return NO. If the proxy implementation decides to handle the flow, the subclass implementation of this method should return YES. In this case the proxy implementation is responsible for retaining the NEAppProxyUDPFlow object. The default implementation of this method calls -[NEAppProxyProvider handleNewFlow:] and returns its result. @param flow The new UDP flow @param remoteEndpoint The initial remote endpoint provided by the proxied app when the flow was opened. @return YES if the proxy implementation has retained the flow and intends to handle the flow data. NO if the proxy implementation has not retained the flow and will not handle the flow data. In NETransparentProxyProvider sub-classes returning NO causes the flow to be handled by the networking stack without any proxy. In all other cases the flow is terminated when NO is returned.
     * @deprecated handleNewUDPFlow:initialRemoteFlowEndpoint:
     */
    handleNewUDPFlow$initialRemoteEndpoint$(flow: _NEAppProxyUDPFlow, remoteEndpoint: _NWEndpoint): boolean;
}
