Extension Manager:API Rewrite:API: Difference between revisions

No edit summary
(Replaced content with 'The information here has been transferred to the [https://developer.mozilla.org/en/Addons/Add-on_Manager Mozilla Developer Network].')
 
(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=AddonManager=
The information here has been transferred to the [https://developer.mozilla.org/en/Addons/Add-on_Manager Mozilla Developer Network].
 
==getInstallForURL==
 
Creates a new object representing an add-on installation from a url.
 
'''TODO''' This probably needs to be asynchronous to look up the mimetype of the url to determine the add-on type and maybe the signing certificate. Also move name and version arguments into a generic parameters object.
 
;name :A human readable name for the add-on to be displayed during install (optional)
;version :The version of the add-on to be installed (optional)
;url :The URL to install the add-on from
;hash :A hash of the file to be downloaded
 
;returns :An [[#AddonInstall|AddonInstall]] for the installation
 
==getInstallForFile==
 
Creates a new object reperesenting an add-on installation from a local file, properties for the install will be loaded out of the file synchronously.
 
;file :A <code>nsIFile</code> to install the add-on from
 
;returns :An [[#AddonInstall|AddonInstall]] for the installation
 
==getInstalls==
 
Returns the list of known add-on installs optionally restricting to a set of types of add-ons.
 
;types :An array of types of add-ons to return (optional)
 
;returns :An array of [[#AddonInstall|AddonInstalls]]
 
==addInstallListener==
 
Adds a listener that will be notified about any events in any install. The same listener will not be added multiple times.
 
;listener :An [[#InstallListener|InstallListener]]
 
==removeInstallListener==
 
Removes a previously added install listener.
 
;listener :An [[#InstallListener|InstallListener]]
 
==getAddon==
 
Gets an installed add-on.
 
'''TODO''' Make this asynchronous.
 
;id :The ID of the add-on to retrieve
 
;returns :An [[#Addon|Addon]] representing the add-on or null if there is no installed add-on with the given ID
 
==getAddons==
 
Gets an array of the installed add-ons optionally restricting to a set of types.
 
'''TODO''' Make this asynchronous.
 
;types :An array of types of add-ons to return (optional)
 
;returns :An array of [[#Addon|Addons]] representing the installed add-ons
 
==addAddonListener==
 
Adds a listener that will be notified about changes to add-on states for all installed add-ons. The same listener will not be added multiple times.
 
;listener :An [[#AddonListener|AddonListener]]
 
==removeAddonListener==
 
Removes a previously added add-on listener.
 
;listener :An [[#AddonListener|AddonListener]]
 
=Addon=
 
=AddonInstall=
 
=AddonListener=
 
=InstallListener=

Latest revision as of 02:37, 4 June 2010

The information here has been transferred to the Mozilla Developer Network.