nsIUpdatePrompt 编辑
toolkit/mozapps/update/nsIUpdateService.idl
Scriptable This interface describes an object that can be used to show various update-related notifications to the user. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports
Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)Method overview
void checkForUpdates(); |
void showUpdateAvailable(in nsIUpdate update); |
void showUpdateDownloaded(in nsIUpdate update, [optional] in boolean background); |
void showUpdateError(in nsIUpdate update); |
void showUpdateHistory(in nsIDOMWindow parent); |
void showUpdateInstalled(); |
Methods
checkForUpdates()
Presents a user interface that checks for and displays the available updates.
void checkForUpdates();
Parameters
None.
showUpdateAvailable()
Shows a message advising the user that an update is available to be downloaded and installed. If the app.update.silent preference is true
or the user interface is already displayed the call will be a no-op.
void showUpdateAvailable( in nsIUpdate update );
Parameters
update
- An
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. If background is true
(for example the download was not user initiated) and the app.update.silent preference is true
the call will be a no-op.
void showUpdateDownloaded( in nsIUpdate update, in boolean background Optional );
Parameters
update
- An
nsIUpdate
describing the update that was downloaded. background
Optional- An optional parameter that, if provided and
true
, 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. If the app.update.silent preference is true
the call will be a no-op.
void showUpdateError( in nsIUpdate update );
Parameters
update
- An
nsIUpdate
describing the update that failed to install. ThensIUpdate
object will not be the actual update when the error occurred during an update check and will instead be annsIUpdate
object with the error information for the update check.
showUpdateHistory()
Shows a list of all updates that have been installed to date.
void showUpdateHistory( in nsIDOMWindow parent );
Parameters
parent
- An
nsIDOMWindow
indicating the parent window to which to anchor the update list window. This can benull
.
showUpdateInstalled()
Shows a message detailing the update that was just installed successfully. If the app.update.silent preference is true
, the app.update.showInstalledUI preference is false
, or the user interface is already displayed the call will be a no-op.
void showUpdateInstalled( in nsIUpdate update Obsolete since Gecko 1.9.1 );
Parameters
update
Obsolete since Gecko 1.9.1- An
nsIUpdate
describing the update that was installed.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论