Interface nsITransferType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Initializes the transfer with certain properties. This function must be called prior to accessing any properties on this interface.

    Parameters

    • aSource: nsIURI

      The source URI of the transfer. Must not be null.

    • aSourceOriginalURI: nsIURI

      The original URI of the transfer in case aSource is a blob URL. Can be null.

    • aTarget: nsIURI

      The target URI of the transfer. Must not be null.

    • aDisplayName: string

      The user-readable description of the transfer. Can be empty.

    • aMIMEInfo: nsIMIMEInfo

      The MIME info associated with the target, including MIME type and helper app when appropriate. This parameter is optional.

    • startTime: number

      Time when the download started (ie, when the first response from the server was received) XXX presumably wbp and exthandler do this differently

    • aTempFile: nsIFile

      The location of a temporary file; i.e. a file in which the received data will be stored, but which is not equal to the target file. (will be moved to the real target by the caller, when the download is finished) May be null.

    • aCancelable: nsICancelable

      An object that can be used to abort the download. Must not be null. Implementations are expected to hold a strong reference to this object until the download is finished, at which point they should release the reference.

    • aIsPrivate: boolean

      Used to determine the privacy status of the new transfer. If true, indicates that the transfer was initiated from a source that desires privacy.

    • aDownloadClassification: number

      Indicates wheter the download is unwanted, should be considered dangerous or insecure.

    • aReferrerInfo: nsIReferrerInfo

      The Referrer this download is started with

    • aOpenDownloadsListOnStart: boolean

      true (default) - Open downloads panel. false - Only show an icon indicator. This parameter is optional.

    Returns void

  • Same as init, but allows for passing the browsingContext which will allow for opening the download with the same userContextId and auth header.

    Parameters

    • aSource: nsIURI
    • aTarget: nsIURI
    • aDisplayName: string
    • aMIMEInfo: nsIMIMEInfo
    • startTime: number
    • aTempFile: nsIFile
    • aCancelable: nsICancelable
    • aIsPrivate: boolean
    • aDownloadClassification: number
    • aReferrerInfo: nsIReferrerInfo
    • aOpenDownloadsListOnStart: boolean
    • aBrowsingContext: BrowsingContext

      BrowsingContext of the initiating document.

    • aHandleInternally: boolean

      Set to true if the download should be opened within the browser.

    • aHttpChannel: nsIHttpChannel

      Channel of the initiating document.

    Returns void

  • Notification called for content blocking events. This method will be called when content gets allowed/blocked for various reasons per the Content Blocking rules.

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRequest: nsIRequest

      The nsIRequest that has new security state.

    • aEvent: number

      A value composed of the Content Blocking Event Flags listed above. Any undefined bits are reserved for future use.

    Returns void

  • Called when the location of the window being watched changes. This is not when a load is requested, but rather once it is verified that the load is going to occur in the given window. For instance, a load that starts in a window might send progress and status messages for the new site, but it will not send the onLocationChange until we are sure that we are loading this new page here.

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRequest: nsIRequest

      The associated nsIRequest. This may be null in some cases.

    • aLocation: nsIURI

      The URI of the location that is being loaded.

    • aFlags: number

      This is a value which explains the situation or the reason why the location has changed.

    Returns void

  • Notification that the progress has changed for one of the requests associated with aWebProgress. Progress totals are reset to zero when all requests in aWebProgress complete (corresponding to onStateChange being called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW flags).

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRequest: nsIRequest

      The nsIRequest that has new progress.

    • aCurSelfProgress: number

      The current progress for aRequest.

    • aMaxSelfProgress: number

      The maximum progress for aRequest.

    • aCurTotalProgress: number

      The current progress for all requests associated with aWebProgress.

    • aMaxTotalProgress: number

      The total progress for all requests associated with aWebProgress.

      NOTE: If any progress value is unknown, or if its value would exceed the maximum value of type long, then its value is replaced with -1.

      NOTE: If the object also implements nsIWebProgressListener2 and the caller knows about that interface, this function will not be called. Instead, nsIWebProgressListener2::onProgressChange64 will be called.

    Returns void

  • Notification that the progress has changed for one of the requests associated with aWebProgress. Progress totals are reset to zero when all requests in aWebProgress complete (corresponding to onStateChange being called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW flags).

    This function is identical to nsIWebProgressListener::onProgressChange, except that this function supports 64-bit values.

    See

    nsIWebProgressListener2::onProgressChange64

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRequest: nsIRequest

      The nsIRequest that has new progress.

    • aCurSelfProgress: number

      The current progress for aRequest.

    • aMaxSelfProgress: number

      The maximum progress for aRequest.

    • aCurTotalProgress: number

      The current progress for all requests associated with aWebProgress.

    • aMaxTotalProgress: number

      The total progress for all requests associated with aWebProgress.

      NOTE: If any progress value is unknown, then its value is replaced with -1.

    Returns void

  • Notification that a refresh or redirect has been requested in aWebProgress For example, via a or an HTTP Refresh: header

    Returns

    True if the refresh may proceed. False if the refresh should be aborted.

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRefreshURI: nsIURI

      The new URI that aWebProgress has requested redirecting to.

    • aMillis: number

      The delay (in milliseconds) before refresh.

    • aSameURI: boolean

      True if aWebProgress is requesting a refresh of the current URI. False if aWebProgress is requesting a redirection to a different URI.

    Returns boolean

  • Notification called for security progress. This method will be called on security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion. It might also be called if an error occurs during network loading.

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRequest: nsIRequest

      The nsIRequest that has new security state.

    • aState: number

      A value composed of the Security State Flags and the Security Strength Flags listed above. Any undefined bits are reserved for future use.

      NOTE: These notifications will only occur if a security package is installed.

    Returns void

  • Notification indicating the state has changed for one of the requests associated with aWebProgress.

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification

    • aRequest: nsIRequest

      The nsIRequest that has changed state.

    • aStateFlags: number

      Flags indicating the new state. This value is a combination of one of the State Transition Flags and one or more of the State Type Flags defined above. Any undefined bits are reserved for future use.

    • aStatus: number

      Error status code associated with the state change. This parameter should be ignored unless aStateFlags includes the STATE_STOP bit. The status code indicates success or failure of the request associated with the state change. NOTE: aStatus may be a success code even for server generated errors, such as the HTTP 404 error. In such cases, the request itself should be queried for extended error information (e.g., for HTTP requests see nsIHttpChannel).

    Returns void

  • Notification that the status of a request has changed. The status message is intended to be displayed to the user (e.g., in the status bar of the browser).

    Parameters

    • aWebProgress: nsIWebProgress

      The nsIWebProgress instance that fired the notification.

    • aRequest: nsIRequest

      The nsIRequest that has new status.

    • aStatus: number

      This value is not an error code. Instead, it is a numeric value that indicates the current status of the request. This interface does not define the set of possible status codes. NOTE: Some status values are defined by nsITransport and nsISocketTransport.

    • aMessage: wstring

      Localized text corresponding to aStatus.

    Returns void

  • Used to notify the transfer object of the redirects associated with the channel that terminated in the downloaded file. Must be called on the main thread, only after the download has finished successfully.

    Parameters

    • aRedirects: nsIArray

      The nsIArray of nsIPrincipal of redirected URIs associated with the downloaded file.

    Returns void

  • Used to notify the transfer object of the hash of the downloaded file. Must be called on the main thread, only after the download has finished successfully.

    Parameters

    • aHash: string

      The SHA-256 hash in raw bytes of the downloaded file.

    Returns void

  • Used to notify the transfer object of the signature of the downloaded file. Must be called on the main thread, only after the download has finished successfully.

    Parameters

    • aSignatureInfo: invalid

      The Array of Array of Array of bytes certificates of the downloaded file.

    Returns void

Generated using TypeDoc