import { BrsValue, ValueKind, BrsBoolean } from "../BrsType";
import { BrsComponent } from "./BrsComponent";
import { BrsType } from "..";
import { RoURLEvent } from "../events/RoURLEvent";
import { BrsHttpAgent } from "../interfaces/IfHttpAgent";
import { XMLHttpRequest } from "../../polyfill/XMLHttpRequest";
export declare class RoURLTransfer extends BrsComponent implements BrsValue, BrsHttpAgent {
    readonly kind = ValueKind.Object;
    private readonly identity;
    private readonly inFile;
    private readonly fs;
    private url;
    private host;
    private reqMethod;
    private failureReason;
    private xhr;
    private freshConnection;
    private port?;
    private outFile;
    private postBody;
    private user?;
    private password?;
    readonly customHeaders: Map<string, string>;
    cookiesEnabled: boolean;
    certificatesFile: string;
    constructor();
    private executeRequest;
    getConnection(methodParam: string, typeParam: XMLHttpRequestResponseType): XMLHttpRequest;
    getToStringEvent(): RoURLEvent;
    getToFileEvent(filePath: string): RoURLEvent;
    getToFileAsync(): BrsType;
    postFromStringEvent(body: string): RoURLEvent;
    postFromStringAsync(): BrsType;
    postFromFileToFileEvent(inputPath: string, outputPath: string): RoURLEvent;
    postFromFileToFileAsync(): BrsType;
    saveDownloadedFile(filePath: string, data: any): void;
    requestHead(): BrsType;
    toString(parent?: BrsType): string;
    equalTo(other: BrsType): BrsBoolean;
    dispose(): void;
    /** Returns a unique number for this object that can be used to identify whether events originated from this object. */
    private readonly getIdentity;
    /** Sets the URL to use for the transfer request. */
    private readonly setUrl;
    /** Returns the current URL. */
    private readonly getUrl;
    /** Changes the request method from the normal GET, HEAD or POST to the value passed as a string. */
    private readonly setRequest;
    /** Returns the current request method. */
    private readonly getRequest;
    /** Connect to the remote service as specified in the URL and return the response body as a string. */
    private readonly getToString;
    /** Connect to the remote URL and write the response body to a file on the filesystem. */
    private readonly getToFile;
    /** Starts a GET request to a server, but does not wait for the transfer to complete. */
    private readonly asyncGetToString;
    /** Like AsyncGetToString, this starts a transfer without waiting for it to complete. */
    /** However, the response body will be written to a file on the device's filesystem */
    /** instead of being returned in a String object. */
    private readonly asyncGetToFile;
    /** Cancel any outstanding async requests on the roUrlEvent object. */
    private readonly asyncCancel;
    /** Synchronously perform an HTTP HEAD request and return an roUrlEvent object. */
    private readonly head;
    /** Begin an HTTP HEAD request without waiting for it to complete.. */
    private readonly asyncHead;
    /** Use the HTTP POST method to send the supplied string to the current URL. */
    private readonly postFromString;
    /** Use the HTTP POST method to send the supplied string to the current URL. When the POST completes, */
    /** an roUrlEvent will be sent to the message port associated with the object. */
    private readonly asyncPostFromString;
    /** Use the HTTP POST method to send the contents of the specified file to the current URL. */
    /** The HTTP response code is returned. */
    private readonly postFromFile;
    /** Use the HTTP POST method to send the contents of the specified file to the current URL. */
    private readonly asyncPostFromFile;
    /** Use the HTTP POST method to send the contents of the specified file to the current URL. */
    private readonly asyncPostFromFileToFile;
    /** If retain is true, return the body of the response even if the HTTP status code indicates that an error occurred. */
    private readonly retainBodyOnError;
    /** Enables HTTP authentication using the specified user name and password. */
    private readonly setUserAndPassword;
    /** Terminates the transfer automatically if the transfer rate drops below the */
    /** specified rate (bytes_per_second) over a specific interval (period_in_seconds). */
    private readonly setMinimumTransferRate;
    /** Returns a description of the failure that occurred. */
    private readonly getFailureReason;
    /** URL encode the specified string per RFC 3986 and return the encoded string. */
    private readonly escape;
    /** URL encode the specified string per RFC 3986 and return the encoded string. */
    private readonly urlEncode;
    /** Decode the specified string per RFC 3986 and return the unencoded string. */
    private readonly unescape;
    /** Specify whether to enable gzip encoding of transfers. */
    private readonly enableEncodings;
    /** Enables automatic resumption of AsyncGetToFile and GetToFile requests. */
    private readonly enableResume;
    /** Verifies that the certificate has a chain of trust up to a valid root certificate. */
    private readonly enablePeerVerification;
    /** Verifies that the certificate belongs to the host. */
    private readonly enableHostVerification;
    /** Specify whether to enable fresh connections. */
    private readonly enableFreshConnection;
    /** An optional function that enables HTTP/2 support. */
    private readonly setHttpVersion;
    /** Returns the user agent of the device, which can then be passed into server-side ad requests. */
    private readonly getUserAgent;
}
