Interface nsIHelperAppLauncherType

A helper app launcher is a small object created to handle the launching of an external application.

Note that cancelling the load via the nsICancelable interface will release the reference to the launcher dialog.

Hierarchy

Properties

MIMEInfo: nsIMIMEInfo

The mime info object associated with the content type this helper app launcher is currently attempting to load

browsingContextId: uint64_t

The browsingContext ID of the launcher's source

contentLength: int64_t

The download content length, or -1 if the length is not available.

source: nsIURI

The source uri

suggestedFileName: string

The suggested name for this file

targetFile: nsIFile

The file we are saving to

targetFileIsExecutable: boolean

The executable-ness of the target file

timeDownloadStarted: number

Time when the download started

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

  • Call this method to request that this object abort whatever operation it may be performing.

    Parameters

    • aReason: number

      Pass a failure code to indicate the reason why this operation is being canceled. It is an error to pass a success code.

    Returns void

  • Use the MIMEInfo associated with us to open a file that is already local. Will no-op if source is not a local file.

    Returns void

  • Saves the final destination of the file. NOTE: This will release the reference to the nsIHelperAppLauncherDialog.

    Returns void

  • Callback invoked by nsIHelperAppLauncherDialog::promptForSaveToFileAsync after the user has chosen a file through the File Picker (or dismissed it).

    Parameters

    • aFile: nsIFile

      The file that was chosen by the user (or null if dialog was dismissed).

    • aDialogWasShown: boolean

      Optional boolean - false by default. Pass true if a dialog was opened in the process of reaching this file result. If true, we suppress the opening of the downloads panel to avoid redundancy.

    Returns void

  • Tell the launcher that we will want to open the file. NOTE: This will release the reference to the nsIHelperAppLauncherDialog.

    Parameters

    • aHandleInternally: boolean

      TRUE if we should handle opening this internally.

    • aFile: nsIFile

    Returns void

  • The following methods are used by the progress dialog to get or set information on the current helper app launcher download. This reference will be released when the download is finished (after the listener receives the STATE_STOP notification).

    Parameters

    • aWebProgressListener: nsIWebProgressListener2

    Returns void

Generated using TypeDoc