new
New page
<breadcrumbs></breadcrumbs>The <code>nsIUpdatePrompt</code> interface describes an object that can be used to show various update-related notifications to the user.
__TOC__
{{InterfaceStatus|nsIUpdatePrompt|toolkit/mozapps/update/public/nsIUpdateService.idl|unfrozen|Mozilla 1.9|yes}}
Inherits from: {{interface|nsISupports}}
=Method overview=
{| class="standard-table"
|-
| <code>void [[#checkForUpdates()|checkForUpdates]]();</code>
|-
| <code>void [[#showUpdateAvailable()|showUpdateAvailable]](in [[nsIUpdate]] update);</code>
|-
| <code>void [[#showUpdateDownloaded()|showUpdateDownloaded]](in [[nsIUpdate]] update, [optional] in boolean background);</code>
|-
| <code>void [[#showUpdateError()|showUpdateError]](in [[nsIUpdate]] update);</code>
|-
| <code>void [[#showUpdateHistory()|showUpdateHistory]](in [[nsIDOMWindow]] parent);</code>
|-
| <code>void [[#showUpdateInstalled()|showUpdateInstalled]](in [[nsIUpdate]] update);</code>
|-
|}
=Methods=
==checkForUpdates()==
Presents a user interface that checks for and displays the available updates.
void checkForUpdates();
<h5>Parameters</h5>
None.
==showUpdateAvailable()==
Shows a message advising the user that an update is available to be downloaded and installed.
void showUpdateAvailable(
in nsIUpdate update
);
<h5>Parameters</h5>
;<tt>update</tt>
:An {{interface|nsIUpdate}} describing the update that's available.
==showUpdateDownloaded()==
Shows a message advising the user that an update has been downloaded, and that the user should restart the application in order to install it.
void showUpdateDownloaded(
in nsIUpdate update,
[optional] in boolean background
);
<h5>Parameters</h5>
;<tt>update</tt>
:An {{interface|nsIUpdate}} describing the update that was downloaded.
;<tt>background</tt>
:An optional parameter that, if provided and <code>true</code>, presents a less-obtrusive, non-modal notification alert.
==showUpdateError()==
Displays an error message telling the user about an update failure, such as a failure to successfully apply a patch.
void showUpdateError(
in nsIUpdate update
);
<h5>Parameters</h5>
;<tt>update</tt>
:An {{interface|nsIUpdate}} describing the update that failed to install.
==showUpdateHistory()==
Shows a list of all updates that have been installed to date.
void showUpdateHistory(
in nsIDOMWindow parent
);
<h5>Parameters</h5>
;<tt>parent</tt>
:An {{interface|nsIDOMWindow}} indicating the parent window to which to anchor the update list window. This can be <code>null</code>.
==showUpdateInstalled()==
Shows a message detailing the update that was just installed.
void showUpdateInstalled(
in nsIUpdate update
);
<h5>Parameters</h5>
;<tt>update</tt>
:An {{interface|nsIUpdate}} describing the update that was installed.
=See also=
* {{interface|nsIUpdate}}
* {{interface|nsIUpdateCheckListener}}
* {{interface|nsIUpdateChecker}}
* {{interface|nsIUpdatePatch}}
* {{interface|nsIApplicationUpdateService}}
* {{interface|nsIUpdateManager}}
* {{interface|nsIUpdateTimerManager}}
[[Category:Interfaces]]