Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIXPIDialogService Interface Reference

A service provided by embedding applications to override the default XUL implmementation of XPInstall dialogs. More...

import "nsIXPIDialogService.idl";

Inheritance diagram for nsIXPIDialogService:
Inheritance graph
[legend]
Collaboration diagram for nsIXPIDialogService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean confirmInstall (in nsIDOMWindow parent,[array, size_is(count)] in wstring packageList, in unsigned long count)
 Ask the user if it's OK to install.
void openProgressDialog ([array, size_is(count)] in wstring packageList, in unsigned long count, in nsIObserver observer)
 Create and open a download-and-install progress dialog.

Detailed Description

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"

UNDER_REVIEW

Definition at line 56 of file nsIXPIDialogService.idl.


Member Function Documentation

boolean nsIXPIDialogService::confirmInstall ( in nsIDOMWindow  parent,
[array, size_is(count)] in wstring  packageList,
in unsigned long  count 
)

Ask the user if it's OK to install.

When called the XPIDialogService implementation should pose an install confirmation dialog and return the user's response

Parameters:
parenta window that can be used to parent the modal dialog
packageListFor 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.
countThe number of strings in the packageList. This will always be three times the number of packages.
Returns:
true to install, false to cancel
void nsIXPIDialogService::openProgressDialog ( [array, size_is(count)] in wstring  packageList,
in unsigned long  count,
in nsIObserver  observer 
)

Create and open a download-and-install progress dialog.

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".

Note:
Unless this routine throws an exception the observer must be called or nsXPInstallManager will wait forever and never clean itself up.
Parameters:
packageListthree strings per package as in confirmInstall()
countthe number of strings in the list
observernsIObserver to receive messages from the dialog

The documentation for this interface was generated from the following file: