A service provided by embedding applications to override the default XUL implmementation of XPInstall dialogs.
Embedding applications which wish to override the default XUL dialogs need to create a component which implements this interface and registers with the Contract ID "@mozilla.org/embedui/xpinstall-dialog-service;1"
PRBool confirmInstall ( nsIDOMWindow parent , arrayof PRUnichar* packageList , PRUint32 count )
When called the XPIDialogService implementation should pose an install confirmation dialog and return the user's response
- parent: a window that can be used to parent the modal dialog
- packageList: For each install package there will be three strings, a display name, a source URL, and a the name of the organization that signed this install. Note that the name of the signer is not verified. Verification happens when the the install has completely downloaded. Your user interface should only suggest that the install may be signed by this organization name. Note that an unsigned archive is indicated by an empty string.
- count: The number of strings in the packageList. This will always be three times the number of packages.
- true to install, false to cancel
void openProgressDialog ( arrayof PRUnichar* packageList , PRUint32 count , nsIObserver observer )
When called the XPIDialogService implementation creates and opens a dialog to display the status of the install. When the dialog is ready to be used then the observer must be called: the subject is an nsIXPIProgressDialog that nsXPInstallManager can use to control the dialog, the topic is "xpinstall-progress" and the data is "open".
If the user wishes to cancel the download, the dialog can call the observe method with the same subject and topic and the data "cancel".
- packageList: three strings per package as in confirmInstall()
- count: the number of strings in the list
- observer: nsIObserver to receive messages from the dialog
Reference documentation is generated from Mozilla's source.