nsIUpdatePrompt 编辑

toolkit/mozapps/update/nsIUpdateService.idlScriptable 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. The nsIUpdate object will not be the actual update when the error occurred during an update check and will instead be an nsIUpdate 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 be null.

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:45 次

字数:7129

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文