nsIUpdate 编辑
toolkit/mozapps/update/nsIUpdateService.idl
Scriptable An interface that describes an object representing an available update to the current application - this update may have several available patches from which one must be selected to download and install, for example we might select a binary difference patch first and attempt to apply that, then if the application process fails fall back to downloading a complete file-replace patch. This object also contains information about the update that the front end and other application services can use to learn more about what is going on. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)Method overview
nsIUpdatePatch getPatchAt(in unsigned long index); |
nsIDOMElement serialize(in nsIDOMDocument updates); |
Attributes
Attribute | Type | Description |
appVersion | AString | The Application version of this update. |
billboardURL | AString | The URL to a page that is typically localized to display in the update prompt. |
buildID | AString | The build ID of this update. This is used to identify a particular build, down to the hour, minute, and second of its creation. This lets the system differentiate between several nightly builds with the same version , for example. |
channel | AString | The channel used to retrieve this update from the update service. |
detailsURL | AString | The URL to a page which offers details about the content of this update. Ideally, this page is not the release notes but some other page that summarizes the differences between this update and the previous, which also links to the release notes. |
displayVersion | AString | The string to display in the user interface for the version . If you want a real version number use appVersion . |
errorCode | long | A numeric error code that conveys additional information about the state of a failed update or failed certificate attribute check during an update check. If the update is not in the "failed" state, this value is zero.
|
extensionVersion | AString | The add-on version of this update. Used by the extension system to track compatibility of installed add-ons with this update. Obsolete since Gecko 2.0 |
installDate | long long | The date and time at which the update was installed. |
isCompleteUpdate | boolean | true if the update is a complete replacement of the existing installation; false if the update is a patch representing the difference between the new version and the existing version. |
isSecurityUpdate | boolean | true if the update is a security update. If the update is a security update, a more seriously-worded user interface message is used to present the update to the user. |
licenseURL | AString | The URL to an HTML fragment that contains a license for the update. If this is specified, the user is shown the license file after they choose to install the update, and they must agree to it before the download begins. |
name | AString | The name of the update, in the form "application_name update_version" |
patchCount | unsigned long | The number of patches supplied by this update. Read only. |
platformVersion | AString | The toolkit version of this update. |
previousAppVersion | AString | The Application version prior to the application being updated. |
selectedPatch |
| The currently selected patch for this update. Read only. |
serviceURL | AString | The URL to the update service that supplied this update. |
showNeverForVersion | boolean | Whether to show the "No Thanks" button in the update prompt. This allows the user to never receive a notification for that specific update version again. |
showPrompt | boolean | Whether to show the update prompt which requires user confirmation when an update is found during a background update check. This overrides the default setting to download the update in the background. |
showSurvey | boolean | Whether to show the survey link in the update prompt. The url must also be present in the app.update.surveyURL preference. |
state | AString | The state of the selected patch:
|
statusText | AString | An optional message associated with the update. |
type | AString | The type of patch represented by the object:
|
version | AString | The application version of the update.Obsolete since Gecko 2.0 |
Methods
getPatchAt()
Retrieves a patch.
nsIUpdatePatch getPatchAt( in unsigned long index );
Parameters
index
- The index of the patch to retrieve.
Return value
An nsIUpdatePatch
object describing the specified patch.
serialize()
Serializes the update object into a DOM element.
nsIDOMElement serialize( in nsIDOMDocument updates );
Parameters
updates
- The DOM document into which to serialize the update.
Return value
The patch object serialized into an nsIDOMElement
.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论