nsIUpdateItem 编辑

toolkit/mozapps/extensions/public/nsIExtensionManager.idlScriptable Describes an item managed by the extension system, providing metadata describing the item. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This interface is obsolete; instead of using the Extension Manager, you should use the Addon Manager.

Method overview

void init(in AString id, in AString version, in AString installLocationKey, in AString minAppVersion, in AString maxAppVersion, in AString name, in AString downloadURL, in AString xpiHash, in AString iconURL, in AString updateURL, in AString updateKey, in long type, in AString targetAppID);

Attributes

AttributeTypeDescription
iconURLAStringThe URL of the icon that can be shown for this item. Read only.
idAStringThe GUID of the item. Read only.
installLocationKeyAStringThe name of the Install Location where this item is installed. Read only.
maxAppVersionAStringThe maximum version of the application that this item works with, in FVF format. Read only.
minAppVersionAStringThe minimum version of the application that this item works with, in FVF format. Read only.
nameAStringThe name of this item. Read only.
objectSourceAStringReturns a JS Object source representing an nsIUpdateItem. Read only.
targetAppIDAString

The target application ID used for checking compatibility for this item.

Note: Add-ons can specify a targetApplication id of toolkit@mozilla.org in their install manifest for compatibility with all apps using a specific release of the toolkit. Read only.
typelongThe type of this item. Read only.
updateKeyAStringThe public key to verify updates for this item. This must be the public part of the key that was used to sign update manifests for this add-on. Read only.
updateRDFAStringThe URL of the update RDF file for this item. Read only.
versionAStringThe Version of the item, in FVF format. Read only.
xpiHashAStringThe string Hash for the XPI file. Can be null and if supplied must be in the format of "type:hash" (see the types in nsICryptoHash and nsIXPInstallManager.initManagerWithHashes(). Read only.
xpiURLAStringThe URL of the XPI where this item can be downloaded. Read only.

Constants

Item type constants

Constants representing types of update checks. Constants that callers can use to indicate the reason for an add-on update check. Internal code uses other constants in nsExtensionManager.js.in.

ConstantGecko versionDescription
1.81.8.11.91.9.11.9.2
TYPE_APP0x01 
TYPE_EXTENSION0x02 
TYPE_THEME0x04 
TYPE_LOCALE0x08 
TYPE_MULTI_XPI0x20 
TYPE_ADDONTYPE_EXTENSION + TYPE_THEME + TYPE_LOCALE + TYPE_PLUGINTYPE_EXTENSION + TYPE_THEME + TYPE_LOCALE 
TYPE_ANYTYPE_APP + TYPE_ADDON0xff 
TYPE_PLUGIN0x10  

Methods

init()

Initializes the object.

void init(
  in AString id,
  in AString version,
  in AString installLocationKey,
  in AString minAppVersion,
  in AString maxAppVersion,
  in AString name,
  in AString downloadURL,
  in AString xpiHash,
  in AString iconURL,
  in AString updateURL,
  in AString updateKey,
  in long type,
  in AString targetAppID
);
Parameters
id
The item's GUID.
version
The item's version.
installLocationKey
The name of the install location at which the item is installed.
minAppVersion
The minimum application version with which the item is compatible.
maxAppVersion
The maximum application version with which the item is compatible.
name
The item's name
downloadURL
The URL from which the item is to be downloaded.
xpiHash
The string hash for the XPI file.
iconURL
The URL of the icon that can be shown for the item.
updateURL
The URL of the update RDF for the item.
updateKey
The public key to use to verify updates for the item.
type
The type of item; see Item type constants.
targetAppID
The application ID of the target application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

词条统计

浏览:61 次

字数:9121

最后编辑:7 年前

编辑次数:0 次

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